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>,
Willem de Bruijn <willemb@google.com>,
Christian Hopps <chopps@labn.net>,
netdev@vger.kernel.org, ipsec@lists.linux.dev,
linux-kernel@vger.kernel.org, stable@vger.kernel.org
Subject: [PATCH ipsec 0/3] xfrm: iptfs: fix the outer packet size arithmetic
Date: Sat, 28 Nov 2026 21:50:08 -0700 [thread overview]
Message-ID: <8cfaaaca-0668-485f-bc87-f9fde6c4b25d@mid.andrii.net> (raw)
Three bugs in how IP-TFS sizes its outer packets:
1/3 the inner MTU wraps around when the SA's overhead exceeds the path
MTU; with ESP offload an unprivileged user can panic the kernel.
2/3 ESP pads the IP-TFS header that the inner MTU leaves out, so full
outer packets of AES-CBC SAs exceed the MTU and are dropped.
3/3 pkt_size leaves out ESP's padding, trailer and ICV, and is not
converted again when the SA is migrated.
All three were found by an AI code review agent and reproduced on
ipsec master in KVM guests; each patch says how it was tested. 1/3 was
reported privately to the IPsec maintainers and security@kernel.org on
2026-11-20. A selftest for all three follows once 1/3 is in the
stable trees.
Andrii Tereshchenko
Andrii Tereshchenko (3):
xfrm: iptfs: don't let the inner MTU wrap around
xfrm: iptfs: count the IP-TFS header in the ESP padding
xfrm: iptfs: keep outer packets within pkt_size
net/xfrm/xfrm_iptfs.c | 50 +++++++++++++++++++++++++++----------------
1 file changed, 32 insertions(+), 18 deletions(-)
base-commit: 1213df0bc5993e479706c5eba5830243d778f164
--
2.53.0
next reply other threads:[~2026-11-29 4:50 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-29 4:50 Andrii Tereshchenko [this message]
2026-11-29 4:50 ` [PATCH ipsec 1/3] xfrm: iptfs: don't let the inner MTU wrap around Andrii Tereshchenko
2026-11-29 4:50 ` [PATCH ipsec 2/3] xfrm: iptfs: count the IP-TFS header in the ESP padding Andrii Tereshchenko
2026-11-29 4:50 ` [PATCH ipsec 3/3] xfrm: iptfs: keep outer packets within pkt_size 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=8cfaaaca-0668-485f-bc87-f9fde6c4b25d@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=stable@vger.kernel.org \
--cc=steffen.klassert@secunet.com \
--cc=willemb@google.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®