CVE-2026-139309
bpf: Bound the nesting that the BTF show code follows
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.
INFO
Published Date :
Nov. 30, 2026, 2:18 p.m.
Last Modified :
Nov. 30, 2026, 2:18 p.m.
Remotely Exploit :
No
Source :
416baaa9-dc9f-4396-8d5f-8c081fb06d67
Solution
- Apply the kernel patch to limit BTF nesting.
- Ensure BTF resolution depth does not exceed limits.
- Update affected Linux kernel versions.
References to Advisories, Solutions, and Tools
Here, you will find a curated list of external links that provide in-depth
information, practical solutions, and valuable tools related to
CVE-2026-139309.
CWE - Common Weakness Enumeration
While CVE identifies
specific instances of vulnerabilities, CWE categorizes the common flaws or
weaknesses that can lead to vulnerabilities. CVE-2026-139309 is
associated with the following CWEs:
Common Attack Pattern Enumeration and Classification (CAPEC)
Common Attack Pattern Enumeration and Classification
(CAPEC)
stores attack patterns, which are descriptions of the common attributes and
approaches employed by adversaries to exploit the CVE-2026-139309
weaknesses.
We scan GitHub repositories to detect new proof-of-concept exploits. Following list is a collection of public exploits and proof-of-concepts, which have been published on GitHub (sorted by the most recently updated).
Results are limited to the first 15 repositories due to potential performance issues.
The following list is the news that have been mention
CVE-2026-139309 vulnerability anywhere in the article.
The following table lists the changes that have been made to the
CVE-2026-139309 vulnerability over time.
Vulnerability history details can be useful for understanding the evolution of a vulnerability, and for identifying the most recent changes that may impact the vulnerability's severity, exploitability, or other characteristics.
-
New CVE Received by 416baaa9-dc9f-4396-8d5f-8c081fb06d67
Nov. 30, 2026
Action Type Old Value New Value Added 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. Added Affected New affected value received. <a href="https://github.com/CVEProject/cvelistV5/blob/main/cves/2026/139xxx/CVE-2026-139309.json">CVE-2026-139309</a> Added Reference https://git.kernel.org/stable/c/13ac7c05bc45d3445b580da186548dd3487fae4e Added Reference https://git.kernel.org/stable/c/1e1df9e7ae908e576cd32227b554fbfedfb51653 Added Reference https://git.kernel.org/stable/c/223bd268d8a86711dd98610899486eb6e0889c67 Added Reference https://git.kernel.org/stable/c/3a59b5615c75bd737e1e5c93653c18522e773bfd Added Reference https://git.kernel.org/stable/c/4b6487fc895e70889f58db1291618e7cd390458b Added Reference https://git.kernel.org/stable/c/696b05fe5397637dee8c69deec988030b59e688d Added Reference https://git.kernel.org/stable/c/72ea9edd9eae351ba1b32ab98be5cedc0fe6cb75 Added Reference https://git.kernel.org/stable/c/be380aa90cabe89a93f8308017d8d9329e7bee74