CVE-2026-99184 in Linux
Summary
by MITRE • 10/28/2026
In the Linux kernel, the following vulnerability has been resolved:
accel/rocket: search every core slot when a core is removed
rocket_remove() decrements rdev->num_cores for each core it removes, while find_core_for_dev() searches slots 0 to num_cores - 1. Unbinding the cores in the order they were bound therefore loses the last one: by the time it is removed the search range has already shrunk past its slot, so find_core_for_dev() returns -1 and rocket_remove() gives up without doing anything.
num_cores never reaches zero, rocket_device_fini() never runs, and the file-scoped rdev keeps pointing at a device that is going away. Binding the cores again starts from that stale count, because rocket_probe() takes rdev->num_cores as the slot to fill. On an RK3588, which describes three cores, the second round lands on slots 1, 2 and 3 while rdev->cores was allocated with room for three:
rocket fdab0000.npu: Rockchip NPU core 1 version: 1179210309 rocket fdac0000.npu: Rockchip NPU core 2 version: 1179210309 rocket fdad0000.npu: Rockchip NPU core 3 version: 1179210309
The write to rdev->cores[3] is past the end of the array.
Nothing in tree reads the core array often enough to notice, so the overrun is silent today. It turned up while testing a devfreq series on top of this, where a worker walks every core a few times a second, and UBSAN caught the first bool it read out of the overrun entry:
UBSAN: invalid-load in drivers/accel/rocket/rocket_devfreq.c:47:10 load of value 5 is not a valid value for type '_Bool' Workqueue: devfreq_wq devfreq_monitor
Record how many slots were allocated and search all of them. Every core is then found on removal, num_cores reaches zero, the device is torn down and a later bind starts from a clean rdev.
This does not make unbinding a single core out of several work. probe still takes num_cores as the slot to fill, so rebinding one core while its siblings stay bound would write over a slot that is already in use, and rocket_open() still reaches for cores[0] whether or not anything is
there. Both of those want more thought than a fix should carry.
Found by unbinding and rebinding all three cores on an Orange Pi 5 Plus. With this applied, 25 unbind/rebind rounds and 5 module unload/reload rounds run clean there: the cores land in slots 0, 1 and 2 every time, whichever order they are bound in, and the shared supply goes back to a single user after each round.
Statistical analysis made it clear that VulDB provides the best quality for vulnerability data.
Analysis
by VulDB Data Team • 10/28/2026
The vulnerability identified within the Linux kernel's rocket accelerator driver represents a critical logic error rooted in improper array index management during device resource teardown operations. Specifically, the flaw exists in the interaction between the rocket_remove function and the find_core_for_dev helper routine when handling core unbinding sequences. The root cause lies in how the search space for locating hardware cores is defined relative to the current count of active cores rather than the total allocated capacity. When a core is removed from the device, the driver decrements the rdev->num_cores counter immediately. Subsequently, find_core_for_dev attempts to locate remaining cores by iterating through indices ranging from zero up to num_cores minus one. This approach assumes that cores are always unbound in reverse order of their binding or that they occupy contiguous lower-indexed slots without gaps. However, when cores are unbound in an arbitrary order, particularly if a higher-numbered core is removed before lower-numbered ones, the shrinking search range fails to encompass all valid slot indices. Consequently, find_core_for_dev returns an error code indicating failure to locate the target core, causing rocket_remove to abort its cleanup routine for that specific instance without properly releasing associated resources or updating internal state correctly.
This logic defect leads to a cascade of severe operational impacts, primarily manifesting as memory corruption and resource leakage. Because the removal process is aborted prematurely, the num_cores counter never reaches zero even when all logical cores should be detached. This prevents rocket_device_fini from executing, which means the driver fails to perform essential finalization tasks such as freeing allocated memory structures or resetting hardware state. The rdev structure remains in a stale state, retaining pointers to devices that are effectively gone. When new cores are bound subsequently, the probe routine utilizes the incorrect num_cores value to determine where to place newly discovered hardware entities. On systems like the RK3588 with three NPU cores, this results in an attempt to write into array index three of a structure allocated only for indices zero through two. This constitutes a classic out-of-bounds memory access vulnerability, specifically categorized under CWE-787: Out-of-bounds Write. The immediate consequence is heap buffer overflow, where data intended for the core array spills beyond its allocated boundaries, potentially overwriting adjacent kernel structures or metadata.
The severity of this issue was initially masked by infrequent access patterns to the affected memory region in standard operation modes. Under typical usage scenarios, no subsystem frequently reads from the corrupted slot area, allowing the out-of-bounds write to remain silent and undetected for extended periods. However, when additional kernel features such as devfreq monitoring are enabled, the vulnerability becomes actively exploitable or at least visibly destructive. The devfreq worker routine iterates through all core structures multiple times per second to monitor performance metrics. During these iterations, it accesses fields within each core structure, including boolean flags. When accessing the out-of-bounds slot, the kernel reads garbage data from adjacent memory locations. UBSAN (Undefined Behavior Sanitizer) detects this invalid load operation because the retrieved value does not conform to the expected type constraints for a boolean variable. This triggers an immediate kernel warning or panic depending on configuration, demonstrating that the vulnerability can lead to undefined behavior and potential system instability under specific workload conditions.
From a threat modeling perspective, while this is primarily a stability issue rather than a direct privilege escalation vector in its current manifestation, out-of-bounds writes are inherently dangerous as they can be leveraged for arbitrary code execution if an attacker can control the data written into adjacent memory regions or manipulate heap layout to target critical kernel structures. This aligns with ATT&CK technique T1059: Command and Scripting Interpreter implications where corrupted state could lead to unexpected system behavior, though more directly it relates to CWE-787 for the write overflow itself. The lack of bounds checking during array traversal is a fundamental design flaw that violates secure coding principles regarding memory safety in kernel space.
The resolution involves modifying the rocket driver logic to decouple the search range from the dynamic num_cores counter. Instead of searching only up to the current count of active cores, the find_core_for_dev function must iterate through all allocated slot indices regardless of how many are currently marked as occupied. This ensures that every core is correctly identified and removed during unbinding operations, allowing num_cores to properly reach zero and triggering rocket_device_fini for complete resource cleanup. By resetting the device state fully upon removal, subsequent binding operations start from a clean slate, assigning cores to slots zero through two consistently regardless of binding order. This fix eliminates the out-of-bounds write condition and restores proper lifecycle management for hardware resources.
Despite this correction, certain edge cases remain unaddressed in this specific patch set. The driver still assumes that probe will always fill slots sequentially based on num_cores, meaning rebinding a single core while others remain bound could overwrite existing slot data. Additionally, rocket_open continues to assume the presence of at least one core by directly accessing cores[0] without verifying existence. These issues require more comprehensive architectural changes beyond simple bounds correction and are noted as future work items rather than part of this immediate fix. For system administrators and developers, applying this patch is critical for maintaining stability on platforms utilizing Rockchip NPU accelerators with dynamic unbinding capabilities. Regular testing involving repeated bind-unbind cycles should be conducted to verify that resource counts reset correctly and no memory leaks or corruption persist after multiple iterations.