From: Steffen Klassert <steffen.klassert@secunet.com>
To: Zhiling Zou <zhilinz@nebusec.ai>
Cc: <netdev@vger.kernel.org>, <herbert@gondor.apana.org.au>,
<davem@davemloft.net>, <edumazet@google.com>, <kuba@kernel.org>,
<pabeni@redhat.com>, <horms@kernel.org>, <vega@nebusec.ai>
Subject: Re: [PATCH net 1/1] ipv6: xfrm: use full sockets in local error paths
Date: Mon, 24 Aug 2026 07:03:31 +0200 [thread overview]
Message-ID: <aovQozbgbf4m1PHv@secunet.com> (raw)
In-Reply-To: <b0a24c61d507fce6f881d95e233302e93227ad33.1785761237.git.zhilinz@nebusec.ai>
On Mon, Aug 03, 2026 at 09:28:58PM +0800, Zhiling Zou wrote:
> xfrm6_local_rxpmtu() and xfrm6_local_error() dereference skb->sk as if it
> always pointed at a full IPv6 socket.
>
> That is not guaranteed. TCP SYN-ACK skbs can be owned by a
> TCP_NEW_SYN_RECV request_sock while the output path itself is driven by the
> full listener. If rerouting selects an IPv6 XFRM tunnel route with a lower
> MTU, the local PMTU/error handling path can reach these callbacks with that
> mini-socket still attached to the skb.
>
> The callbacks then miscast the request socket as a full inet/IPv6 socket and
> can read beyond the request_sock allocation when they access inet_sock or
> ipv6_pinfo state.
>
> Resolve the owner with skb_to_full_sk() in both callbacks and bail out when
> no full socket is attached. This matches the surrounding XFRM IPv6 PMTU/error
> logic, which already reasons about full sockets with skb_to_full_sk().
>
> Fixes: dd767856a36e ("xfrm6: Don't call icmpv6_send on local error")
> Cc: stable@vger.kernel.org
> Reported-by: Vega <vega@nebusec.ai>
> Signed-off-by: Zhiling Zou <zhilinz@nebusec.ai>
Applied, thanks a lot!
prev parent reply other threads:[~2026-08-24 5:03 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-03 13:28 [PATCH net 0/1] ipv6: xfrm: use full sockets in local error paths Zhiling Zou
2026-08-03 13:28 ` [PATCH net 1/1] " Zhiling Zou
2026-08-24 5:03 ` 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=aovQozbgbf4m1PHv@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=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=vega@nebusec.ai \
--cc=zhilinz@nebusec.ai \
/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.