Kernel Kit / Infix / v26.10.0latest
CVE-2026-43009
7.8highlinux6.18.60 · 6.18.54 · 6.18.8 · 6.12.21in 4 of 4 releases
Reach linux · 8 builds in 4 of 4 releases
full reviewcross-check✓ a member decided
Description · NVD
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
Published 2026-05-01NVD
CVSS 3.1Local · low privileges · no user interaction
How it is reached
- Attack vector
- Local
- Attack complexity
- Low
- Privileges required
- Low
- User interaction
- None
What it costs
- Confidentiality
- High
- Integrity
- High
- Availability
- High
- Scope
- Unchanged
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
References 6
- git.kernel.org/stable/c/06999c8a2c52b13977771ab093b8e179821b532d
- git.kernel.org/stable/c/179ee84a89114b854ac2dd1d293633a7f6c8dac1
- git.kernel.org/stable/c/1aac6b271e0a80b91c2f6a8f75ab0c0b1fc8ffe8
- git.kernel.org/stable/c/7c72e5f3741d1c5cc53439137162f0e09254e6e9
- git.kernel.org/stable/c/7ffbe45b1d227e24659998a91cfd4c27af457e71
- git.kernel.org/stable/c/ea150ffa9fc9f78c5cf22e1f7b06b6d016b1017c
Fable 5.1 · high confidence · 2026-11-05
The upstream fix for CVE-2026-43009 is already present in the linux 6.18.60 source used by this build: kernel/bpf/verifier.c contains the is_atomic_fetch_insn() helper (line 628) and backtrack_insn() handles atomic fetch instructions alongside BPF_LDX, clearing the fetch destination register (sreg, or r0 for BPF_CMPXCHG) and propagating precision to the stack slot (lines ~4359-4397), exactly as the fix commit describes. This is a stable backport that NVD's version range for 6.18.60 does not reflect.
BPF_SYSCALL is compiled in (verifier.o produced), but since the vulnerable code is not in this build, reachability is moot.
Evidence 6
Helper introduced by the fix commit is present: matches BPF_STX | BPF_ATOMIC with imm & BPF_FETCH.
output/build/linux-6.18.60/kernel/bpf/verifier.c:628-633 (is_atomic_fetch_insn)
LDX branch extended with `|| is_atomic_fetch_insn(insn)`, sets load_reg = (imm == BPF_CMPXCHG ? BPF_REG_0 : sreg), clears it, and calls bt_set_frame_slot() for stack accesses — the fixed logic.
output/build/linux-6.18.60/kernel/bpf/verifier.c:4359-4397 (backtrack_insn)
Kernel version is 6.18.60 (VERSION=6, PATCHLEVEL=18, SUBLEVEL=60).
output/build/linux-6.18.60/Makefile:1-4
BPF verifier is compiled in; unprivileged BPF disabled by default. Noted for context only, since the fix is present.
output/build/linux-6.18.60/.config (CONFIG_BPF_SYSCALL=y, CONFIG_BPF_JIT=y, CONFIG_BPF_UNPRIV_DEFAULT_OFF=y)
kernel/bpf/verifier.o was built, confirming the file (with the fix) is what ships.
output/objects.txt:21936
No Infix patch touches kernel/bpf/verifier.c; the fix comes from the upstream 6.18.60 stable source itself, not a local patch.
output/build/linux-6.18.60/.applied_patches_list
Version and patches
CVE fixed upstream via stable backports (referenced commits 06999c8a..., 179ee84a..., 1aac6b27..., 7c72e5f3..., 7ffbe45b..., ea150ffa...). The 6.18.60 source in this tree already contains the fixed backtrack_insn() code with is_atomic_fetch_insn(); NVD's CPE match on 6.18.60 is stale relative to the stable backport. No Infix patches are relevant (only 0079-net-sparx5-fix-sleep-in-atomic-context matches "atomic" and is unrelated).
Recommendation
No action; document as N/A (fix already present in linux 6.18.60 stable source).
Open questions
None. The exact stable commit ID that landed in 6.18.x could not be confirmed from the tarball (no git history), but the code hunk matches the fix description exactly.
Members of Kernel Kit decide. Sign in if you are one.