CVE-2026-139620: bpf: Fix uninit read for non-fetch atomics on partially spilled slots

Published Nov 30, 2026
·
Updated

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

bpf: Fix uninit read for non-fetch atomics on partially spilled slots

checkstackreadfixedoff() skips partial spill checks for non-fetch atomics; the following prog can be loaded:

0: (b7) r1 = 1 ; R1=1 1: (63) (u32 )(r10 -8) = r1 ; R1=1 R10=fp0 fp-8=????1 2: (db) lock (u64 )(r10 -8) += r1 ; R1=1 R10=fp0 fp-8=mmmmmmmm 3: (79) r0 = (u64 )(r10 -8) ; R0=scalar() R10=fp0 fp-8=mmmmmmmm 4: (77) r0 >>= 32 ; R0=scalar(smin=0,smax=umax=0xffffffff,varoff=(0x0; 0xffffffff)) 5: (95) exit

When test run: retval=4294967295

Note fp-8 is ????1 at #1, yet it becomes fp-8=mmmmmmmm after the non-fetching atomic add at #2; hence the high 32 bits are leaked.

Fix by applying the partial load check; after the patch, the prog is rejected:

Verification failed: Memory Safety: Uninitialized stack read

Reason: This rejected read uses 8 bytes at stack offset -8, but byte 4 in that range is uninitialized on this path. Programs loaded with CAPPERFMON can be allowed to read uninitialized stack bytes, but this program is being rejected without that allowance.

At: ... 0 | (b7) r1 = 1 1 | (63) (u32 )(r10 -8) = r1 >>> 2 | (db) lock (u64 )(r10 -8) += r1 3 | (79) r0 = (u64 )(r10 -8) 4 | (77) r0 >>= 32

This affects CAPBPF only.

Affected Software

1 affected component
Linux Linux kernel

Event History

Nov 30, 2026
CVE Published
via MITRE·01:36 PM
Data Sourced
via MITRE·01:36 PM
Description
Data Sourced
via NVD·02:19 PM
Description

Frequently Asked Questions

1

What access does an attacker need to exploit this issue?

An attacker needs to be able to load a crafted BPF program that performs a non-fetch atomic operation on a partially initialized spilled stack slot. The description specifically notes that programs loaded with CAP_PERFMON may be allowed to read uninitialized stack bytes.

2

What information can be exposed?

The flaw can expose uninitialized bytes from the BPF stack. In the demonstrated program, a 32-bit write followed by a 64-bit non-fetch atomic add allows the high 32 bits to be read, returning 4294967295 in the test.

3

How does the fix change verifier behavior?

The fix applies the partial-load check to non-fetch atomic operations. Programs that attempt the affected pattern are rejected with a Memory Safety: Uninitialized stack read verification failure.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203