{"id":"CVE-2026-80775","summary":"futex: Fix race on the initial mm-\u003efutex.phash.ref allocation","details":"In the Linux kernel, the following vulnerability has been resolved:\n\nfutex: Fix race on the initial mm-\u003efutex.phash.ref allocation\n\nfutex_hash_allocate() allocates mm-\u003efutex.phash.ref without any locking.\nCommit d9b05321e21e (\"futex: Move futex_hash_free() back to __mmput()\")\nmoved the allocation here and assumed that the process has just a single\nthread at this point.\n\nCommit ee9dce44362b (\"futex: Drop CLONE_THREAD requirement for private\ndefault hash alloc\") widened need_futex_hash_allocate_default() to cover\nany CLONE_VM clone, but left out vfork because the parent is suspended and\ncannot race.\n\nThat no longer holds once vfork is nested. If a vfork child calls vfork\nagain and is then killed with SIGKILL, the parent is released from its\nvfork wait and runs concurrently with the grandchild in the same mm.\nNeither of them went through futex_hash_allocate_default().\n\nWhen both call prctl(PR_FUTEX_HASH, PR_FUTEX_HASH_SET_SLOTS) at the same\ntime, each one sees mm-\u003efutex.phash.ref as NULL and stores its own percpu\ncounter. Only the last store survives. The counter stored first is no\nlonger reachable from the mm, so the references on it are not seen by\n__futex_ref_atomic_end(). A private hash that still has references is then\nconsidered dead and freed, and a task that still holds one of its buckets\nwrites into freed memory in futex_q_lock().\n\nStore the counter once with cmpxchg() and let the loser free_percpu() its\nown. The initial reference has to be taken before the store, otherwise\nanother task can install a private hash while the counter is still 0.","modified":"2026-09-06T03:46:40.893184382Z","published":"2026-09-04T15:12:47.391Z","database_specific":{"cna_assigner":"Linux","osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/80xxx/CVE-2026-80775.json"},"references":[{"type":"WEB","url":"https://git.kernel.org/stable/c/86d12b34bafc9a4c271a9edefea88855a934d6e5"},{"type":"WEB","url":"https://git.kernel.org/stable/c/bde0238083647381d4747355c5a19115a3422b96"},{"type":"WEB","url":"https://git.kernel.org/stable/c/c4b4972d8edcdf50b6518f55119e129d2f668a10"},{"type":"WEB","url":"https://git.kernel.org/stable/c/ff252ed45c8263525f2f54d81c5fa6d547fba344"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/80xxx/CVE-2026-80775.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-80775"},{"type":"PACKAGE","url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"d9b05321e21e4b218de4ce8a590bf375f58b6346"},{"fixed":"86d12b34bafc9a4c271a9edefea88855a934d6e5"},{"fixed":"ff252ed45c8263525f2f54d81c5fa6d547fba344"},{"fixed":"c4b4972d8edcdf50b6518f55119e129d2f668a10"},{"fixed":"bde0238083647381d4747355c5a19115a3422b96"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-80775.json"}},{"package":{"name":"Kernel","ecosystem":"Linux"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"6.17.0"},{"fixed":"6.18.47"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.19.0"},{"fixed":"7.1.11"}]},{"type":"ECOSYSTEM","events":[{"introduced":"7.2.0"},{"fixed":"7.2.1"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-80775.json"}}],"schema_version":"1.9.0"}