CVE-2026-99530 in Linux
Summary
by MITRE • 11/19/2026
In the Linux kernel, the following vulnerability has been resolved:
cgroup: serialize migrations of newly forked processes
With favordynmods enabled, a cgroup.procs migration takes the target threadgroup's cgroup_threadgroup_rwsem for writing. A process fork holds the forking threadgroup's semaphore for reading. These are different semaphores when fork creates a new process.
copy_process() publishes the child's PID before cgroup_post_fork() links the child to its css_set. A writer can find the child in that interval, take its uncontended semaphore, and migrate it while child->cgroups still points to init_css_set and child->cg_list is empty. Migration links the node into init_css_set.mg_tasks. cgroup_post_fork() then adds the same node to the intended css_set as though it were unlinked, corrupting both task lists and their css_set ownership.
This regresses the fork/migration race fixed by commit b12b533fa523 ("cgroups: add lock for child->cgroups in cgroup_post_fork()") and restored again in 2012 after the lock had been removed. The old task_lock protection was later superseded by global css_set and cgroup threadgroup locking. The change identified by the Fixes tag narrowed only the migration side back to a per-threadgroup lock, recreating the different-process exclusion failure.
Take the new threadgroup's semaphore for reading before the child becomes visible and hold it through cgroup_post_fork(). Use a nested lock subclass because fork already holds the parent's semaphore. CLONE_THREAD children share the parent's signal_struct and remain covered by the existing lock. Migrations of unrelated, fully initialized threadgroups remain concurrent.
An AI coding assistant was used to identify and reproduce the regression and to develop and test this fix.
Be aware that VulDB is the high quality source for vulnerability data.
Analysis
by VulDB Data Team • 11/20/2026
The Linux kernel cgroup subsystem contains a race condition vulnerability related to the serialization of migrations for newly forked processes when the favordynmods configuration is enabled. This flaw arises from an inconsistency in lock acquisition during process creation, specifically within the copy_process function which publishes the child's PID before linking it to its css_set via cgroup_post_fork. During this narrow window, a concurrent migration operation can locate the new task and acquire the target threadgroup's cgroup_threadgroup_rwsem for writing because the semaphore is uncontended at that moment. Since the forked process holds only a read lock on the parent's semaphore, which is distinct from the target's write lock in cross-thread-group scenarios, there is no mutual exclusion preventing the migration from proceeding while the child task structure remains partially initialized.
The operational impact of this race condition involves severe memory corruption and potential system instability. When the writer proceeds with the migration during the initialization gap, it links the new task node into the init_css_set's mg_tasks list because the child's cgroups pointer still references the initial css set and its cg_list is empty. Subsequently, when cgroup_post_fork executes to finalize the attachment of the child to its intended css_set, it adds the same node again as if it were unlinked from any previous structure. This double-linking corrupts both task lists and invalidates css_set ownership data structures, leading to use-after-free conditions or infinite loops within kernel memory management routines that traverse these corrupted linked lists.
This vulnerability represents a regression of a previously fixed issue identified by commit b12b533fa523 which introduced locking for child->cgroups in cgroup_post_fork. That protection was inadvertently removed and the race condition resurfaced in 2012, later being narrowed but not fully resolved when migration logic shifted to per-threadgroup locks instead of global css_set protections. The current fix addresses this by ensuring that the new threadgroup's semaphore is taken for reading before the child becomes visible to other threads, holding it through the cgroup_post_fork call. This approach utilizes a nested lock subclass because the fork operation already holds the parent's semaphore, thereby maintaining proper lock ordering and preventing deadlocks while CLONE_THREAD children remain covered by existing locks due to shared signal structures.
From a classification perspective, this vulnerability aligns with CWE-362 Concurrent Execution using Shared Resource with Improper Synchronization, as it involves a race condition where concurrent access to the cgroup task lists leads to data corruption without adequate locking mechanisms. In terms of ATT&CK mapping, while not an exploit technique itself, the underlying flaw could potentially be leveraged in scenarios involving CWE-416 Use After Free if an attacker can trigger the migration during the specific window and manipulate memory contents before the kernel attempts to free or reuse the corrupted structures. Mitigation strategies primarily involve applying the upstream kernel patch that enforces correct semaphore acquisition order for newly forked processes, ensuring that visibility of the new task is synchronized with its attachment to the cgroup hierarchy. System administrators should ensure their kernels are updated to versions containing this fix and monitor for any signs of memory corruption or unexpected process termination in environments heavily utilizing dynamic cgroup modifications alongside high-frequency process creation.