From: Steffen Klassert <steffen.klassert@secunet.com>
To: Sabrina Dubroca <sd@queasysnail.net>
Cc: <netdev@vger.kernel.org>,
Aakash Kumar S <saakashkumar@marvell.com>,
<herbert@gondor.apana.org.au>,
<syzbot+a25ee9d20d31e483ba7b@syzkaller.appspotmail.com>
Subject: Re: [PATCH ipsec] xfrm: xfrm_alloc_spi shouldn't use 0 as SPI
Date: Wed, 3 Sep 2025 08:21:16 +0200 [thread overview]
Message-ID: <aLfeXFePeKjLPwaN@secunet.com> (raw)
In-Reply-To: <b7a2832406b97f48fbfdffc93f00b7a3fd83fee1.1756457310.git.sd@queasysnail.net>
On Fri, Aug 29, 2025 at 10:54:15AM +0200, Sabrina Dubroca wrote:
> x->id.spi == 0 means "no SPI assigned", but since commit
> 94f39804d891 ("xfrm: Duplicate SPI Handling"), we now create states
> and add them to the byspi list with this value.
>
> __xfrm_state_delete doesn't remove those states from the byspi list,
> since they shouldn't be there, and this shows up as a UAF the next
> time we go through the byspi list.
>
> Reported-by: syzbot+a25ee9d20d31e483ba7b@syzkaller.appspotmail.com
> Closes: https://syzkaller.appspot.com/bug?extid=a25ee9d20d31e483ba7b
> Fixes: 94f39804d891 ("xfrm: Duplicate SPI Handling")
> Signed-off-by: Sabrina Dubroca <sd@queasysnail.net>
Applied, thanks a lot Sabrina!
prev parent reply other threads:[~2025-09-03 6:30 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-29 8:54 [PATCH ipsec] xfrm: xfrm_alloc_spi shouldn't use 0 as SPI Sabrina Dubroca
2025-08-29 13:49 ` Simon Horman
2025-09-03 6:21 ` 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=aLfeXFePeKjLPwaN@secunet.com \
--to=steffen.klassert@secunet.com \
--cc=herbert@gondor.apana.org.au \
--cc=netdev@vger.kernel.org \
--cc=saakashkumar@marvell.com \
--cc=sd@queasysnail.net \
--cc=syzbot+a25ee9d20d31e483ba7b@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;
as well as URLs for NNTP newsgroup(s).