]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
net: prevent NULL deref in ip[6]tunnel_xmit()
authorEric Dumazet <edumazet@google.com>
Thu, 12 Mar 2026 04:39:08 +0000 (04:39 +0000)
committerPaolo Abeni <pabeni@redhat.com>
Thu, 12 Mar 2026 15:03:41 +0000 (16:03 +0100)
commitc38b8f5f791ecce13ab77e2257f8fd2444ba80f6
treed12f2dd1c32a6d73f1049cca8c3f5cfcb8e6a70e
parent87f7dff3ec75b91def0024ebaaf732457f47a63b
net: prevent NULL deref in ip[6]tunnel_xmit()

Blamed commit missed that both functions can be called with dev == NULL.

Also add unlikely() hints for these conditions that only fuzzers can hit.

Fixes: 6f1a9140ecda ("net: add xmit recursion limit to tunnel xmit functions")
Signed-off-by: Eric Dumazet <edumazet@google.com>
CC: Weiming Shi <bestswngs@gmail.com>
Link: https://patch.msgid.link/20260312043908.2790803-1-edumazet@google.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
include/net/ip6_tunnel.h
net/ipv4/ip_tunnel_core.c