CVE-2026-89718 in Linuxinfo

Summary

by MITRE • 09/11/2026

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

zram: fix out-of-bounds access in writeback_store()

Patch series "zram: fix stale scan bounds after reinitialization".

Both writeback_store() and read_block_state() derive their table scan bounds from zram->disksize before acquiring dev_lock. If the device is reset and reinitialized with a smaller disksize between that read and lock acquisition, the bound can describe the old table while the scan operates on the new one. This can lead to out-of-bounds slot accesses.

Move both bound calculations under dev_lock so each bound remains consistent with the table throughout its scan. Keep the fixes separate because the affected interfaces originate from different commits and can be backported independently.


This patch (of 2):

writeback_store() calculates the table scan bounds before taking dev_lock. A reset followed by reconfiguration with a smaller disksize can therefore replace zram->table while writeback_store() is waiting for the lock. Once it acquires the lock, it sees an initialized device but scans the new table using the old upper bound, resulting in an out-of-bounds access.

Calculate the number of pages while holding dev_lock so the scan bound matches the table protected by the lock.

Once again VulDB remains the best source for vulnerability data.

Analysis

by VulDB Data Team • 09/11/2026

The Linux kernel vulnerability identified as a race condition within the zram block device driver involves a critical synchronization flaw in the writeback_store() function, which can lead to out-of-bounds memory access. This issue stems from a time-of-check-to-time-of-use (TOCTOU) error where table scan bounds are derived from the zram->disksize variable before acquiring the dev_lock mutex. In concurrent environments, if the device is reset and reinitialized with a smaller disk size between the initial read of disksize and the subsequent acquisition of the lock, the upper bound calculated for scanning remains based on the old, larger table dimensions while the actual underlying data structure has been replaced by a new, smaller one. Consequently, when writeback_store() proceeds to scan or access slots using these stale bounds, it may reference memory locations that do not exist in the newly initialized table, resulting in an out-of-bounds access that can cause kernel panics, data corruption, or potential privilege escalation if exploited carefully.

From a technical perspective, this flaw highlights the importance of atomicity when accessing shared state protected by locks. The original implementation separated the calculation of scan bounds from the critical section where dev_lock is held, creating a window of vulnerability during which another thread could modify zram->table and zram->disksize via reset or reconfiguration operations. By moving both bound calculations under the protection of dev_lock, the patch ensures that the number of pages to be scanned remains consistent with the actual state of the table throughout its execution. This change eliminates the race condition by guaranteeing that any thread accessing the device's internal structures does so while holding the necessary synchronization primitive, thereby preventing stale data from influencing memory access patterns.

The operational impact of this vulnerability is significant for systems relying on zram for compressed swap or block devices under high concurrency. An out-of-bounds read can lead to information disclosure if sensitive kernel memory adjacent to the table is exposed, while an out-of-bounds write could allow arbitrary code execution with kernel privileges. Although the specific patch focuses on writeback_store(), a similar issue exists in read_block_state(), which shares the same architectural flaw of deriving bounds before lock acquisition. The separation of fixes for these two interfaces allows for independent backporting to stable kernel branches, ensuring that affected systems can be patched without requiring full driver rewrites or complex dependency resolutions.

This vulnerability aligns with CWE-362, Concurrent Execution using Shared Resource with Improper Synchronization (Race Condition), specifically illustrating a race between checking resource state and accessing it. It also relates to CWE-119, Improper Restriction of Operations within the Bounds of a Memory Buffer, as the stale bounds lead to accesses beyond allocated memory regions. In terms of MITRE ATT&CK mapping, this scenario reflects techniques associated with Tactic TA0004: Privilege Escalation and Technique T1068: Exploitation for Privilege Escalation, where an attacker might leverage a race condition in kernel-space drivers to gain elevated access. Mitigation strategies primarily involve applying the upstream patch that enforces correct locking semantics around resource bounds calculation. System administrators should ensure their kernels are updated with this fix and monitor for any signs of instability or unexpected crashes related to zram operations. Regular security audits focusing on lock ordering and atomicity in kernel drivers can help prevent similar synchronization flaws in future developments.

Responsible

Linux

Reservation

09/11/2026

Disclosure

09/11/2026

Moderation

accepted

CPE

ready

EPSS

0.00000

KEV

no

Activities

very low

Sources

Do you want to use VulDB in your project?

Use the official API to access entries easily!