What’s Vulnerable › Vulnerabilities
CVE-2025-39941: zram: fix slot write race condition
- Severity: medium (CVSS 4.7 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 0.1% probability of exploitation in the next 30 days
- Public exploit or detection template: none known
- Published: 2025-10-04 · updated 2026-10-19
- Weakness: CWE-362
Description
In the Linux kernel, the following vulnerability has been resolved: zram: fix slot write race condition Parallel concurrent writes to the same zram index result in leaked zsmalloc handles. Schematically we can have something like this: CPU0 CPU1 zram_slot_lock() zs_free(handle) zram_slot_lock() zram_slot_lock() zs_free(handle) zram_slot_lock() compress compress handle = zs_malloc() handle = zs_malloc() zram_slot_lock zram_set_handle(handle) zram_slot_lock zram_slot_lock zram_set_handle(handle) zram_slot_lock Either CPU0 or CPU1 zsmalloc handle will leak because zs_free() is done too early. In fact, we need to reset zram entry right before we set its new handle, all under the same slot lock scope.
Affected products
- Linux kernel: from 6.14 before 6.16.9; 6.17-rc1, 6.17-rc2, 6.17-rc3, 6.17-rc4, 6.17-rc5, 6.17-rc6 — fixed in 6.16.9
How to fix
Upgrade to a fixed version: Linux kernel 6.16.9. Check the vendor advisory for mitigations.
References
- https://git.kernel.org/stable/c/ce4be9e4307c5a60701ff6e0cafa74caffdc54ce
- https://git.kernel.org/stable/c/ff750e9f2c4d63854c33967d1646b5e89a9a19a2
Get alerted when CVE-2025-39941 or the next vulnerability affects your stack