# CVE-2025-39941: zram: fix slot write race condition

- Severity: High 7.8 (CVSS:3.1, scored by Linux) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.10%, higher than 0% of CVEs (2026-12-01)
- Published: 2025-10-04T07:31:04.080Z
- Modified: 2026-10-19T21:10:00.160Z
- Weaknesses: CWE-362
- 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.

(As written by CVE List.)

## Affected

- Linux Linux: from 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 *)
- linux linux_kernel: from 6.14 before 6.16.9; 6.17

## Every score

- Linux: CVSS:3.1 7.8 High `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- NVD: CVSS:3.1 4.7 Medium `CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H`

## References

- <https://git.kernel.org/stable/c/ff750e9f2c4d63854c33967d1646b5e89a9a19a2> (patch)
- <https://git.kernel.org/stable/c/ce4be9e4307c5a60701ff6e0cafa74caffdc54ce> (patch)

## Sources

- CVE List: [CVE-2025-39941](https://www.cve.org/CVERecord?id=CVE-2025-39941), CVE Terms of Use, modified 2026-08-05
- NVD: [CVE-2025-39941](https://nvd.nist.gov/vuln/detail/CVE-2025-39941), Public domain, modified 2026-10-19

---

Page: https://cve.day/CVE-2025-39941 · Whole record: https://cve.day/CVE-2025-39941.json · Rebuilt by cve.day 2026-11-25T22:59:05.520Z
