summaryrefslogtreecommitdiff
path: root/rust/kernel/alloc/allocator
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@kernel.org>2026-10-30 09:33:58 +0100
committerPaolo Abeni <pabeni@redhat.com>2026-11-03 12:29:21 +0100
commit64e45ed926cdd017c9816c8006d9117a7194c7e9 (patch)
tree61b3f332c3210a9153e807a7731c0dc413d32a6b /rust/kernel/alloc/allocator
parent2e54b3e187300893688c2c7517894f5d96732e05 (diff)
xfrm: iptfs: fix skb leak on error in __input_process_payload()
syzbot reported a memory leak of the received skb (and its sec_path extension) in the IP-TFS receive path. __input_process_payload() parses the inner packets of an IP-TFS payload and queues them on @sublist, which is only sent after the parsing loop. Three error paths inside the loop (skb_copy_seq_read() failure, invalid inner IPv4 header length, unknown IP version) jump to the "done" label, which is placed after the code sending @sublist. Any skb already queued on @sublist is then neither delivered nor freed. This includes skbs added by iptfs_reassem_cont() before the call, newly allocated inner packets, and, since the received skb can be reused for the first inner packet, the received skb itself. Move the "done" label before the trim/send code, so that inner packets parsed before the error are delivered as on the normal exit path. The received skb is then still freed (or consumed) as before when it was not reused. Fixes: 6c82d2433671 ("xfrm: iptfs: add basic receive packet (tunnel egress) handling") Reported-by: syzbot+a3f21220cbbb6e14ee2e@syzkaller.appspotmail.com Closes: https://lore.kernel.org/netdev/6ae4102e.9c6421ad.36baac.0005.GAE@google.com/ Signed-off-by: Eric Dumazet <edumazet@kernel.org> Acked-by: Steffen Klassert <steffen.klassert@secunet.com> Link: https://patch.msgid.link/20261030083358.2653599-1-edumazet@kernel.org Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'rust/kernel/alloc/allocator')
0 files changed, 0 insertions, 0 deletions