bpf: Bound the nesting that the BTF show code follows

Summary

CVECVE-2026-139309
StatePUBLISHED
AssignerLinux
Source PriorityCVE Program / NVD first with legacy fallback
Published2026-11-30 14:18:55 UTC
Updated2026-11-30 14:18:55 UTC
DescriptionIn 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.

Vendor Declared Affected Products

SourceVendorProductVersionPlatforms
CNA Linux Linux affected b00b8daec828dd59af7d1f7a42acd6e5867f80c6 3a59b5615c75bd737e1e5c93653c18522e773bfd git Not specified
CNA Linux Linux affected b00b8daec828dd59af7d1f7a42acd6e5867f80c6 be380aa90cabe89a93f8308017d8d9329e7bee74 git Not specified
CNA Linux Linux affected b00b8daec828dd59af7d1f7a42acd6e5867f80c6 223bd268d8a86711dd98610899486eb6e0889c67 git Not specified
CNA Linux Linux affected b00b8daec828dd59af7d1f7a42acd6e5867f80c6 4b6487fc895e70889f58db1291618e7cd390458b git Not specified
CNA Linux Linux affected b00b8daec828dd59af7d1f7a42acd6e5867f80c6 1e1df9e7ae908e576cd32227b554fbfedfb51653 git Not specified
CNA Linux Linux affected b00b8daec828dd59af7d1f7a42acd6e5867f80c6 696b05fe5397637dee8c69deec988030b59e688d git Not specified
CNA Linux Linux affected b00b8daec828dd59af7d1f7a42acd6e5867f80c6 72ea9edd9eae351ba1b32ab98be5cedc0fe6cb75 git Not specified
CNA Linux Linux affected b00b8daec828dd59af7d1f7a42acd6e5867f80c6 13ac7c05bc45d3445b580da186548dd3487fae4e git Not specified
CNA Linux Linux affected 4.18 Not specified
CNA Linux Linux unaffected 4.18 semver Not specified
CNA Linux Linux unaffected 5.10.275 5.10.* semver Not specified
CNA Linux Linux unaffected 5.15.226 5.15.* semver Not specified
CNA Linux Linux unaffected 6.1.193 6.1.* semver Not specified
CNA Linux Linux unaffected 6.6.163 6.6.* semver Not specified
CNA Linux Linux unaffected 6.12.119 6.12.* semver Not specified
CNA Linux Linux unaffected 6.18.65 6.18.* semver Not specified
CNA Linux Linux unaffected 7.3.6 7.3.* semver Not specified
CNA Linux Linux unaffected 7.4-rc1 * original_commit_for_fix Not specified

References

ReferenceSourceLinkTags
git.kernel.org/stable/c/13ac7c05bc45d3445b580da186548dd3487fae4e 416baaa9-dc9f-4396-8d5f-8c081fb06d67 git.kernel.org
git.kernel.org/stable/c/be380aa90cabe89a93f8308017d8d9329e7bee74 416baaa9-dc9f-4396-8d5f-8c081fb06d67 git.kernel.org
git.kernel.org/stable/c/3a59b5615c75bd737e1e5c93653c18522e773bfd 416baaa9-dc9f-4396-8d5f-8c081fb06d67 git.kernel.org
git.kernel.org/stable/c/1e1df9e7ae908e576cd32227b554fbfedfb51653 416baaa9-dc9f-4396-8d5f-8c081fb06d67 git.kernel.org
git.kernel.org/stable/c/223bd268d8a86711dd98610899486eb6e0889c67 416baaa9-dc9f-4396-8d5f-8c081fb06d67 git.kernel.org
git.kernel.org/stable/c/696b05fe5397637dee8c69deec988030b59e688d 416baaa9-dc9f-4396-8d5f-8c081fb06d67 git.kernel.org
git.kernel.org/stable/c/4b6487fc895e70889f58db1291618e7cd390458b 416baaa9-dc9f-4396-8d5f-8c081fb06d67 git.kernel.org
git.kernel.org/stable/c/72ea9edd9eae351ba1b32ab98be5cedc0fe6cb75 416baaa9-dc9f-4396-8d5f-8c081fb06d67 git.kernel.org
CVE Program record CVE.ORG www.cve.org canonical
NVD vulnerability detail NVD nvd.nist.gov canonical, analysis

© CVE.report 2026

Use of this information constitutes acceptance for use in an AS IS condition. There are NO warranties, implied or otherwise, with regard to this information or its use. Any use of this information is at the user's risk. It is the responsibility of user to evaluate the accuracy, completeness or usefulness of any information, opinion, advice or other content. EACH USER WILL BE SOLELY RESPONSIBLE FOR ANY consequences of his or her direct or indirect use of this web site. ALL WARRANTIES OF ANY KIND ARE EXPRESSLY DISCLAIMED. This site will NOT BE LIABLE FOR ANY DIRECT, INDIRECT or any other kind of loss.

CVE, CWE, and OVAL are registred trademarks of The MITRE Corporation and the authoritative source of CVE content is MITRE's CVE web site. This site includes MITRE data granted under the following license.

Free CVE JSON API cve.report/api

CVE.report and Source URL Uptime Status status.cve.report