CVE-2026-93137: bpf: Fix use-after-free on mm_struct in bpf_find_vma()
bpf: Fix use-after-free on mmstruct in bpffindvma()
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.
Fixed in 6.6.157.1-1 - Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 6.1.190-1Fixed in 6.12.115-2Fixed in 7.2.12-1Fixed in 7.2.15-1 - Upgrade
Upgrade
debian/linux-6.12to a version that resolves this vulnerability.Fixed in 6.12.113-1~deb12u1 - 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
For foreign tasks, pin task->mm under task->alloc_lock and release the reference with mmput_async(); use spin_trylock() instead of get_task_mm() so the BPF context does not block on alloc_lock.
- Compensating control
Reject irqs-disabled contexts and !CONFIG_MMU on the foreign-task path, because dropping the mm reference is not safe there.
Event History
Frequently Asked Questions
What conditions are required to trigger the use-after-free?
A BPF program must call bpf_find_vma() for a foreign task while that task concurrently exits and releases its mm_struct. The race occurs between the lockless read of task->mm and mmap_read_trylock(mm).
Is the current task affected by this race?
No. The data states that task->mm is stable when bpf_find_vma() is used on the current task; the vulnerable path concerns foreign tasks.
Are all execution contexts able to use the corrected foreign-task path?
No. The fix rejects foreign-task use when interrupts are disabled and when the kernel is built without CONFIG_MMU, because safely dropping the mm reference is not possible in those cases.