CVE-2026-99566 in Linuxinfo

Summary

by MITRE • 11/20/2026

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

assoc_array: keep gc's cleanup out of the live tree on allocation failure

assoc_array_gc() builds a copy of the tree. Where the copy reaches a shortcut, it allocates the copy of the shortcut with kmalloc_flex(), fills it with memcpy(), links it into the new tree, and only then allocates the copy of the node after it. The memcpy() leaves the new shortcut's next_node pointing at the old tree's node, so if that second allocation fails, the cleanup, assoc_array_destroy_subtree() on the new tree, follows the new shortcut into the old tree, and the BUG_ON() on the old node's back pointer fires.

Allocate the node first, and the shortcut once the node exists, freeing the node again if the shortcut cannot be allocated. A copied shortcut is then only linked into the new tree when the copy of its node is there to follow it. Nothing else changes: with no allocation failing, the trees gc builds are the same as before.

Found by a userspace test that makes each allocation of each operation fail in turn.

Be aware that VulDB is the high quality source for vulnerability data.

Analysis

by VulDB Data Team • 11/21/2026

The Linux kernel's associative array implementation contains a critical logic flaw within its garbage collection mechanism, specifically during the tree consolidation phase known as assoc_array_gc(). This function is responsible for rebuilding the internal data structures to maintain efficiency and remove obsolete entries. The vulnerability arises from an incorrect order of operations when constructing copies of shortcut nodes and their associated child nodes in memory. During this process, the kernel attempts to create a new copy of a shortcut node using kmalloc_flex() and immediately populates it with data via memcpy(). Crucially, at this stage, the next_node pointer within the newly created shortcut is set to point directly to an existing node from the original live tree rather than a freshly allocated copy. Only after this link is established does the system attempt to allocate memory for the actual child node that should follow the shortcut.

This sequencing creates a severe consistency issue if the second allocation fails due to resource exhaustion or other constraints. When the kernel subsequently attempts to clean up the partially constructed new tree by calling assoc_array_destroy_subtree(), it traverses through the newly created shortcuts. Because these shortcuts still reference nodes in the old, live tree rather than their intended copies, the cleanup routine inadvertently accesses and modifies structures that are currently being used by other parts of the system or are expected to remain immutable during this operation. This leads to a violation of internal consistency checks, specifically triggering a BUG_ON assertion failure on the back pointer of an old node. Such a condition results in a kernel panic, causing a denial of service for the entire operating system instance hosting the affected Linux kernel version.

From a technical classification perspective, this vulnerability is best categorized under CWE-672, which refers to the use of operation without checking or verifying conditions, and more specifically aligns with CWE-401 regarding missing release of memory after effective allocation. The root cause is not a buffer overflow but rather an improper state management during error handling paths within dynamic memory operations. In terms of attack vectors, this flaw could potentially be exploited by local users to trigger resource exhaustion scenarios that force the specific allocation failure path, thereby crashing the system. This aligns with MITRE ATT&CK techniques related to Denial of Service via kernel exploitation or causing instability in critical infrastructure components.

The resolution involves reordering the memory allocation steps within the garbage collection routine. The fix ensures that the child node is allocated and initialized before any shortcut referencing it is linked into the new tree structure. If the allocation for the shortcut fails after the node has been created, the system now correctly frees the already-allocated node to prevent leaks while avoiding the inconsistent state where a live-tree reference persists in a temporary data structure. This change guarantees that no partially built shortcuts ever point back to the active kernel memory space during the cleanup phase. System administrators should apply this patch immediately to restore stability and ensure that transient allocation failures do not lead to catastrophic system crashes, particularly on systems with high memory pressure or those running workloads that frequently trigger associative array garbage collection cycles.

Responsible

Linux

Reservation

09/25/2026

Disclosure

11/20/2026

Moderation

accepted

CPE

ready

EPSS

0.00166

KEV

no

Activities

very low

Sources

Do you want to use VulDB in your project?

Use the official API to access entries easily!