CVE-2026-98591 PUBLISHED

bpf: Fix bounds check for skb-backed dynptrs

Assigner: Linux
Reserved: 25.09.2026 Published: 18.10.2026 Updated: 18.10.2026

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

bpf: Fix bounds check for skb-backed dynptrs

The skb_pointer_if_linear() function checks whether a memory region of length len starting at offset off into the skb is in the linear area, and returns a pointer to the region if so. The check currently subtracts between skb_headlen and offset of the check, and since skb_headlen is unsigned the subtraction can underflow. This causes the bounds check to spuriously pass and generate an arbitrary pointer of the form *(skb->data + off).

The only user of this helper is currently skb-backed BPF dynptr code. Returning the wrong pointer leads to the dynptr erroneously being backed with invalid memory.

Ensure the subtraction cannot underflow, and fail the check if it would. Use u64 arithmetic to also prevent overflow when calculating (skb_headlen(skb) - off) since off is unsigned.

Product Status

Vendor Linux
Product Linux
Versions Default: unaffected
  • affected from 6f5a630d7c57cd79b1f526a95e757311e32d41e5 to 1b923538598be768e9f2f258a77a083d00e0c78b (excl.)
  • affected from 6f5a630d7c57cd79b1f526a95e757311e32d41e5 to 37877a24758068742fef687a7cf5362360dde1d1 (excl.)
  • affected from 6f5a630d7c57cd79b1f526a95e757311e32d41e5 to 1196903a27cac5c929c7517e987a8d159f20c5e5 (excl.)
  • affected from 6f5a630d7c57cd79b1f526a95e757311e32d41e5 to 39ffceaddb10753eac12785dba6ac0673860b4ac (excl.)
  • affected from 6f5a630d7c57cd79b1f526a95e757311e32d41e5 to ed6eec97b534979dcf28b40c389cee57bd6561d4 (excl.)
Vendor Linux
Product Linux
Versions Default: affected
  • Version 6.6 is affected
  • unaffected from 0 to 6.6 (excl.)
  • unaffected from 6.6.158 to 6.6.* (incl.)
  • unaffected from 6.12.112 to 6.12.* (incl.)
  • unaffected from 6.18.55 to 6.18.* (incl.)
  • unaffected from 7.2.9 to 7.2.* (incl.)
  • unaffected from 7.3-rc5 to * (incl.)

References