mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrii Tereshchenko <opensource@andrii.net>
To: Steffen Klassert <steffen.klassert@secunet.com>,
	Herbert Xu <herbert@gondor.apana.org.au>,
	"David S . Miller" <davem@davemloft.net>
Cc: Eric Dumazet <edumazet@kernel.org>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Simon Horman <horms@kernel.org>,
	Christian Hopps <chopps@labn.net>,
	netdev@vger.kernel.org, ipsec@lists.linux.dev,
	linux-kernel@vger.kernel.org, security@kernel.org,
	stable@vger.kernel.org
Subject: Re: [PATCH ipsec 1/2] xfrm: iptfs: don't modify the shared info of cloned skbs on output
Date: Thu, 26 Nov 2026 17:47:51 -0800	[thread overview]
Message-ID: <5ea528c8-ec02-4f2d-bc59-50700be8216a@mid.andrii.net> (raw)
In-Reply-To: <179531150722.3135.5639628464200463791@kernel.org>

On Sun, 22 Nov 2026, Sashiko AI review wrote:
> [Severity: High]
> Does this guard hold the "they are never appended" rule from the comment
> above? It only tests skb_cloned(skb). It also runs after
> iptfs_first_skb(), which may already have uncloned the head.

Yes, this is a real gap. A head that is not cloned can still share its
frag_list members: after skb_checksum_help() as you describe, after
pskb_copy(), and after skb_cow() of a clone. v2 tests skb_has_frag_list()
instead of skb_cloned(): a first skb with a frag_list is sent on its own,
aggregation stops at a following skb that has one, and
iptfs_rehome_fraglist() is removed. That also covers a deferred skb2 that
becomes the next first skb.

I drove your route directly in a test VM: a cloned CHECKSUM_PARTIAL skb
with a frag_list sent into an IP-TFS SA, then a small packet behind it.
With v1 the original's frag_list was written into every time; with v2
never.

> [Severity: Low]
> The commit message says: "ESP copies a cloned head anyway, so this
> moves that copy earlier and does not add one." That is not true...

Agreed, with aggregation ESP can reallocate the head again. v2's
changelog no longer says it.

v2 follows as a new thread.

Andrii Tereshchenko

pw-bot: cr

  reply	other threads:[~2026-11-27  1:47 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-18  0:54 [PATCH ipsec 0/2] xfrm: iptfs: fix a panic and a use-after-free " Andrii Tereshchenko
2026-11-18  0:54 ` [PATCH ipsec 1/2] xfrm: iptfs: don't modify the shared info of cloned skbs " Andrii Tereshchenko
2026-11-22  1:38   ` netdev-bot+sashiko
2026-11-27  1:47     ` Andrii Tereshchenko [this message]
2026-11-18  0:54 ` [PATCH ipsec 2/2] xfrm: iptfs: hold the dst while a packet waits on the output queue Andrii Tereshchenko
2026-11-27  3:09   ` Andrii Tereshchenko

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=5ea528c8-ec02-4f2d-bc59-50700be8216a@mid.andrii.net \
    --to=opensource@andrii.net \
    --cc=chopps@labn.net \
    --cc=davem@davemloft.net \
    --cc=edumazet@kernel.org \
    --cc=herbert@gondor.apana.org.au \
    --cc=horms@kernel.org \
    --cc=ipsec@lists.linux.dev \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=security@kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=steffen.klassert@secunet.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

all inboxes | Powered by JetHome®