# CVE-2026-139309: bpf: Bound the nesting that the BTF show code follows

- 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:33.765Z
- Modified: 2026-11-30T14:18:55.047Z
- Assigned by: Linux

## Description

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

bpf: Bound the nesting that the BTF show code follows

btf_struct_show() and btf_array_show() recurse for every nested struct
and array.  MAX_RESOLVE_DEPTH bounds one resolve walk when BTF is loaded,
not the nesting: a member whose type is resolved already is not walked
again, so BTF that defines its types from the inside out can nest them as
deep as it has types.

Whoever may load BTF, with CAP_BPF or a BPF token, can give such a type
to the value of a map.  Reading the file of that map in bpffs then
overruns the kernel stack: with a few hundred levels the stack guard page
is hit and the kernel panics.

Stop at 32 levels.  That is MAX_RESOLVE_DEPTH, and __btf_show_indent()
has as many columns.  Nothing is shown for a member that lies deeper, and
the status becomes -E2BIG, which bpf_snprintf_btf() and
bpf_seq_printf_btf() return.  The types of an x86_64 defconfig kernel nest
14 deep.

(As written by CVE List.)

## Affected

- Linux Linux: from b00b8daec828dd59af7d1f7a42acd6e5867f80c6 before 3a59b5615c75bd737e1e5c93653c18522e773bfd; from b00b8daec828dd59af7d1f7a42acd6e5867f80c6 before be380aa90cabe89a93f8308017d8d9329e7bee74; from b00b8daec828dd59af7d1f7a42acd6e5867f80c6 before 223bd268d8a86711dd98610899486eb6e0889c67; from b00b8daec828dd59af7d1f7a42acd6e5867f80c6 before 4b6487fc895e70889f58db1291618e7cd390458b; from b00b8daec828dd59af7d1f7a42acd6e5867f80c6 before 1e1df9e7ae908e576cd32227b554fbfedfb51653; from b00b8daec828dd59af7d1f7a42acd6e5867f80c6 before 696b05fe5397637dee8c69deec988030b59e688d; from b00b8daec828dd59af7d1f7a42acd6e5867f80c6 before 72ea9edd9eae351ba1b32ab98be5cedc0fe6cb75; from b00b8daec828dd59af7d1f7a42acd6e5867f80c6 before 13ac7c05bc45d3445b580da186548dd3487fae4e; 4.18 (not affected: before 4.18; 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/3a59b5615c75bd737e1e5c93653c18522e773bfd>
- <https://git.kernel.org/stable/c/be380aa90cabe89a93f8308017d8d9329e7bee74>
- <https://git.kernel.org/stable/c/223bd268d8a86711dd98610899486eb6e0889c67>
- <https://git.kernel.org/stable/c/4b6487fc895e70889f58db1291618e7cd390458b>
- <https://git.kernel.org/stable/c/1e1df9e7ae908e576cd32227b554fbfedfb51653>
- <https://git.kernel.org/stable/c/696b05fe5397637dee8c69deec988030b59e688d>
- <https://git.kernel.org/stable/c/72ea9edd9eae351ba1b32ab98be5cedc0fe6cb75>
- <https://git.kernel.org/stable/c/13ac7c05bc45d3445b580da186548dd3487fae4e>

## Sources

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

---

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