Netdev List
 help / color / mirror / Atom feed
* [PATCH net v2 0/2] ipv4: fix fragment length accounting
@ 2026-11-05  7:34 =?gb18030?B?dGVuY2VudG9zX3NlY3VyZShUZW5jZW50T1Owssiruau5stPKz+Qp?=
  2026-11-09 23:20 ` patchwork-bot+netdevbpf
  0 siblings, 1 reply; 2+ messages in thread
From: =?gb18030?B?dGVuY2VudG9zX3NlY3VyZShUZW5jZW50T1Owssiruau5stPKz+Qp?= @ 2026-11-05  7:34 UTC (permalink / raw)
  To: netdev
  Cc: David Ahern, Ido Schimmel, Paolo Abeni, Jakub Kicinski,
	Willem de Bruijn, Willem de Bruijn, Steffen Klassert,
	steffen.klassert, Eric Dumazet

This series corrects fragment length accounting in __ip_append_data().
Patch 1 reserves the XFRM bundle header space as headroom. Patch 2
rejects an append when the transport header and moved tail do not fit;
it also addresses the independently reachable ICMP Timestamp case.

Changes since the initial public posting:
- Patch 1: correct the skb->len/fraggap explanation, clarify IPv6's
  dst_exthdrlen terminology, and scope the layout comparison to the
  same skb setup inputs. Add Willem's Reviewed-by.
- Patch 2: describe the ICMP Timestamp corruption path, distinguish
  negative copy from unsigned pagedlen wrap, update the subject and
  Fixes tag, and remove the unrelated XFRM Reported-by.
- No code changes in either patch.

The patches remain based on v7.3-rc7 (f909e534f5e3). The unchanged code
was previously tested on x86_64 and arm64. The relevant selftests/net
subset on arm64 gave matching results on patched and pristine kernels,
including the same failures in pmtu.sh, xfrm_state.sh and ipsec.c.
For the ICMP Timestamp case, a patch-1-only kernel returned corrupted
timestamps, whereas a kernel with both patches returned no reply during
the receive timeout. No additional test run is claimed for this respin.

Previous posting:
https://lore.kernel.org/netdev/v2-20261026-cover@tencent.com/

Thanks for the review.

Anakin Zhang (2):
  net/ipv4: reserve exthdrlen as headroom instead of counting it in
    skb->len
  net/ipv4: reject appends with negative fragment copy

 net/ipv4/ip_output.c | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

-- 
2.55.0

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

end of thread, other threads:[~2026-11-09 23:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-05  7:34 [PATCH net v2 0/2] ipv4: fix fragment length accounting =?gb18030?B?dGVuY2VudG9zX3NlY3VyZShUZW5jZW50T1Owssiruau5stPKz+Qp?=
2026-11-09 23:20 ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox