On Fri, Nov 13, 2026 at 01:46:22PM +0100, Eric Dumazet wrote:
> skb->transport_header is a 16-bit offset from skb->head, and U16_MAX is
> reserved as the "not set" value. skb_set_transport_header() silently
> truncates an offset that does not fit.
>
> ipv6_mc_check_exthdrs() stores the offset returned by ipv6_skip_exthdr(),
> which depends on the extension headers found in the packet. Should the
> value be truncated, ipv6_mc_check_icmpv6() and ipv6_mc_check_mld_msg()
> would then validate and parse the MLD message at the wrong place.
>
> Since commit 3744b0964d52 ("ipv6: Implement limits on extension header
> parsing") a single chain is bounded to IP6_MAX_EXT_HDRS_CNT headers
> (24576 bytes), so this needs a large skb->data - skb->head on top of it,
> for instance after several nested decapsulations, each of them possibly
> pulling its own extension header chain. No reproducer was written,
> this is hardening.
>
> Use skb_set_transport_header_careful() and treat such a packet as
> broken (-EINVAL).
>
> Fixes: 9afd85c9e455 ("net: Export IGMP/MLD message validation code")
> Cc: [email protected]
> Signed-off-by: Eric Dumazet <[email protected]>
Reviewed-by: Ido Schimmel <[email protected]>
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev