Netdev List
 help / color / mirror / Atom feed
From: Steffen Klassert <steffen.klassert@secunet.com>
To: Ren Wei <enjou1224z@gmail.com>
Cc: <netdev@vger.kernel.org>, <herbert@gondor.apana.org.au>,
	<davem@davemloft.net>, <edumazet@google.com>, <pabeni@redhat.com>,
	<horms@kernel.org>, <sd@queasysnail.net>, <vega@nebusec.ai>,
	<roxy520tt@gmail.com>
Subject: Re: [PATCH net 1/1] xfrm: drop ESP-in-TCP packets with no ingress device
Date: Thu, 23 Jul 2026 09:38:02 +0200	[thread overview]
Message-ID: <amHE2sGqclwnSYIp@secunet.com> (raw)
In-Reply-To: <0695ad081ad2abe6bab142be361ac4b52595fa6f.1784312563.git.roxy520tt@gmail.com>

On Sat, Jul 18, 2026 at 03:12:50PM +0800, Ren Wei wrote:
> From: Zhiling Zou <roxy520tt@gmail.com>
> 
> ESP-in-TCP receives records through the TCP strparser. handle_esp()
> restores skb->dev from the saved skb_iif before passing the packet into
> the XFRM input path.
> 
> Queued TCP data can be processed after the original ingress device has
> been removed, for example during veth or net namespace teardown. In that
> case dev_get_by_index_rcu() returns NULL. The XFRM IPv4 and IPv6 input
> paths both expect skb->dev to be valid while building the route lookup,
> so queued ESP-in-TCP data can dereference a NULL device.
> 
> Drop the packet if the saved ingress device can no longer be resolved.
> Such a packet can no longer be routed through the normal XFRM receive
> path, and this preserves the existing behaviour for packets whose ingress
> device still exists.
> 
> Fixes: e27cca96cd68 ("xfrm: add espintcp (RFC 8229)")
> Cc: stable@vger.kernel.org
> Reported-by: Vega <vega@nebusec.ai>
> Signed-off-by: Zhiling Zou <roxy520tt@gmail.com>
> Assisted-by: Codex:gpt-5.4
> Reviewed-by: Ren Wei <enjou1224z@gmail.com>

Applied, thanks a lot!

      reply	other threads:[~2026-07-23  7:38 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <cover.1784312563.git.roxy520tt@gmail.com>
2026-07-18  7:12 ` [PATCH net 1/1] xfrm: drop ESP-in-TCP packets with no ingress device Ren Wei
2026-07-23  7:38   ` 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=amHE2sGqclwnSYIp@secunet.com \
    --to=steffen.klassert@secunet.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=enjou1224z@gmail.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=horms@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=roxy520tt@gmail.com \
    --cc=sd@queasysnail.net \
    --cc=vega@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox