geneve_udp_input() has a few "goto out" before it sets ifp, but the "out" code passes ifp to if_inc_counter(), which can crash due to ifp holding garbage.
Thank you for your report.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=70ef02b5d3fdbc4f51ea81404c4cbca310083ce6 commit 70ef02b5d3fdbc4f51ea81404c4cbca310083ce6 Author: Pouria Mousavizadeh Tehrani <pouria@FreeBSD.org> AuthorDate: 2026-05-10 19:25:53 +0000 Commit: Pouria Mousavizadeh Tehrani <pouria@FreeBSD.org> CommitDate: 2026-05-10 19:38:52 +0000 if_geneve: Fix uninitialized variable use in geneve_udp_input() Set the ifp variable as soon as soft_c becomes available so that interface statistics can be incremented. PR: 295129 Reported by: Robert Morris <rtm@lcs.mit.edu> Fixes: e44d2e941e8e ("if_geneve: Add Support for Geneve ...") sys/net/if_geneve.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)