[PATCH net v2] calipso: keep BIG TCP payload_len in calipso_skbuff_setattr()

sashiko-bot at kernel.org sashiko-bot at kernel.org
Fri Oct 9 16:13:29 UTC 2026


> calipso_skbuff_setattr() adjusts payload_len by the length of the
> option it inserts or resizes:
> 
> 	payload = ntohs(ip6_hdr->payload_len);
> 	ip6_hdr->payload_len = htons(payload + len_delta);
> 
> GRO can build BIG TCP packets larger than IPV6_MAXPLEN, and stores
> payload_len == 0 for them; ipv6_payload_len() then falls back to
> skb->len.  For such a packet forwarded to a destination mapped to
> CALIPSO, the code above writes len_delta (or 65536 + len_delta when
> shrinking) into payload_len, and ipv6_payload_len() no longer falls
> back to skb->len.  nf_tables, conntrack and sch_cake rely on it.
> 
> The same arithmetic also wraps when a packet grows past IPV6_MAXPLEN,
> and a BIG TCP packet that shrinks below IPV6_MAXPLEN should get its
> [ ... ]
> 
> Fixes: 81fbc812132c ("ipv6/gro: insert temporary HBH/jumbo header")
> Suggested-by: Eric Dumazet <edumazet at kernel.org>
> Suggested-by: Wang Zhan <wang.zhan at smartx.com>
> Signed-off-by: Joas Antonio dos Santos <joasantonio108 at gmail.com>

Sashiko has reviewed this patch and found no issues. It looks great!

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/179156155963.36253.400481753322266658@gmail.com?part=1




More information about the Linux-security-module-archive mailing list