mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH ipsec 0/3] xfrm: iptfs: fix the outer packet size arithmetic
@ 2026-11-29  4:50 Andrii Tereshchenko
  2026-11-29  4:50 ` [PATCH ipsec 1/3] xfrm: iptfs: don't let the inner MTU wrap around Andrii Tereshchenko
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Andrii Tereshchenko @ 2026-11-29  4:50 UTC (permalink / raw)
  To: Steffen Klassert, Herbert Xu, David S. Miller
  Cc: Eric Dumazet, Jakub Kicinski, Paolo Abeni, Simon Horman,
	Willem de Bruijn, Christian Hopps, netdev, ipsec, linux-kernel,
	stable

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


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-11-30  4:52 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-29  4:50 [PATCH ipsec 0/3] xfrm: iptfs: fix the outer packet size arithmetic Andrii Tereshchenko
2026-11-29  4:50 ` [PATCH ipsec 1/3] xfrm: iptfs: don't let the inner MTU wrap around Andrii Tereshchenko
2026-11-30  4:52   ` netdev-bot+sashiko
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
2026-11-30  4:52   ` netdev-bot+sashiko

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®