From: Sabrina Dubroca <sd@queasysnail.net>
To: Breno Leitao <leitao@debian.org>
Cc: netdev@vger.kernel.org,
Steffen Klassert <steffen.klassert@secunet.com>,
Herbert Xu <herbert@gondor.apana.org.au>,
stable@vger.kernel.org, zdi-disclosures@trendmicro.com
Subject: Re: [PATCH ipsec] xfrm: espintcp: fix UAF during close
Date: Mon, 6 Jul 2026 15:52:54 +0200 [thread overview]
Message-ID: <akuzNohOorXU3RyA@krikkit> (raw)
In-Reply-To: <akfkd_1yI_G4cVoc@gmail.com>
2026-07-03, 09:36:42 -0700, Breno Leitao wrote:
> Hello Sabrina,
>
> On Fri, Jul 03, 2026 at 04:21:12PM +0200, Sabrina Dubroca wrote:
> > diff --git a/net/xfrm/espintcp.c b/net/xfrm/espintcp.c
> > index 374e1b964438..f09b5dd85db8 100644
> > --- a/net/xfrm/espintcp.c
> > +++ b/net/xfrm/espintcp.c
> > @@ -517,6 +517,8 @@ static void espintcp_close(struct sock *sk, long timeout)
> > sk->sk_prot = &tcp_prot;
> > barrier();
> >
> > + synchronize_rcu();
>
> I've got the impression netdev usually prefers synchronize_net() instead
> of synchornize_rcu(). Is there any reason for synchronize_net() not
> being used here?
I don't think it makes sense here. We're not holding RTNL (those are
just basic userspace TCP sockets), and we're not on the netns exit
path.
> Also, given you have a explicit synchronize_rcu() here, should the
> barrier() above be dropped?
Ok, I can clean that up in v2.
--
Sabrina
prev parent reply other threads:[~2026-07-06 13:52 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-03 14:21 [PATCH ipsec] xfrm: espintcp: fix UAF during close Sabrina Dubroca
2026-07-03 16:36 ` Breno Leitao
2026-07-06 13:52 ` Sabrina Dubroca [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=akuzNohOorXU3RyA@krikkit \
--to=sd@queasysnail.net \
--cc=herbert@gondor.apana.org.au \
--cc=leitao@debian.org \
--cc=netdev@vger.kernel.org \
--cc=stable@vger.kernel.org \
--cc=steffen.klassert@secunet.com \
--cc=zdi-disclosures@trendmicro.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.