CVE-2026-98950: flow_dissector: avoid u16 truncation of hlen in bpf_flow_dissect()

Published Oct 23, 2026
·
Updated

In the Linux kernel, the following vulnerability has been resolved:

flowdissector: avoid u16 truncation of hlen in bpfflowdissect()

bpfflowdissect() sanitizes the offsets returned by the BPF program with clampt(u16, ..., hlen).

If hlen is bigger than 65535, the upper bound is truncated before the comparison. For instance, with hlen == 65536, both nhoff and thoff are forced to zero, even if the program returned sane values.

This is the same class of bug as the one fixed in commit 99bda1ecbd56 ("flowdissector: avoid u16 truncation of skb->len when computing thoff"). That fix does not cover the BPF path, because skbflowdissect() returns early when a BPF flow dissector handles the packet.

struct bpfflowkeys stores nhoff and thoff as u16, so cap hlen to U16MAX before clamping.

Found by sashiko while reviewing the commit above.

Affected Software

1 affected component
Linux Linux kernel

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Compensating control

    In bpf_flow_dissect(), cap hlen to U16_MAX before clamping it, preventing u16 truncation when computing offsets.

Event History

Oct 23, 2026
CVE Published
via MITRE·12:19 PM
Data Sourced
via MITRE·12:19 PM
Description

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203