linux/net/sctp
Ranganath V N 51e5ad549c net: sctp: fix KMSAN uninit-value in sctp_inq_pop
Fix an issue detected by syzbot:

KMSAN reported an uninitialized-value access in sctp_inq_pop
BUG: KMSAN: uninit-value in sctp_inq_pop

The issue is actually caused by skb trimming via sk_filter() in sctp_rcv().
In the reproducer, skb->len becomes 1 after sk_filter(), which bypassed the
original check:

        if (skb->len < sizeof(struct sctphdr) + sizeof(struct sctp_chunkhdr) +
                       skb_transport_offset(skb))
To handle this safely, a new check should be performed after sk_filter().

Reported-by: syzbot+d101e12bccd4095460e7@syzkaller.appspotmail.com
Tested-by: syzbot+d101e12bccd4095460e7@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=d101e12bccd4095460e7
Fixes: 1da177e4c3 ("Linux-2.6.12-rc2")
Suggested-by: Xin Long <lucien.xin@gmail.com>
Signed-off-by: Ranganath V N <vnranganath.20@gmail.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://patch.msgid.link/20251026-kmsan_fix-v3-1-2634a409fa5f@gmail.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2025-10-30 11:21:05 +01:00
..
associola.c sctp: Remove unused sctp_assoc_del_peer and sctp_chunk_iif 2025-05-05 16:51:12 -07:00
auth.c sctp: Use HMAC-SHA1 and HMAC-SHA256 library for chunk authentication 2025-08-19 19:36:25 -07:00
bind_addr.c
chunk.c sctp: Use HMAC-SHA1 and HMAC-SHA256 library for chunk authentication 2025-08-19 19:36:25 -07:00
debug.c
diag.c net: add sk_drops_read(), sk_drops_inc() and sk_drops_reset() helpers 2025-08-28 13:14:50 +02:00
endpointola.c sctp: Convert cookie authentication to use HMAC-SHA256 2025-08-19 19:36:26 -07:00
input.c net: sctp: fix KMSAN uninit-value in sctp_inq_pop 2025-10-30 11:21:05 +01:00
inqueue.c sctp: avoid NULL dereference when chunk data buffer is missing 2025-10-22 19:19:31 -07:00
ipv6.c sctp: initialize more fields in sctp_v6_from_sk() 2025-08-27 17:15:21 -07:00
Kconfig sctp: Convert cookie authentication to use HMAC-SHA256 2025-08-19 19:36:26 -07:00
Makefile
objcnt.c
offload.c sctp: use skb_crc32c() instead of __skb_checksum() 2025-05-21 15:40:16 -07:00
output.c treewide: Switch/rename to timer_delete[_sync]() 2025-04-05 10:30:12 +02:00
outqueue.c treewide: Switch/rename to timer_delete[_sync]() 2025-04-05 10:30:12 +02:00
primitive.c
proc.c sctp: snmp: do not use SNMP_MIB_SENTINEL anymore 2025-09-08 18:06:21 -07:00
protocol.c ipv4: Convert ->flowi4_tos to dscp_t. 2025-08-26 17:34:31 -07:00
sm_make_chunk.c sctp: Convert cookie authentication to use HMAC-SHA256 2025-08-19 19:36:26 -07:00
sm_sideeffect.c treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
sm_statefuns.c net/sctp: fix a null dereference in sctp_disposition sctp_sf_do_5_1D_ce() 2025-10-06 11:07:20 -07:00
sm_statetable.c
socket.c sctp: Convert cookie authentication to use HMAC-SHA256 2025-08-19 19:36:26 -07:00
stream.c treewide: Switch/rename to timer_delete[_sync]() 2025-04-05 10:30:12 +02:00
stream_interleave.c
stream_sched.c
stream_sched_fc.c
stream_sched_prio.c
stream_sched_rr.c
sysctl.c sctp: Stop accepting md5 and sha1 for net.sctp.cookie_hmac_alg 2025-08-19 19:36:26 -07:00
transport.c net: dst: annotate data-races around dst->obsolete 2025-07-02 14:32:29 -07:00
tsnmap.c
ulpevent.c
ulpqueue.c