From: Steffen Klassert <steffen.klassert@secunet.com>
To: "Ömer Mete Kaya" <omermetekaya0@gmail.com>
Cc: Herbert Xu <herbert@gondor.apana.org.au>, <davem@davemloft.net>,
<edumazet@google.com>, <kuba@kernel.org>, <pabeni@redhat.com>,
<horms@kernel.org>, <netdev@vger.kernel.org>,
<linux-kernel@vger.kernel.org>,
<syzbot+d3bc2f2eb498a0175940@syzkaller.appspotmail.com>
Subject: Re: [PATCH] xfrm: fix suspicious RCU usage in xfrm_nlmsg_multicast
Date: Mon, 17 Aug 2026 10:50:18 +0200 [thread overview]
Message-ID: <aoLLSiD7yjcaH_BI@secunet.com> (raw)
In-Reply-To: <20260803170525.1767734-1-omermetekaya0@gmail.com>
On Mon, Aug 03, 2026 at 08:05:25PM +0300, Ömer Mete Kaya wrote:
> xfrm_nlmsg_multicast() dereferences net->xfrm.nlsk via
> rcu_dereference() and is documented as requiring the RCU read
> lock, but 11 of its 12 call sites in this file do not hold it.
>
> Move the RCU read-side critical section inside
> xfrm_nlmsg_multicast() itself instead of adding it to each call
> site individually. This is safe: xfrm_get_translator() takes its
> own nested RCU read lock internally, and nlmsg_multicast() is
> called with GFP_ATOMIC, whose only conditional yield() in
> netlink_broadcast_filtered() is gated on blocking being allowed,
> which GFP_ATOMIC never permits.
>
> The redundant rcu_read_lock()/rcu_read_unlock() pair in
> xfrm_notify_userpolicy(), the one caller that already took the
> lock, is removed accordingly.
>
> Reported-by: syzbot+d3bc2f2eb498a0175940@syzkaller.appspotmail.com
> Closes: https://syzkaller.appspot.com/bug?extid=d3bc2f2eb498a0175940
> Signed-off-by: Ömer Mete Kaya <omermetekaya0@gmail.com>
Can you please add a 'Fixes:' tag to the commit message?
Thanks!
prev parent reply other threads:[~2026-08-17 8:50 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-03 17:05 [PATCH] xfrm: fix suspicious RCU usage in xfrm_nlmsg_multicast Ömer Mete Kaya
2026-08-17 8:50 ` Steffen Klassert [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=aoLLSiD7yjcaH_BI@secunet.com \
--to=steffen.klassert@secunet.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=herbert@gondor.apana.org.au \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=omermetekaya0@gmail.com \
--cc=pabeni@redhat.com \
--cc=syzbot+d3bc2f2eb498a0175940@syzkaller.appspotmail.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