CVE-2026-139286

Source
https://cve.org/CVERecord?id=CVE-2026-139286
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-139286.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2026-139286
Downstream
Published
2026-11-30T13:33:21Z
Modified
2026-11-30T15:01:05Z
Summary
bpf: Zero-extend the index in inlined bpf_get_func_arg()
Details

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.

Database specific
{
    "cna_assigner":  "Linux",
    "osv_generated_from":  "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/139xxx/CVE-2026-139286.json"
}
References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
f92c1e183604c20ce00eb889315fdaa8f2d9e509
Fixed
c463072e5da49b210a7e0ead600feea6a432a7fc
Fixed
7e3a5e1e3d57034d11e7aba5146daf3e8d460864
Fixed
85f8579916b99cdd31788b9dfd241d0e9752f5dc
Fixed
1c1dda9ba9f3af9cd511a197dcc86de2465d8fe5

Database specific

source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-139286.json"

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
5.17.0
Fixed
6.12.120
Type
ECOSYSTEM
Events
Introduced
6.13.0
Fixed
6.18.66
Type
ECOSYSTEM
Events
Introduced
6.19.0
Fixed
7.3.6

Database specific

source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-139286.json"