UBUNTU-CVE-2026-98038: Medium severity ubuntu/linux-hwe-edge vulnerability
In the Linux kernel, the following vulnerability has been resolved: bpf: Keep refcountacquire nullable for borrowed RCU kptrs bpfrefcountacquire() is fallible for a borrowed reference because the object may have reached a zero refcount. The verifier therefore keeps KFRETNULL on the return value unless the argument is an owning reference. An RCU-protected load of a local kptr is marked MEMALLOC, but it only receives NONOWNREF when the pointee contains a graph node. A refcounted object without a graph node consequently looks like an owning reference even though the loaded register has no acquired reference state. If the program drops the last real reference while remaining in the RCU critical section, refcountincnotzero() returns NULL while the verifier treats the result as non-NULL. Only classify the argument as owning when it is backed by a verifier-tracked reference. This retains the non-NULL return for pointers from bpfobjnew(), bpfkptrxchg(), or an earlier successful acquisition, while requiring a NULL check for borrowed RCU kptrs. [ kkd: Rewrote commit log ]
Affected Software
Event History
Frequently Asked Questions
Which Ubuntu kernel packages are identified as affected?
The listed packages are ubuntu/linux-riscv, ubuntu/linux-realtime, ubuntu/linux-azure, ubuntu/linux-gcp, ubuntu/linux-azure-fde, ubuntu/linux-gke, ubuntu/linux-hwe-edge, and ubuntu/linux-gkeop.
What conditions are required to trigger the issue?
A BPF program must use a borrowed RCU-protected local kptr whose pointee does not contain a graph node. The program must also drop the last real reference while still in the RCU critical section, causing bpf_refcount_acquire() to return NULL.
What should BPF program authors do if an immediate kernel update is not possible?
Treat bpf_refcount_acquire() as fallible and check its return value for NULL when acquiring from borrowed RCU kptrs. Do not assume such a pointer is an owning reference unless it is backed by a verifier-tracked reference.
Which pointer sources retain a non-NULL acquisition result according to the fix?
Pointers obtained from bpf_obj_new(), bpf_kptr_xchg(), or an earlier successful acquisition retain the non-NULL return behavior. Borrowed RCU kptrs require a NULL check.