mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Kuniyuki Iwashima <kuniyu@amazon.com>
To: <y04609127@gmail.com>
Cc: <davem@davemloft.net>, <edumazet@google.com>, <horms@kernel.org>,
	<kuba@kernel.org>, <linux-kernel@vger.kernel.org>,
	<netdev@vger.kernel.org>, <pabeni@redhat.com>
Subject: Re: [BUG] INFO: rcu detected stall in unix_seqpacket_sendmsg
Date: Tue, 20 May 2025 09:25:30 -0700	[thread overview]
Message-ID: <20250520162617.35163-1-kuniyu@amazon.com> (raw)
In-Reply-To: <CAJNGr6s2u+8tUvHzNCWAqweHD23ijRQoFzJE4kR0xouAFsRj5A@mail.gmail.com>

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

      reply	other threads:[~2025-05-20 16:26 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-19  7:32 Guoyu Yin
2025-05-20 16:25 ` Kuniyuki Iwashima [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250520162617.35163-1-kuniyu@amazon.com \
    --to=kuniyu@amazon.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=y04609127@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®