Linux Kernel Race Condition Vulnerability in Shmem Swap Handling

Vulnerability

A race condition vulnerability has been identified in the Linux kernel's handling of swap entries for shared memory (shmem). This issue arises because the mechanism for freeing shmem swap entries does not properly manage the order of these entries. The vulnerability exists in the Linux kernel stable tree, specifically in the memory management (mm) subsystem, within the shmem component. The problem occurs when the system retrieves the order of a swap entry without adequate lock protection, potentially leading to the deletion of data beyond the intended boundary. This can happen if a large folio is added, swapped out, and then the same entry is reused, allowing the swap entry to be incorrectly processed.

Impact

The vulnerability can cause data corruption by truncating information beyond the designated limits, as well as leading to system hangs and kernel panics, particularly when the ZSWAP feature is under stress testing.

Reproduction

The vulnerability can be reproduced by enabling the ZSWAP feature and performing stress tests that involve swapping large folios in and out of shared memory. This will trigger the race condition by allowing the swap entry order to be read and modified without proper synchronization, causing the swapoff command to hang and the kernel to panic.

Remediation

Users can apply the patch available in the Linux kernel Git repository to address this vulnerability. Instructions for downloading the patched version can be found in the repository.

Added: Feb 14, 2026, 4:21 PM
Updated: Feb 14, 2026, 4:21 PM

Vulnerability Rating

Custom Algorithm
spread
9.0
impact
2.5
exploitability
3.9
remediation
7.7
relevance
3.0
threat
4.8
urgency
2.9
incentive
0.0

Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.