AZL-117019: CVE-2026-139296 affecting package kernel 6.6.161.1-1
In the Linux kernel, the following vulnerability has been resolved:
bpf: Keep values of a dead owner for sleepable programs
bpflocalstoragedestroy() frees the elements of an owner behind a plain RCU grace period, on the ground that no program can refer to an owner that goes away. But the pointer that bpftaskstorageget() and its like return stays valid for the verifier after the program has released the owner, or has left the bpfrcureadlock() section it had the owner from. A sleepable program is in no RCU read side critical section, so it can write to the value after the owner has died and the element was freed:
BUG: KASAN: slab-use-after-free in copyfromuser+0x42/0xa0 Write of size 8 at addr ffff8880074404a8 by task lsuaf/55
Free the element behind an RCU Tasks Trace grace period if sleepable code may use the map. A program that a map is bound to was loaded, and counted in map->sleepablerefcnt, before it got a value from the live owner, and stays counted until a grace period behind its last run.
A program can also get at a storage map by a lookup in an outer map. Then only the outer map is counted, its programs can come after the inner map was put into it, and can hold on to the inner map after it was taken out. So note in a map that it has been an inner map, and treat it like one with sleepable users from then on.
The same goes for what the special fields of the value hold. The page of a uptr has to stay pinned, and a kptr which the program stores after the owner has died has to be released. Leave the fields, and the smap that it takes to free them, to bpfselemfreetracercu(), as bpfselemunlink() does. bpflocalstoragemapfree() waits for that callback, and leaves smap alone if it comes across such an element.
Elements of such maps now wait for sleepable programs that are running when their owner dies. Other maps are freed as before.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Patch CVE-2026-139296
Event History
Frequently Asked Questions
What systems are realistically exposed to this issue?
Systems running the affected Azure Linux kernel package version 6.6.161.1-1 are implicated. Exploitation depends on the presence of BPF local-storage maps that can be used by sleepable BPF programs.
What does an attacker need to trigger the flaw?
An attacker needs the ability to load or execute a sleepable BPF program that accesses BPF local storage and can retain a value reference after its owner has been released or an RCU read-side section has ended. The vulnerable path can also involve storage maps reached through lookup in an outer map.
Is this a default-configuration exposure?
The provided information does not establish whether unmodified default configurations permit the required BPF program loading or map setup. The vulnerable condition specifically requires sleepable BPF code using the affected storage-map behavior.
What is the impact if exploitation succeeds?
The issue is a kernel use-after-free: sleepable BPF code can write to a local-storage value after its owner has died and its element has been freed. The report shows a KASAN-detected write-after-free condition in the kernel.
How can I determine whether I may be affected?
Check whether the host runs the Azure Linux kernel package at version 6.6.161.1-1 and whether it uses sleepable BPF programs with BPF local storage. Kernel logs or sanitizer output reporting a slab use-after-free involving bpf_local_storage_destroy(), bpf_task_storage_get(), or _copy_from_user may indicate the condition has occurred.