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
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| Linux | Linux | 5.12 | 6.1.191 |
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 14 | linux | 6.19.12-1 | — |
| Debian 13 | linux | 6.12.115-2 | — |
| Debian 12 | linux | No fix yet | — |
| Debian 12 | linux-6.12 | 6.12.115-2~deb12u1 | — |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu Nvidia-BlueField 24.04 LTS | linux-bluefield | No fix yet | — |
| Ubuntu Nvidia-BlueField 22.04 LTS | linux-bluefield | No fix yet | — |
| Ubuntu 26.04 LTS | linux-nvidia | 7.0.0-1006.6 | — |
| Ubuntu 25.10 | linux +8 | No fix yet | — |
| Ubuntu 24.04 LTS | linux +43 | No fix yet | — |
| Ubuntu 24.04 LTS | linux-nvidia-tegra | 6.8.0-1035.38 | USN-8781-1 |
Show 10 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 22.04 LTS | linux +59 | No fix yet | — |
| Ubuntu 20.04 LTS | linux-gke +28 | No fix yet | — |
| Ubuntu 18.04 LTS | linux-gcp +14 | No fix yet | — |
| Ubuntu 16.04 LTS | linux-hwe-edge | No fix yet | — |
| Ubuntu Pro Realtime 24.04 LTS | linux-realtime +3 | No fix yet | — |
| Ubuntu Pro Realtime 22.04 LTS | linux-realtime +2 | No fix yet | — |
| Ubuntu Pro FIPS-updates 24.04 LTS | linux-fips +3 | No fix yet | — |
| Ubuntu Pro FIPS-updates 22.04 LTS | linux-fips +3 | No fix yet | — |
| Ubuntu Pro FIPS-preview 22.04 LTS | linux-fips +3 | No fix yet | — |
| Ubuntu Pro 20.04 LTS | linux-aws-5.15 +10 | No fix yet | — |
SUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| SLES 15 SP7 | kernel-64kb +7 | 6.4.0-150700.53.55.1 | SUSE-SU-2026:2482-1, SUSE-SU-2026:2238-1 |
| SLES 15 SP7 | kernel-default-base | 6.4.0-150700.53.55.1.150700.17.33.1 | SUSE-SU-2026:2482-1, SUSE-SU-2026:2238-1 |
Show 5 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| SLES for SAP 16.0 | kernel-64kb +8 | 6.12.0-160000.34.1 | SUSE-SU-2026:22087-1 |
| SLES for SAP 16.0 | kernel-default-base | 6.12.0-160000.34.1.160000.2.15 | SUSE-SU-2026:22087-1 |
| SLES 16.0 | kernel-64kb +8 | 6.12.0-160000.34.1 | SUSE-SU-2026:22087-1, SUSE-SU-2026:22076-1 |
| SLES 16.0 | kernel-default-base | 6.12.0-160000.34.1.160000.2.15 | SUSE-SU-2026:22087-1 |
| SLE Micro 6.2 | kernel-default-base | 6.12.0-160000.34.1.160000.2.15 | SUSE-SU-2026:22048-1 |
| SLE Micro 6.2 | kernel-rt +3 | 6.12.0-160000.34.1 | SUSE-SU-2026:22048-1 |
| SLE Micro 6.2 | kernel-syms +1 | 6.12.0-160000.33.1 | SUSE-SU-2026:22043-1, SUSE-SU-2026:21834-1 |
| SLE Live Patching 15 SP7 | kernel-default | 6.4.0-150700.53.55.1 | SUSE-SU-2026:2482-1, SUSE-SU-2026:2238-1 |
| SLE Live Patching 15 SP7 | kernel-livepatch-SLE15-SP7-RT_Update_16 | 1-150700.1.5.2 | SUSE-SU-2026:2591-1 |
| SLE Live Patching 15 SP7 | kernel-livepatch-SLE15-SP7_Update_15 | 1-150700.15.3.1 | SUSE-SU-2026:2238-1 |
| SLE Live Patching 15 SP7 | kernel-livepatch-SLE15-SP7_Update_16 | 1-150700.15.3.2 | SUSE-SU-2026:2482-1 |
| SUSE Real Time Module 15 SP7 | kernel-rt +1 | 6.4.0-150700.7.59.2 | SUSE-SU-2026:2591-1 |
| SUSE Real Time Module 15 SP7 | kernel-syms-rt | 6.4.0-150700.7.59.1 | SUSE-SU-2026:2591-1 |
Azure Linux
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Azure Linux 3 | kernel | No fix yet | — |
Advisories 10
- WID-SEC-2026-1346 Linux Kernel: Mehrere Schwachstellen BSI CERT-Bund (WID) · Nov 12, 2026
- USN-8781-1 linux-nvidia-tegra vulnerabilities Ubuntu Security Notices (USN) · Nov 9, 2026
- SUSE-SU-2026:21834-1 Security update for the Linux Kernel SUSE / openSUSE Security Updates · Jul 9, 2026
- SUSE-SU-2026:22043-1 Security update for the Linux Kernel SUSE / openSUSE Security Updates · Jul 9, 2026
- SUSE-SU-2026:2238-1 Security update for the Linux Kernel SUSE / openSUSE Security Updates · Jul 1, 2026
- SUSE-SU-2026:2591-1 Security update for the Linux Kernel SUSE / openSUSE Security Updates · Jun 24, 2026
- SUSE-SU-2026:2482-1 Security update for the Linux Kernel SUSE / openSUSE Security Updates · Jun 24, 2026
- SUSE-SU-2026:22087-1 Security update for the Linux Kernel SUSE / openSUSE Security Updates · Jun 16, 2026
- SUSE-SU-2026:22076-1 Security update for the Linux Kernel SUSE / openSUSE Security Updates · Jun 16, 2026
- SUSE-SU-2026:22048-1 Security update for the Linux Kernel SUSE / openSUSE Security Updates · Jun 10, 2026
References
- https://git.kernel.org/stable/c/06999c8a2c52b13977771ab093b8e179821b532d
- https://git.kernel.org/stable/c/1aac6b271e0a80b91c2f6a8f75ab0c0b1fc8ffe8
- https://git.kernel.org/stable/c/7c72e5f3741d1c5cc53439137162f0e09254e6e9
- https://git.kernel.org/stable/c/ea150ffa9fc9f78c5cf22e1f7b06b6d016b1017c
- https://git.kernel.org/stable/c/7ffbe45b1d227e24659998a91cfd4c27af457e71
- https://git.kernel.org/stable/c/179ee84a89114b854ac2dd1d293633a7f6c8dac1