CVE-2026-53081

bpf: Enforce regsafe base id consistency for BPF_ADD_CONST scalars

State
Published
Severity
7.8 High
Published
Jun 24, 2026
Updated
Oct 19, 2026
Reserved
Jun 9, 2026

Read the record on cve.org

Description

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

bpf: Enforce regsafe base id consistency for BPF_ADD_CONST scalars

When regsafe() compares two scalar registers that both carry BPF_ADD_CONST, check_scalar_ids() maps their full compound id (aka base | BPF_ADD_CONST flag) as one idmap entry. However, it never verifies that the underlying base ids, that is, with the flag stripped are consistent with existing idmap mappings.

This allows construction of two verifier states where the old state has R3 = R2 + 10 (both sharing base id A) while the current state has R3 = R4 + 10 (base id C, unrelated to R2). The idmap creates two independent entries: A->B (for R2) and A|flag->C|flag (for R3), without catching that A->C conflicts with A->B. State pruning then incorrectly succeeds.

Fix this by additionally verifying base ID mapping consistency whenever BPF_ADD_CONST is set: after mapping the compound ids, also invoke check_ids() on the base IDs (flag bits stripped). This ensures that if A was already mapped to B from comparing the source register, any ADD_CONST derivative must also derive from B, not an unrelated C.

Scores

CVSSScoreVectorSource
3.17.8 HighCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:HLinux
3.16.4 MediumCVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:U/C:H/I:H/A:Hredhat-SADP

Weaknesses

  • CWE-386 Symbolic Name not Mapping to Correct Object

Affected Products

ProductVersions
LinuxLinux
  • 98d7ca374ba4b39e7535613d40e159f09ca14da2 to before 13c02881e49aac4c82b261faa26db9edf2567231Affected
  • 98d7ca374ba4b39e7535613d40e159f09ca14da2 to before 691adf738817275368ed56311b7d798d617823a3Affected
  • 98d7ca374ba4b39e7535613d40e159f09ca14da2 to before 7d73c72cccac651acc891377a5e623e4021c6380Affected
  • 98d7ca374ba4b39e7535613d40e159f09ca14da2 to before 2f2ec8e7730e21fc9bd49e0de9cdd58213ea24d0Affected
LinuxLinux
  • 6.11Affected
  • before 6.11Not affected
  • 6.12.91 through 6.12.*Not affected
  • 6.18.33 through 6.18.*Not affected
  • 7.0.10 through 7.0.*Not affected
  • 7.1 and laterNot affected

References

Every record here comes from the CVE Program’s CVE List. © 1999–2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.