CVE-2026-43070: bpf: Reset register ID for BPF_END value tracking
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
bpf: Reset register ID for BPF_END value tracking
When a register undergoes a BPF_END (byte swap) operation, its scalar value is mutated in-place. If this register previously shared a scalar ID with another register (e.g., after an r1 = r0 assignment), this tie must be broken.
Currently, the verifier misses resetting dst_reg->id to 0 for BPF_END. Consequently, if a conditional jump checks the swapped register, the verifier incorrectly propagates the learned bounds to the linked register, leading to false confidence in the linked register's value and potentially allowing out-of-bounds memory accesses.
Fix this by explicitly resetting dst_reg->id to 0 in the BPF_END case to break the scalar tie, similar to how BPF_NEG handles it via __mark_reg_known.
The Linux kernel CVE team has assigned CVE-2026-43070 to this issue.
Affected and fixed versions
===========================
Issue introduced in 6.18.17 with commit 4c03342e5ac532fb34d13a7b51dd7261dfc48963 and fixed in 6.18.21 with commit a17443af874229408ce6b78e2c8a2b5adeb4b7d8 Issue introduced in 6.19.7 with commit d00ce96623a69a100ad79675d0e85fda3c50d89b and fixed in 6.19.11 with commit 0d15c3611a2cc5d08993545d4032055ae10ae2c1
Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.
Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at
https://cve.org/CVERecord/?id=CVE-2026-43070
will be updated if fixes are backported, please check that for the most up to date information about this issue.
Affected files
==============
The file(s) affected by this issue are:
kernel/bpf/verifier.c
Mitigation
==========
The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:
https://git.kernel.org/stable/c/a17443af874229408ce6b78e2c8a2b5adeb4b7d8 https://git.kernel.org/stable/c/0d15c3611a2cc5d08993545d4032055ae10ae2c1 https://git.kernel.org/stable/c/a3125bc01884431d30d731461634c8295b6f0529