VYPR
High severity7.8NVD Advisory· Published May 1, 2026· Updated May 7, 2026

CVE-2026-43009

CVE-2026-43009

Description

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

bpf: Fix incorrect pruning due to atomic fetch precision tracking

When backtrack_insn encounters a BPF_STX instruction with BPF_ATOMIC and BPF_FETCH, the src register (or r0 for BPF_CMPXCHG) also acts as a destination, thus receiving the old value from the memory location.

The current backtracking logic does not account for this. It treats atomic fetch operations the same as regular stores where the src register is only an input. This leads the backtrack_insn to fail to propagate precision to the stack location, which is then not marked as precise!

Later, the verifier's path pruning can incorrectly consider two states equivalent when they differ in terms of stack state. Meaning, two branches can be treated as equivalent and thus get pruned when they should not be seen as such.

Fix it as follows: Extend the BPF_LDX handling in backtrack_insn to also cover atomic fetch operations via is_atomic_fetch_insn() helper. When the fetch dst register is being tracked for precision, clear it, and propagate precision over to the stack slot. For non-stack memory, the precision walk stops at the atomic instruction, same as regular BPF_LDX. This covers all fetch variants.

Before:

0: (b7) r1 = 8 ; R1=8 1: (7b) *(u64 *)(r10 -8) = r1 ; R1=8 R10=fp0 fp-8=8 2: (b7) r2 = 0 ; R2=0 3: (db) r2 = atomic64_fetch_add((u64 *)(r10 -8), r2) ; R2=8 R10=fp0 fp-8=mmmmmmmm 4: (bf) r3 = r10 ; R3=fp0 R10=fp0 5: (0f) r3 += r2 mark_precise: frame0: last_idx 5 first_idx 0 subseq_idx -1 mark_precise: frame0: regs=r2 stack= before 4: (bf) r3 = r10 mark_precise: frame0: regs=r2 stack= before 3: (db) r2 = atomic64_fetch_add((u64 *)(r10 -8), r2) mark_precise: frame0: regs=r2 stack= before 2: (b7) r2 = 0 6: R2=8 R3=fp8 6: (b7) r0 = 0 ; R0=0 7: (95) exit

After:

0: (b7) r1 = 8 ; R1=8 1: (7b) *(u64 *)(r10 -8) = r1 ; R1=8 R10=fp0 fp-8=8 2: (b7) r2 = 0 ; R2=0 3: (db) r2 = atomic64_fetch_add((u64 *)(r10 -8), r2) ; R2=8 R10=fp0 fp-8=mmmmmmmm 4: (bf) r3 = r10 ; R3=fp0 R10=fp0 5: (0f) r3 += r2 mark_precise: frame0: last_idx 5 first_idx 0 subseq_idx -1 mark_precise: frame0: regs=r2 stack= before 4: (bf) r3 = r10 mark_precise: frame0: regs=r2 stack= before 3: (db) r2 = atomic64_fetch_add((u64 *)(r10 -8), r2) mark_precise: frame0: regs= stack=-8 before 2: (b7) r2 = 0 mark_precise: frame0: regs= stack=-8 before 1: (7b) *(u64 *)(r10 -8) = r1 mark_precise: frame0: regs=r1 stack= before 0: (b7) r1 = 8 6: R2=8 R3=fp8 6: (b7) r0 = 0 ; R0=0 7: (95) exit

AI Insight

LLM-synthesized narrative grounded in this CVE's description and references.

In the Linux kernel, BPF verifier backtracking fails to mark stack slots precise after atomic fetch instructions, leading to incorrect path pruning and potential security bypass.

Root

Cause

The vulnerability lies in the Linux kernel's BPF verifier, specifically in the backtrack_insn function. When processing a BPF_STX instruction with BPF_ATOMIC and BPF_FETCH (e.g., atomic64_fetch_add), the destination register (src register r2 in the example) receives the old value from memory, acting as both input and output. However, the backtracking logic incorrectly treats this as a regular store, where the source register is only an input. This causes the verifier to fail to propagate precision to the associated stack slot, leaving it unmarked as precise [1][2].

Exploitation

An attacker who can load and execute a crafted BPF program (requiring CAP_BPF or CAP_SYS_ADMIN) can exploit this flaw. By constructing a program that uses an atomic fetch operation on a stack slot, the verifier may incorrectly prune a path that should be considered distinct. The example in the commit shows a sequence where after the atomic fetch, the verifier fails to mark the stack slot as precise, leading to a state equivalence check that can be fooled [1][2].

Impact

Successful exploitation could allow an attacker to bypass BPF verifier security checks, potentially leading to arbitrary memory corruption or information disclosure. The incorrect pruning may permit the execution of BPF programs that violate safety invariants, which could be leveraged for privilege escalation or other attacks within the kernel context [1][2].

Mitigation

The fix extends the BPF_LDX handling in backtrack_insn to cover atomic fetch operations via the is_atomic_fetch_insn() helper. When the helper. When the fetch destination register is tracked for precision, the verifier now clears it and propagates precision to the stack slot. For non-stack memory, the precision walk stops at the atomic instruction, similar to regular BPF_LDX. The patch has been applied to the stable kernel trees [1][2].

AI Insight generated on May 18, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.

Affected products

8
  • Linux/Kernelinferred8 versions
    (expand)+ 7 more
    • (no CPE)
    • cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*range: >=5.12,<6.19.12
    • cpe:2.3:o:linux:linux_kernel:7.0:rc1:*:*:*:*:*:*
    • cpe:2.3:o:linux:linux_kernel:7.0:rc2:*:*:*:*:*:*
    • cpe:2.3:o:linux:linux_kernel:7.0:rc3:*:*:*:*:*:*
    • cpe:2.3:o:linux:linux_kernel:7.0:rc4:*:*:*:*:*:*
    • cpe:2.3:o:linux:linux_kernel:7.0:rc5:*:*:*:*:*:*
    • cpe:2.3:o:linux:linux_kernel:7.0:rc6:*:*:*:*:*:*

Patches

0

No patches discovered yet.

Vulnerability mechanics

AI mechanics synthesis has not run for this CVE yet.

News mentions

1