Description
In the Linux kernel, the following vulnerability has been resolved:
bpf: Propagate btf_add_type() errors in btf_check_all_metas()
btf_check_all_metas() ignores the return value of btf_add_type(), 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 (BTF_MAX_TYPE),
every following btf_add_type() fails the same way, so
btf_check_all_metas() still returns 0 and the BTF object is created
with btf->nr_types capped while hdr->type_len claims more records.
- -ENOMEM. btf->nr_types 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. btf_type_by_id() 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.
bpf: Propagate btf_add_type() errors in btf_check_all_metas()
btf_check_all_metas() ignores the return value of btf_add_type(), 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 (BTF_MAX_TYPE),
every following btf_add_type() fails the same way, so
btf_check_all_metas() still returns 0 and the BTF object is created
with btf->nr_types capped while hdr->type_len claims more records.
- -ENOMEM. btf->nr_types 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. btf_type_by_id() 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.
Published:
2026-11-30
Score:
n/a
EPSS:
n/a
KEV:
No
Impact:
n/a
Action:
n/a
Analysis and contextual insights are available on OpenCVE Cloud.
Remediation
No vendor fix or workaround currently provided.
Additional remediation guidance may be available on OpenCVE Cloud.
Tracking
Sign in to view the affected projects.
Advisories
No advisories yet.
References
History
Mon, 30 Nov 2026 14:00:00 +0000
| Type | Values Removed | Values Added |
|---|---|---|
| Description | In the Linux kernel, the following vulnerability has been resolved: bpf: Propagate btf_add_type() errors in btf_check_all_metas() btf_check_all_metas() ignores the return value of btf_add_type(), 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 (BTF_MAX_TYPE), every following btf_add_type() fails the same way, so btf_check_all_metas() still returns 0 and the BTF object is created with btf->nr_types capped while hdr->type_len claims more records. - -ENOMEM. btf->nr_types 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. btf_type_by_id() 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. | |
| Title | bpf: Propagate btf_add_type() errors in btf_check_all_metas() | |
| First Time appeared |
Linux
Linux linux Kernel |
|
| CPEs | cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | |
| Vendors & Products |
Linux
Linux linux Kernel |
|
| References |
|
|
Status: PUBLISHED
Assigner: Linux
Published:
Updated: 2026-11-30T13:32:33.128Z
Reserved: 2026-11-30T13:22:15.920Z
Link: CVE-2026-139205
No data.
Status : Received
Published: 2026-11-30T14:18:40.350
Modified: 2026-11-30T14:18:40.350
Link: CVE-2026-139205
No data.
OpenCVE Enrichment
No data.
Weaknesses
No weakness.