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

State
Published
Severity
Not Scored
Published
Nov 30, 2026
Updated
Nov 30, 2026
Reserved
Nov 30, 2026

Read the record on cve.org

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.

ProductVersions
Linux Linux15d83c4d7cef5c067a8b075ce59e97df4f60706e to before 46a8a2acca26616f8445af133f32d7740332fdc0 Affected15d83c4d7cef5c067a8b075ce59e97df4f60706e to before afd54a08a29406fb3d8ea8e828bdb5d1e4862088 Affected15d83c4d7cef5c067a8b075ce59e97df4f60706e to before e8b7f9151e465c4ab5e712f84041b0cf3b90425b Affected15d83c4d7cef5c067a8b075ce59e97df4f60706e to before d7a76b9b807349c3057beccd574fcd0aec2c773b Affected15d83c4d7cef5c067a8b075ce59e97df4f60706e to before 061c4649fa49ed80e3f3ac872665230cb6fa898c Affected15d83c4d7cef5c067a8b075ce59e97df4f60706e to before 1b79f322cbfb59d920b102a18efdd14f17e3d5ad Affected15d83c4d7cef5c067a8b075ce59e97df4f60706e to before b741414a94a7196454456ea46e5e08798e98d252 Affected15d83c4d7cef5c067a8b075ce59e97df4f60706e to before 7cc639dc45c5d3b69acb2a2fc834e9eec51e0214 Affected
Linux Linux5.8 Affectedbefore 5.8 Not Affected5.10.275 through 5.10.* Not Affected5.15.226 through 5.15.* Not Affected6.1.193 through 6.1.* Not Affected6.6.163 through 6.6.* Not Affected6.12.119 through 6.12.* Not Affected6.18.65 through 6.18.* Not Affected7.3.6 through 7.3.* Not Affected7.4-rc1 and later Not Affected

Weaknesses

The record names no weakness.

References

Every record here comes from the CVE Program's CVE List. © 1999-2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.

© 2026 NVIDIA, the NVIDIA logo, and NVIDIA Inception are trademarks and/or registered trademarks of NVIDIA Corporation in the U.S. and other countries.