CVE-2026-142893: bpf: Fix out-of-bounds btf->types write for split BTF

Published Dec 3, 2026
·
Updated

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

bpf: Fix out-of-bounds btf->types write for split BTF

btfaddtype() stores the types of a BTF in btf->types[], which can hold at most BTFMAXTYPE entries. The types of a split BTF get IDs startid .. startid + nrtypes - 1, so only BTFMAXTYPE - startid of them fit, but neither the limit check nor the size used to grow the array accounts for startid: the check is an equality test against BTFMAXTYPE ('startid + btf->typessize == BTFMAXTYPE') and the new size is clamped to BTFMAXTYPE.

The check therefore only fires if the array happens to grow to exactly BTFMAXTYPE - startid entries. Otherwise, if the module has more than BTFMAXTYPE types, the array is filled up to BTFMAXTYPE entries. The next type that needs to be added reallocates the array to the same size, after which btf->typessize no longer equals btf->nrtypes and the growth path is not taken anymore, so every following type is written past the end of the array:

BUG: unable to handle page fault for address: ffffc90006200000 RIP: 0010:btfaddtype+0x74/0x270 Call Trace: btfcheckallmetas btfparsemodule

Bound both the array size and the limit check by BTFMAXTYPE - startid. Base BTF (startid == 0) is unaffected.

Affected Software

1 affected component
Linux Linux kernel

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Compensating control

    In btf_add_type() for split BTF, bound both the array size and the limit check by BTF_MAX_TYPE - start_id.

Event History

Dec 3, 2026
CVE Published
via MITRE·03:25 AM
Data Sourced
via MITRE·03:25 AM
Description

Frequently Asked Questions

1

Which systems are affected by this condition?

The condition applies when the kernel parses split BTF for a module whose type count exceeds the available BTF type-array capacity after accounting for the split BTF start ID. It is specifically associated with split BTF rather than ordinary BTF handling.

2

How can administrators identify a likely occurrence?

A failure may present as a kernel page fault in btf_add_type during module BTF parsing. The reported call trace includes btf_check_all_metas and btf_parse_module.

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