Description
In the Linux kernel, the following vulnerability has been resolved:

futex: Fix race on the initial mm->futex.phash.ref allocation

futex_hash_allocate() allocates mm->futex.phash.ref without any locking.
Commit d9b05321e21e ("futex: Move futex_hash_free() back to __mmput()")
moved the allocation here and assumed that the process has just a single
thread at this point.

Commit ee9dce44362b ("futex: Drop CLONE_THREAD requirement for private
default hash alloc") widened need_futex_hash_allocate_default() to cover
any CLONE_VM clone, but left out vfork because the parent is suspended and
cannot race.

That no longer holds once vfork is nested. If a vfork child calls vfork
again and is then killed with SIGKILL, the parent is released from its
vfork wait and runs concurrently with the grandchild in the same mm.
Neither of them went through futex_hash_allocate_default().

When both call prctl(PR_FUTEX_HASH, PR_FUTEX_HASH_SET_SLOTS) at the same
time, each one sees mm->futex.phash.ref as NULL and stores its own percpu
counter. Only the last store survives. The counter stored first is no
longer reachable from the mm, so the references on it are not seen by
__futex_ref_atomic_end(). A private hash that still has references is then
considered dead and freed, and a task that still holds one of its buckets
writes into freed memory in futex_q_lock().

Store the counter once with cmpxchg() and let the loser free_percpu() its
own. The initial reference has to be taken before the store, otherwise
another task can install a private hash while the counter is still 0.
Published: 2026-09-04
Score: n/a
EPSS: n/a
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

This flaw is a race condition that occurs in the Linux kernel's futex subsystem. When a process performing a vfork nests another vfork and the child is subsequently killed with SIGKILL, the parent resumes execution concurrently with the grandchild in the same memory context. Both processes can then call prctl(PR_FUTEX_HASH, PR_FUTEX_HASH_SET_SLOTS) simultaneously, each assuming that the futex hash reference mm->futex.phash.ref is NULL. Because the allocation of this reference lacks synchronization, both processes store separate per‑cpu counters, but only the last store persists. The first counter becomes unreachable, its reference counts are untracked, and the hash is incorrectly freed. A task that still owns a reference to that freed hash may then write into the reclaimed memory during futex_q_lock(), resulting in a use‑after‑free that can corrupt kernel memory and potentially lead to arbitrary code execution or kernel panic.

Affected Systems

The vulnerability affects the Linux kernel itself. All distributions that ship a kernel version prior to the inclusion of the fix are potentially impacted. No specific version range is listed in the available data, so any kernel lacking the commit that introduced the race condition patch is susceptible.

Risk and Exploitability

The CVSS score is not provided and the EPSS score is unavailable, so the exact severity ranking is unknown. However, the presence of a use‑after‑free in the kernel is a high‑risk condition. The flaw requires local interaction with a process that performs multiple vforks and uses the PR_FUTEX_HASH ioctl; thus, exploitation would be constrained to a local or privileged attacker who can control such code paths. If successfully exploited, the attacker could corrupt kernel memory, potentially gain privilege escalation or crash the system. The lack of an official KEV listing indicates that no widespread exploit has yet been documented, but the flaw remains a serious security concern due to the critical nature of use‑after‑free bugs in kernel code.

Generated by OpenCVE AI on September 4, 2026 at 17:09 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade the Linux kernel to a version that includes the patch implementing the race fix (e.g., commit d9b05321e21e or later).
  • If an upgrade cannot be performed, eliminate the use of prctl(PR_FUTEX_HASH, PR_FUTEX_HASH_SET_SLOTS) in any code paths that involve nested vfork calls, or restructure the application to avoid combining these operations.
  • As a temporary step, manually apply the upstream patch from the provided commit references to the kernel source and rebuild the kernel if an official update is not yet available.

Generated by OpenCVE AI on September 4, 2026 at 17:09 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Fri, 04 Sep 2026 17:30:00 +0000

Type Values Removed Values Added
Weaknesses CWE-362
CWE-416

Fri, 04 Sep 2026 15:30:00 +0000

Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: futex: Fix race on the initial mm->futex.phash.ref allocation futex_hash_allocate() allocates mm->futex.phash.ref without any locking. Commit d9b05321e21e ("futex: Move futex_hash_free() back to __mmput()") moved the allocation here and assumed that the process has just a single thread at this point. Commit ee9dce44362b ("futex: Drop CLONE_THREAD requirement for private default hash alloc") widened need_futex_hash_allocate_default() to cover any CLONE_VM clone, but left out vfork because the parent is suspended and cannot race. That no longer holds once vfork is nested. If a vfork child calls vfork again and is then killed with SIGKILL, the parent is released from its vfork wait and runs concurrently with the grandchild in the same mm. Neither of them went through futex_hash_allocate_default(). When both call prctl(PR_FUTEX_HASH, PR_FUTEX_HASH_SET_SLOTS) at the same time, each one sees mm->futex.phash.ref as NULL and stores its own percpu counter. Only the last store survives. The counter stored first is no longer reachable from the mm, so the references on it are not seen by __futex_ref_atomic_end(). A private hash that still has references is then considered dead and freed, and a task that still holds one of its buckets writes into freed memory in futex_q_lock(). Store the counter once with cmpxchg() and let the loser free_percpu() its own. The initial reference has to be taken before the store, otherwise another task can install a private hash while the counter is still 0.
Title futex: Fix race on the initial mm->futex.phash.ref allocation
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References

Subscriptions

Linux Linux Kernel
cve-icon MITRE

Status: PUBLISHED

Assigner: Linux

Published:

Updated: 2026-09-04T15:12:47.391Z

Reserved: 2026-08-26T14:34:25.792Z

Link: CVE-2026-80775

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-09-04T16:18:03.123

Modified: 2026-09-04T16:18:03.123

Link: CVE-2026-80775

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-09-04T17:15:14Z

Weaknesses
  • CWE-362

    Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition')

  • CWE-416

    Use After Free