CVE-2026-74354: bpf: Take mmap_lock in zap_pages()
In the Linux kernel, the following vulnerability has been resolved:
bpf: Take mmaplock in zappages()
zapvmarange() requires the owning mm's mmaplock to be held.
Taking mmapreadlock under arena->lock would AB-BA against arenavmclose() and arenamapmmap(), both of which run with mmapwritelock held and then acquire arena->lock. Instead drop arena->lock, mmgetnotzero() the vma's mm, take mmapreadlock, and re-resolve the vma via findvma() since it may have been unmapped or replaced while waiting.
Track processed vmls with a per-call generation in vml->zapgen and serialize zappages() callers with a new arena->zapmutex so concurrent callers on different uaddr ranges do not mark each other's vmls processed before the zap is done.