CVE-2026-139302

Source
https://cve.org/CVERecord?id=CVE-2026-139302
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-139302.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2026-139302
Downstream
Published
2026-11-30T13:33:29Z
Modified
2026-11-30T15:01:17Z
Summary
bpf: Don't take an extension for an iterator program
Details

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

bpf: Don't take an extension for an iterator program

An extension inherits the expected_attach_type of the program it extends. If that is BPF_TRACE_ITER, check_attach_btf_id() hands the extension to bpf_iter_prog_supported(), which goes by the name of the attach function. For an extension that is the name of the subprogram it replaces, so the load fails with -EINVAL, unless that subprogram is called like the function of a target, bpf_iter_bpf_map_elem for example.

Then the extension gets the context of that target. If the subprogram has as many arguments, it can use the key and the value as buffers, but how far it reaches is noted in the extension, where the test of the iterator link does not look: it reads and writes behind the elements of the map. And the id of the subprogram in the BTF of the program is cached as the id of the target, so that programs of that target which are loaded already cannot be attached.

Refuse all extensions here.

Database specific
{
    "cna_assigner":  "Linux",
    "osv_generated_from":  "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/139xxx/CVE-2026-139302.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
15d83c4d7cef5c067a8b075ce59e97df4f60706e
Fixed
46a8a2acca26616f8445af133f32d7740332fdc0
Fixed
afd54a08a29406fb3d8ea8e828bdb5d1e4862088
Fixed
e8b7f9151e465c4ab5e712f84041b0cf3b90425b
Fixed
d7a76b9b807349c3057beccd574fcd0aec2c773b
Fixed
061c4649fa49ed80e3f3ac872665230cb6fa898c
Fixed
1b79f322cbfb59d920b102a18efdd14f17e3d5ad
Fixed
b741414a94a7196454456ea46e5e08798e98d252
Fixed
7cc639dc45c5d3b69acb2a2fc834e9eec51e0214

Database specific

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

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
5.8.0
Fixed
5.10.275
Type
ECOSYSTEM
Events
Introduced
5.11.0
Fixed
5.15.226
Type
ECOSYSTEM
Events
Introduced
5.16.0
Fixed
6.1.193
Type
ECOSYSTEM
Events
Introduced
6.2.0
Fixed
6.6.163
Type
ECOSYSTEM
Events
Introduced
6.7.0
Fixed
6.12.119
Type
ECOSYSTEM
Events
Introduced
6.13.0
Fixed
6.18.65
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-139302.json"