CVE-2026-98642: bpf: Fix UAF due to concurrent consumption of ttrace lists in alloc_bulk
bpf: Fix UAF due to concurrent consumption of ttrace lists in allocbulk
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
ubuntu/linux-hwe-7.0to a version that resolves this vulnerability.Fixed in 7.0.0-42.42~24.04.1 - Upgrade
Upgrade
ubuntu/linux-riscv-7.0to a version that resolves this vulnerability.Fixed in 7.0.0-42.42.1~24.04.1 - Upgrade
Upgrade
ubuntu/linuxto a version that resolves this vulnerability.Fixed in 7.0.0-42.42 - Upgrade
Upgrade
ubuntu/linux-awsto a version that resolves this vulnerability.Fixed in 7.0.0-1016.17 - Upgrade
Upgrade
ubuntu/linux-gcpto a version that resolves this vulnerability.Fixed in 7.0.0-1016.18 - Upgrade
Upgrade
ubuntu/linux-ibmto a version that resolves this vulnerability.Fixed in 7.0.0-1017.17 - Upgrade
Upgrade
ubuntu/linux-oem-7.0to a version that resolves this vulnerability.Fixed in 7.0.0-1017.17 - Upgrade
Upgrade
ubuntu/linux-oracleto a version that resolves this vulnerability.Fixed in 7.0.0-1015.16 - Upgrade
Upgrade
ubuntu/linux-riscvto a version that resolves this vulnerability.Fixed in 7.0.0-42.42.1 - Compensating control
Introduce a raw spinlock to synchronize concurrent consumption of the BPF memalloc ttrace lists waiting_for_gp_ttrace and free_by_rcu_ttrace, including llist_del_first() in alloc_bulk() and llist_del_all() in the RCU Tasks Trace callback.
Event History
Frequently Asked Questions
What conditions trigger the use-after-free?
The race involves concurrent access to the BPF memalloc waiting_for_gp_ttrace list. It occurs when alloc_bulk() consumes list entries while an RCU Tasks Trace grace period completes and the __free_rcu() callback frees entries from the same list.
How was this issue observed?
Syzkaller repeatedly triggered KASAN slab-use-after-free reports. The reported read occurred in llist_del_first() during alloc_bulk(), while the affected object had been freed by the RCU Tasks Trace callback path.
What code paths are involved when investigating a crash?
The allocation-side stack includes llist_del_first(), alloc_bulk(), and bpf_mem_refill(). The freeing-side stack includes __free_rcu(), __free_rcu_tasks_trace(), rcu_tasks_invoke_cbs(), and the RCU Tasks Trace kernel thread.