]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
udp: call skb_orphan() before skb_attempt_defer_free()
authorEric Dumazet <edumazet@google.com>
Mon, 5 Jan 2026 09:36:30 +0000 (09:36 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 17 Jan 2026 15:35:28 +0000 (16:35 +0100)
commit0c63d5683eae6a7b4d81382bcbecb2a19feff90d
tree71a1c799bd63aea23163afd468e1a5c47e4621e1
parent2d6cde9953f9fdb5773825d75e932341365977d8
udp: call skb_orphan() before skb_attempt_defer_free()

[ Upstream commit e5c8eda39a9fc1547d1398d707aa06c1d080abdd ]

Standard UDP receive path does not use skb->destructor.

But skmsg layer does use it, since it calls skb_set_owner_sk_safe()
from udp_read_skb().

This then triggers this warning in skb_attempt_defer_free():

    DEBUG_NET_WARN_ON_ONCE(skb->destructor);

We must call skb_orphan() to fix this issue.

Fixes: 6471658dc66c ("udp: use skb_attempt_defer_free()")
Reported-by: syzbot+3e68572cf2286ce5ebe9@syzkaller.appspotmail.com
Closes: https://lore.kernel.org/netdev/695b83bd.050a0220.1c9965.002b.GAE@google.com/T/#u
Signed-off-by: Eric Dumazet <edumazet@google.com>
Link: https://patch.msgid.link/20260105093630.1976085-1-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/ipv4/udp.c