Thread (3 messages) 3 messages, 3 authors, 2025-10-24

Re: [PATCH v2] net: sctp: fix KMSAN uninit-value in sctp_inq_pop

From: Xin Long <lucien.xin@gmail.com>
Date: 2025-10-24 16:02:02
Also in: linux-sctp, lkml

On Fri, Oct 24, 2025 at 7:44 AM Ranganath V N [off-list ref] wrote:
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
Fixes: https://syzkaller.appspot.com/bug?extid=d101e12bccd4095460e7
Suggested-by: Xin Long <lucien.xin@gmail.com>
Signed-off-by: Ranganath V N <redacted>
Acked-by: Xin Long <lucien.xin@gmail.com>

Thanks for the follow up.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help