2
0
mirror of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git synced 2025-09-04 20:19:47 +08:00
linux/net/mctp
Matt Johnston f5d83cf0ee net: mctp: unshare packets when reassembling
Ensure that the frag_list used for reassembly isn't shared with other
packets. This avoids incorrect reassembly when packets are cloned, and
prevents a memory leak due to circular references between fragments and
their skb_shared_info.

The upcoming MCTP-over-USB driver uses skb_clone which can trigger the
problem - other MCTP drivers don't share SKBs.

A kunit test is added to reproduce the issue.

Signed-off-by: Matt Johnston <matt@codeconstruct.com.au>
Fixes: 4a992bbd36 ("mctp: Implement message fragmentation & reassembly")
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://patch.msgid.link/20250306-matt-mctp-usb-v1-1-085502b3dd28@codeconstruct.com.au
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2025-03-11 13:12:19 +01:00
..
test net: mctp: unshare packets when reassembling 2025-03-11 13:12:19 +01:00
af_mctp.c mctp: Handle error of rtnl_register_module(). 2024-10-10 15:39:35 +02:00
device.c mctp: no longer rely on net->dev_index_head[] 2024-12-09 14:29:14 -08:00
Kconfig net: mctp: tests: Test that outgoing skbs have flow data populated 2024-02-22 13:32:55 +01:00
Makefile mctp: Add test utils 2021-10-03 14:35:41 +01:00
neigh.c mctp: Handle error of rtnl_register_module(). 2024-10-10 15:39:35 +02:00
route.c net: mctp: unshare packets when reassembling 2025-03-11 13:12:19 +01:00