CVE-2026-139205: bpf: Propagate btf_add_type() errors in btf_check_all_metas()

Published Nov 30, 2026
·
Updated

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

bpf: Propagate btfaddtype() errors in btfcheckallmetas()

btfcheckallmetas() ignores the return value of btfaddtype(), so a type that could not be registered is silently dropped while the loop keeps walking over the type section.

Both failure modes are reachable:

- -E2BIG. Once the types array reaches its capacity (BTFMAXTYPE), every following btfaddtype() fails the same way, so btfcheckallmetas() still returns 0 and the BTF object is created with btf->nrtypes capped while hdr->typelen claims more records.

- -ENOMEM. btf->nrtypes is not incremented and the array is not grown, so the next type is recorded at the slot of the dropped one and btf->types[] stays off by one with respect to the type ids for all remaining types. btftypebyid() then returns the wrong type for those ids for the whole lifetime of the object, and the last type is silently left unresolved.

Propagate the error so that the object is rejected instead.

Affected Software

1 affected component
Linux Linux kernel

Event History

Nov 30, 2026
CVE Published
via MITRE·01:32 PM
Data Sourced
via MITRE·01:32 PM
Description

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203