[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAJNGr6s2u+8tUvHzNCWAqweHD23ijRQoFzJE4kR0xouAFsRj5A@mail.gmail.com>
Date: Mon, 19 May 2025 15:32:09 +0800
From: Guoyu Yin <y04609127@...il.com>
To: pabeni@...hat.com
Cc: davem@...emloft.net, edumazet@...gle.com, kuba@...nel.org,
horms@...nel.org, netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [BUG] INFO: rcu detected stall in unix_seqpacket_sendmsg
Hi,
I found a crash related to unix_seqpacket_sendmsg. The kernel reports
an RCU stall in unix_seqpacket_sendmsg.
>From my analysis, the stall occurs when user space calls
unix_seqpacket_sendmsg (via sendfile or similar syscalls) with crafted
parameters, causing the kernel to enter unix_dgram_sendmsg and
eventually get stuck in sock_alloc_send_pskb or related memory
allocation routines. This leads to long-lasting blocking in memory
allocation, triggering an RCU stall.
The root cause seems to be insufficient validation of the message
length or socket state in unix_seqpacket_sendmsg/unix_dgram_sendmsg,
allowing user space to trigger resource exhaustion or deadlock
scenarios.
I recommend investigating:
The behavior of Unix domain socket send logic (unix_dgram_sendmsg and
unix_seqpacket_sendmsg) under abnormal conditions.
This can be reproduced on:
HEAD commit:
fac04efc5c793dccbd07e2d59af9f90b7fc0dca4
report: https://pastebin.com/raw/JJyvCmCn
console output : https://pastebin.com/raw/TUPGLzqh
kernel config: https://pastebin.com/raw/zrj9jd1V
C reproducer : https://pastebin.com/raw/ZzAVZ1ua
Best regards,
Guoyu
Powered by blists - more mailing lists