From: Krystian Kaniewski <krystianmkaniewski@gmail.com>
To: Martin Schiller <ms@dev.tdt.de>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@kernel.org>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Willem de Bruijn <willemb@google.com>,
Simon Horman <horms@kernel.org>, Lin Ma <linma@zju.edu.cn>,
Duoming Zhou <duoming@zju.edu.cn>,
Xiyu Yang <xiyuyang19@fudan.edu.cn>,
Xin Tan <tanxin.ctf@gmail.com>
Cc: linux-x25@vger.kernel.org, netdev@vger.kernel.org,
Nguyen Ngoc Thang <ngocthang2710.1999@gmail.com>,
Shuai Liu <847807867@qq.com>,
syzbot+300375dfd44665f063a6@syzkaller.appspotmail.com,
syzbot+9faa82ae2e94c5c7d2ef@syzkaller.appspotmail.com,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH net v2 0/2] net/x25: don't call lock_sock() from softirq in x25_kill_by_neigh()
Date: Fri, 27 Nov 2026 14:30:05 +0100 [thread overview]
Message-ID: <5ad2c46b-4ed9-4689-950f-93753fa1586e@gmail.com> (raw)
In-Reply-To: <20261127-x25-kill-by-neigh-v2-0-c7cdcc9f1320@dev.tdt.de>
Hi Martin,
I tested v2 on net c5de2ce2fccd in QEMU with the syzbot config of
300375dfd44665f063a6. The syz reproducer of that report and both
reproducers of 9faa82ae2e94c5c7d2ef hit the splats without the series
and run clean with it. Link loss, restart and NETDEV_DOWN with idle and
owned calls are clean too, and your tests 2 and 3 pass. The same holds
with the PREEMPT_RT config of 9faa82ae2e94c5c7d2ef.
On the question of the netdev bot: patch 2 fixes a bug that can be hit
at runtime, the x25_recvmsg() case included. The window is narrow, but
a test can hold it open. A second thread owns the socket, stalled in a
userfaultfd copy, while sendmsg() or recvmsg() waits with the lock
dropped, and a CLEAR REQUEST from the peer goes to the backlog. For
x25_sendmsg() and x25_output() an RR in the backlog first frees the
send buffer, and the sender runs at SCHED_FIFO on the owner's CPU, so
it gets its skb before the CLEAR REQUEST is processed. For
x25_recvmsg() the CLEAR REQUEST follows a short DATA packet and the
first fragment of a longer message, and the receive buffer is small,
so the fragment sets X25_COND_OWN_RX_BUSY and x25_disconnect() purges
it again. Without patch 2 all three end in a NULL pointer dereference
(trimmed):
KASAN: null-ptr-deref in range [0x0000000000000018-0x000000000000001f]
RIP: 0010:x25_sendmsg+0x8b2/0x1580
Call Trace:
__sys_sendto+0x48a/0x4e0
__x64_sys_sendto+0xe0/0x1c0
do_syscall_64+0x125/0x7a0
The other two stop in x25_output+0x51f, called from x25_sendmsg(), and
in x25_write_internal+0x26f, called from x25_check_rbuf() in
x25_recvmsg(). With the series send() returns ENOTCONN and recv()
returns the data. I can send the test program if it helps.
Tested-by: Krystian Kaniewski <krystianmkaniewski@gmail.com>
--
Krystian Kaniewski
prev parent reply other threads:[~2026-11-27 13:30 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-27 6:28 [PATCH net v2 0/2] net/x25: don't call lock_sock() from softirq in x25_kill_by_neigh() Martin Schiller
2026-11-27 6:28 ` [PATCH net v2 1/2] " Martin Schiller
2026-11-27 6:28 ` [PATCH net v2 2/2] net/x25: re-check x25->neighbour after re-acquiring the socket lock Martin Schiller
2026-11-27 6:33 ` [PATCH net v2 0/2] net/x25: don't call lock_sock() from softirq in x25_kill_by_neigh() netdev-bot+sinfo
2026-11-27 6:43 ` Martin Schiller
2026-11-27 11:48 ` Martin Schiller
2026-11-27 13:30 ` Krystian Kaniewski [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=5ad2c46b-4ed9-4689-950f-93753fa1586e@gmail.com \
--to=krystianmkaniewski@gmail.com \
--cc=847807867@qq.com \
--cc=davem@davemloft.net \
--cc=duoming@zju.edu.cn \
--cc=edumazet@kernel.org \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=linma@zju.edu.cn \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-x25@vger.kernel.org \
--cc=ms@dev.tdt.de \
--cc=netdev@vger.kernel.org \
--cc=ngocthang2710.1999@gmail.com \
--cc=pabeni@redhat.com \
--cc=syzbot+300375dfd44665f063a6@syzkaller.appspotmail.com \
--cc=syzbot+9faa82ae2e94c5c7d2ef@syzkaller.appspotmail.com \
--cc=tanxin.ctf@gmail.com \
--cc=willemb@google.com \
--cc=xiyuyang19@fudan.edu.cn \
/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