mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [BUG] INFO: rcu detected stall in unix_seqpacket_sendmsg
@ 2025-05-19  7:32 Guoyu Yin
  2025-05-20 16:25 ` Kuniyuki Iwashima
  0 siblings, 1 reply; 2+ messages in thread
From: Guoyu Yin @ 2025-05-19  7:32 UTC (permalink / raw)
  To: pabeni; +Cc: davem, edumazet, kuba, horms, netdev, linux-kernel

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [BUG] INFO: rcu detected stall in unix_seqpacket_sendmsg
  2025-05-19  7:32 [BUG] INFO: rcu detected stall in unix_seqpacket_sendmsg Guoyu Yin
@ 2025-05-20 16:25 ` Kuniyuki Iwashima
  0 siblings, 0 replies; 2+ messages in thread
From: Kuniyuki Iwashima @ 2025-05-20 16:25 UTC (permalink / raw)
  To: y04609127; +Cc: davem, edumazet, horms, kuba, linux-kernel, netdev, pabeni

From: Guoyu Yin <y04609127@gmail.com>
Date: Mon, 19 May 2025 15:32:09 +0800
> 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

I don't think this is related to AF_UNIX.


> 
> console output : https://pastebin.com/raw/TUPGLzqh
> 
> kernel config: https://pastebin.com/raw/zrj9jd1V
> 
> C reproducer : https://pastebin.com/raw/ZzAVZ1ua

You may want to slim this down to a minimal repro.

Also, please make sure you run syzkaller on the latest kernel or
the latest LTS kernel.

> [   67.058143] CPU: 2 UID: 0 PID: 4456 Comm: syz-executor.1 Not tainted 6.13.0-rc5-00012-g0bc21e701a6f #2

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-05-20 16:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-05-19  7:32 [BUG] INFO: rcu detected stall in unix_seqpacket_sendmsg Guoyu Yin
2025-05-20 16:25 ` Kuniyuki Iwashima

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®