# CVE-2026-139302: bpf: Don't take an extension for an iterator program

- 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 12% of CVEs (2026-12-01)
- Published: 2026-11-30T13:33:29.946Z
- Modified: 2026-11-30T14:18:54.200Z
- Assigned by: Linux

## Description

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.

(As written by CVE List.)

## Affected

- Linux Linux: from 15d83c4d7cef5c067a8b075ce59e97df4f60706e before 46a8a2acca26616f8445af133f32d7740332fdc0; from 15d83c4d7cef5c067a8b075ce59e97df4f60706e before afd54a08a29406fb3d8ea8e828bdb5d1e4862088; from 15d83c4d7cef5c067a8b075ce59e97df4f60706e before e8b7f9151e465c4ab5e712f84041b0cf3b90425b; from 15d83c4d7cef5c067a8b075ce59e97df4f60706e before d7a76b9b807349c3057beccd574fcd0aec2c773b; from 15d83c4d7cef5c067a8b075ce59e97df4f60706e before 061c4649fa49ed80e3f3ac872665230cb6fa898c; from 15d83c4d7cef5c067a8b075ce59e97df4f60706e before 1b79f322cbfb59d920b102a18efdd14f17e3d5ad; from 15d83c4d7cef5c067a8b075ce59e97df4f60706e before b741414a94a7196454456ea46e5e08798e98d252; from 15d83c4d7cef5c067a8b075ce59e97df4f60706e before 7cc639dc45c5d3b69acb2a2fc834e9eec51e0214; 5.8 (not affected: before 5.8; from 5.10.275 up to 5.10.*; from 5.15.226 up to 5.15.*; from 6.1.193 up to 6.1.*; from 6.6.163 up to 6.6.*; from 6.12.119 up to 6.12.*; from 6.18.65 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/46a8a2acca26616f8445af133f32d7740332fdc0>
- <https://git.kernel.org/stable/c/afd54a08a29406fb3d8ea8e828bdb5d1e4862088>
- <https://git.kernel.org/stable/c/e8b7f9151e465c4ab5e712f84041b0cf3b90425b>
- <https://git.kernel.org/stable/c/d7a76b9b807349c3057beccd574fcd0aec2c773b>
- <https://git.kernel.org/stable/c/061c4649fa49ed80e3f3ac872665230cb6fa898c>
- <https://git.kernel.org/stable/c/1b79f322cbfb59d920b102a18efdd14f17e3d5ad>
- <https://git.kernel.org/stable/c/b741414a94a7196454456ea46e5e08798e98d252>
- <https://git.kernel.org/stable/c/7cc639dc45c5d3b69acb2a2fc834e9eec51e0214>

## Sources

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

---

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