AZL-117043: CVE-2026-139308 affecting package kernel 6.6.161.1-1
In the Linux kernel, the following vulnerability has been resolved:
bpf: Fix stale offload->prog pointer after realloc
bpfprogrealloc() moves a program that the rewrites of the verifier make outgrow its pages. It updates aux->prog, but not the offload->prog of a device-bound program. When the device is unregistered, bpfoffloaddevnetdevunregister() hands the stale pointer to bpfprogoffloaddestroy(), which faults on the freed program:
BUG: unable to handle page fault for address: ffffc90000071050 RIP: 0010:bpfprogoffloaddestroy+0x3f/0x310
It takes the right to load a device-bound XDP program, CAPBPF and CAPNETADMIN or a BPF token, and a device that can be removed.
Commit a1aa9ef47c29 ("bpf: Fix stale offload->prog pointer after constant blinding") repaired the other place that replaces a program. Do the same here.
Nothing keeps the device while a program is loaded, so it can also be unregistered at that very moment. That frees the offload, and it may have read offload->prog already when the old copy of the program is freed. In both places update the pointer under bpfdevslock, before the old copy goes.
Affected Software
Event History
Frequently Asked Questions
Who can realistically trigger this issue?
An attacker needs permission to load a device-bound XDP program: CAP_BPF and CAP_NET_ADMIN, or a BPF token. They also need access to a device that can be removed or unregistered.
What condition causes the kernel fault?
The fault can occur when bpf_prog_realloc() moves a device-bound BPF program but leaves offload->prog pointing to the freed old program. If the associated device is then unregistered, teardown can dereference that stale pointer.
Can the issue occur during program loading rather than only after it completes?
Yes. The device is not kept while a program is being loaded, so it may be unregistered at the same time; teardown may read offload->prog before the old program copy is freed.
What is the impact described for a successful trigger?
The described result is a kernel page fault in __bpf_prog_offload_destroy() when device-offload state is destroyed using the stale program pointer.