From: sashiko-bot@kernel.org
To: "Nagamani PV" <nagamani@linux.ibm.com>
Cc: "Christian Borntraeger" <borntraeger@linux.ibm.com>,
linux-s390@vger.kernel.org,
"Alexander Gordeev" <agordeev@linux.ibm.com>,
"Vasily Gorbik" <gor@linux.ibm.com>,
"Heiko Carstens" <hca@linux.ibm.com>
Subject: Re: [PATCH net v2] net/iucv: fix races in afiucv_netdev_event()
Date: Thu, 17 Sep 2026 07:28:03 +0000 [thread overview]
Message-ID: <20260917072804.6207C1F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20260917071706.23831-1-nagamani@linux.ibm.com>
> afiucv_netdev_event() walks iucv_sk_list.head inside a bare
> sk_for_each() with no lock held, while concurrent paths can modify
> or destroy sockets in that list:
>
> BUG-1 Use-After-Free
> iucv_sock_kill() calls iucv_sock_unlink() under write_lock_bh
> followed by sock_put() which may free the sk. If the notifier
> is mid-traversal when sock_put() runs, the stale sk pointer
> dereference at iucv = iucv_sk(sk) is a use-after-free.
> KASAN reports: slab-use-after-free in afiucv_netdev_event.
> Confirmed with KASAN on IBM Z.
>
> BUG-2 Locking correctness: iucv_send_ctrl() without lock_sock()
> iucv_send_ctrl() is called without holding lock_sock(sk). The
> notifier reads iucv->hs_dev without the socket lock, while
> [ ... ]
> Reported-by: Bryam Vargas <hexlabsecurity@proton.me>
> Link: https://lore.kernel.org/netdev/20260724222917.134769-1-hexlabsecurity@proton.me/
> Suggested-by: Hidayath Khan <hidayath@linux.ibm.com>
> Cc: stable@vger.kernel.org
> Signed-off-by: Nagamani PV <nagamani@linux.ibm.com>
Sashiko has reviewed this patch and found no issues. It looks great!
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260917071706.23831-1-nagamani@linux.ibm.com?part=1
next prev parent reply other threads:[~2026-09-17 7:28 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-03 18:20 [PATCH net-next] net/iucv: fix UAF in afiucv_netdev_event() Nagamani PV
2026-08-04 8:33 ` Alexandra Winter
2026-08-04 12:52 ` Nagamani PV
2026-08-04 13:30 ` Alexandra Winter
2026-09-17 7:32 ` Nagamani PV
2026-08-04 18:21 ` sashiko-bot
2026-09-17 7:29 ` Nagamani PV
2026-09-17 7:17 ` [PATCH net v2] net/iucv: fix races " Nagamani PV
2026-09-17 7:28 ` sashiko-bot [this message]
2026-09-17 14:01 ` Alexandra Winter
2026-09-18 8:58 ` Nagamani PV
2026-09-21 7:36 ` netdev-bot+sashiko
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=20260917072804.6207C1F000FF@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=agordeev@linux.ibm.com \
--cc=borntraeger@linux.ibm.com \
--cc=gor@linux.ibm.com \
--cc=hca@linux.ibm.com \
--cc=linux-s390@vger.kernel.org \
--cc=nagamani@linux.ibm.com \
--cc=sashiko-reviews@lists.linux.dev \
/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