CVE-2026-74354: bpf: Take mmap_lock in zap_pages()
Greg Kroah-Hartman <[email protected]>
| Newsgroups | org.kernel.vger.linux-cve-announce |
|---|---|
| Message-ID | <2026081500-CVE-2026-74354-67c4@gregkh> |
From: Greg Kroah-Hartman <[email protected]> Description =========== In the Linux kernel, the following vulnerability has been resolved: bpf: Take mmap_lock in zap_pages() zap_vma_range() requires the owning mm's mmap_lock to be held. Taking mmap_read_lock under arena->lock would AB-BA against arena_vm_close() and arena_map_mmap(), both of which run with mmap_write_lock held and then acquire arena->lock. Instead drop arena->lock, mmget_not_zero() the vma's mm, take mmap_read_lock, and re-resolve the vma via find_vma() since it may have been unmapped or replaced while waiting. Track processed vmls with a per-call generation in vml->zap_gen and serialize zap_pages() callers with a new arena->zap_mutex so concurrent callers on different uaddr ranges do not mark each other's vmls processed before the zap is done. The Linux kernel CVE team has assigned CVE-2026-74354 to this issue. Affected and fixed versions =========================== Issue introduced in 6.9 with commit 317460317a02a1af512697e6e964298dedd8a163 and fixed in 7.1.5 with commit 36b1d997866f6083d33934983aa2ce0a184ed642 Issue introduced in 6.9 with commit 317460317a02a1af512697e6e964298dedd8a163 and fixed in 7.2-rc1 with commit 80b89d0226a05e8b67969de99c31b51fcd54f76a Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community. Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at https://cve.org/CVERecord/?id=CVE-2026-74354 will be updated if fixes are backported, please check that for the most up to date information about this issue. Affected files ============== The file(s) affected by this issue are: kernel/bpf/arena.c Mitigation ========== The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits: https://git.kernel.org/stable/c/36b1d997866f6083d33934983aa2ce0a184ed642 https://git.kernel.org/stable/c/80b89d0226a05e8b67969de99c31b51fcd54f76a