diff options
| author | Henry Martin <bsdhenrymartin@gmail.com> | 2026-11-11 16:23:13 +0800 |
|---|---|---|
| committer | Jakub Kicinski <kuba@kernel.org> | 2026-11-16 15:06:51 -0800 |
| commit | ce09d8c13a15fe881d0a04c91979dcdf45ed9543 (patch) | |
| tree | dc9e0398173c51e0cf1a62d2d7b9774b4f7111dc /tools/perf/scripts/python/bin | |
| parent | aa40afa831ebfe45e40a23721711059f2ac584d4 (diff) | |
sctp: fix skb_over_panic when adding addresses with a pending delete of another family
sctp_make_asconf_update_ip() accounts for a pending DEL_IP
parameter by reusing the length of the address being added. The
write-back side instead serializes the pending address itself,
with its own address family. If the pending delete is IPv6
(20-byte parameter) while the added addresses are IPv4 (8-byte),
the chunk is allocated 12 bytes short and sctp_addto_chunk()
writes past the end of the skb. E.g. on mainline (05441d697f7f):
skbuff: skb_over_panic: text:ffffffff84859c77 len:392 put:20
tail:0x188 end:0x180 dev:<NULL>
kernel BUG at net/core/skbuff.c:215!
CPU: 0 UID: 1000 PID: 379 Comm: poc_sctp
Call Trace:
skb_panic
skb_put
sctp_addto_chunk
sctp_make_asconf_update_ip
sctp_send_asconf_add_ip
sctp_setsockopt_bindx
__x64_sys_setsockopt
Requires addip enabled on the endpoint (net.sctp.addip_enable=1).
Account for the pending delete with its own address family, as the
write-back side already does.
This issue was discovered by an LLM code scanner.
Cc: stable@vger.kernel.org
Fixes: 8a07eb0a50ae ("sctp: Add ASCONF operation on the single-homed host")
Signed-off-by: Henry Martin <bsdhenrymartin@gmail.com>
Acked-by: Xin Long <lucien.xin@gmail.com>
Link: https://patch.msgid.link/20261111082313.1606366-1-bsdhenrymartin@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/bin')
0 files changed, 0 insertions, 0 deletions
