CVE-2025-39941
JSON

7.8high

zram: fix slot write race condition

Severity
7.8high CVSS:3.1 by Linux
Exploit likelihood
0.10% (higher than 0% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
Linux

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

Product or packageVersionsReported by
Linux Linuxfrom 71268035f5d734ad6373d953298bd5779985497a before ff750e9f2c4d63854c33967d1646b5e89a9a19a2, from 71268035f5d734ad6373d953298bd5779985497a before ce4be9e4307c5a60701ff6e0cafa74caffdc54ce, 6.14
Not affected: before 6.14, from 6.16.9 up to 6.16.*, from 6.17 up to *
CVE List
linux linux_kernelfrom 6.14 before 6.16.9, 6.17NVD

All scores

Linux7.8high CVSS:3.1CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
NVD4.7medium CVSS:3.1CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H

Classification

What each source says

CVE List

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.

NVD (es)

En el kernel de Linux, la siguiente vulnerabilidad ha sido resuelta: zram: corregir condición de carrera de escritura de slot Las escrituras concurrentes paralelas al mismo índice de zram resultan en handles de zsmalloc filtrados. Esquemáticamente podemos tener algo como esto: 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 El handle de zsmalloc de la CPU0 o la CPU1 se filtrará porque zs_free() se ejecuta demasiado pronto. De hecho, necesitamos restablecer la entrada de zram justo antes de establecer su nuevo handle, todo bajo el mismo ámbito de bloqueo de slot.

References

Sources

SourceRecordLicence
CVE ListCVE-2025-39941 changed 2026-08-05CVE Terms of Use
NVDCVE-2025-39941 changed 2026-10-19Public domain