CVE-2025-39941

Severity CVSS v4.0:
Pending analysis
Type:
CWE-362 Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition')
Publication date:
04/10/2025
Last modified:
23/01/2026

Description

In the Linux kernel, the following vulnerability has been resolved:<br /> <br /> zram: fix slot write race condition<br /> <br /> Parallel concurrent writes to the same zram index result in leaked<br /> zsmalloc handles. Schematically we can have something like this:<br /> <br /> CPU0 CPU1<br /> zram_slot_lock()<br /> zs_free(handle)<br /> zram_slot_lock()<br /> zram_slot_lock()<br /> zs_free(handle)<br /> zram_slot_lock()<br /> <br /> compress compress<br /> handle = zs_malloc() handle = zs_malloc()<br /> zram_slot_lock<br /> zram_set_handle(handle)<br /> zram_slot_lock<br /> zram_slot_lock<br /> zram_set_handle(handle)<br /> zram_slot_lock<br /> <br /> Either CPU0 or CPU1 zsmalloc handle will leak because zs_free() is done<br /> too early. In fact, we need to reset zram entry right before we set its<br /> new handle, all under the same slot lock scope.

Vulnerable products and versions

CPE From Up to
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 6.14 (including) 6.16.9 (excluding)
cpe:2.3:o:linux:linux_kernel:6.17:rc1:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.17:rc2:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.17:rc3:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.17:rc4:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.17:rc5:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.17:rc6:*:*:*:*:*:*