# CVE-2026-139286: bpf: Zero-extend the index in inlined bpf_get_func_arg()

- Severity: not scored yet
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.21%, higher than 11% of CVEs (2026-12-01)
- Published: 2026-11-30T13:33:21.009Z
- Modified: 2026-11-30T14:18:52.200Z
- Assigned by: Linux

## Description

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

bpf: Zero-extend the index in inlined bpf_get_func_arg()

bpf_get_func_arg() takes a u32 index, but the inlined expansion compared
only the low 32 bits of R2 with the argument count and then shifted the
full 64-bit register to compute the context address. R2 is ARG_ANYTHING,
so nothing guarantees that its upper bits are zero: an index of
1ULL << 32 passes the bounds check as index zero while the load is
performed at ctx + (1ULL << 35).

Shift the index as a 32-bit value. When the 32-bit bounds check passes,
the low 32 bits of R2 are below R0, and R0 is at most 255: the trampoline
arm masks the argument count with 0xFF and the raw_tp arm uses the BTF
argument count minus one, which the verifier caps at MAX_BPF_FUNC_ARGS.
The 3-bit shift therefore cannot overflow and it clears the upper bits of
the register. Widening the comparison instead would reject indices whose
low 32 bits are valid. The check itself is unchanged, so this cannot
change which programs are accepted, only the address that is computed.

(As written by CVE List.)

## Affected

- Linux Linux: from f92c1e183604c20ce00eb889315fdaa8f2d9e509 before c463072e5da49b210a7e0ead600feea6a432a7fc; from f92c1e183604c20ce00eb889315fdaa8f2d9e509 before 7e3a5e1e3d57034d11e7aba5146daf3e8d460864; from f92c1e183604c20ce00eb889315fdaa8f2d9e509 before 85f8579916b99cdd31788b9dfd241d0e9752f5dc; from f92c1e183604c20ce00eb889315fdaa8f2d9e509 before 1c1dda9ba9f3af9cd511a197dcc86de2465d8fe5; 5.17 (not affected: before 5.17; from 6.12.120 up to 6.12.*; from 6.18.66 up to 6.18.*; from 7.3.6 up to 7.3.*; from 7.4-rc1 up to *)

## References

- <https://git.kernel.org/stable/c/c463072e5da49b210a7e0ead600feea6a432a7fc>
- <https://git.kernel.org/stable/c/7e3a5e1e3d57034d11e7aba5146daf3e8d460864>
- <https://git.kernel.org/stable/c/85f8579916b99cdd31788b9dfd241d0e9752f5dc>
- <https://git.kernel.org/stable/c/1c1dda9ba9f3af9cd511a197dcc86de2465d8fe5>

## Sources

- CVE List: [CVE-2026-139286](https://www.cve.org/CVERecord?id=CVE-2026-139286), CVE Terms of Use, modified 2026-11-30
- NVD: [CVE-2026-139286](https://nvd.nist.gov/vuln/detail/CVE-2026-139286), Public domain, modified 2026-11-30

---

Page: https://cve.day/CVE-2026-139286 · Whole record: https://cve.day/CVE-2026-139286.json · Rebuilt by cve.day 2026-11-30T14:33:03.438Z
