[PATCH ipsec 0/3] xfrm: iptfs: fix the outer packet size arithmetic
From: Andrii Tereshchenko
Date: Sat Nov 28 2026 - 23:50:26 EST
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@xxxxxxxxxx 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