CVE-2025-39941

Source
https://cve.org/CVERecord?id=CVE-2025-39941
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-39941.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2025-39941
Downstream
Published
2025-10-04T07:31:04.080Z
Modified
2026-04-02T12:48:13.354390Z
Summary
zram: fix slot write race condition
Details

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 zramslotlock() zsfree(handle) zramslotlock() zramslotlock() zsfree(handle) zramslotlock()

compress compress handle = zsmalloc() handle = zsmalloc() zramslotlock zramsethandle(handle) zramslotlock zramslotlock zramsethandle(handle) zramslotlock

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.

Database specific
{
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/39xxx/CVE-2025-39941.json",
    "cna_assigner": "Linux"
}
References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
71268035f5d734ad6373d953298bd5779985497a
Fixed
ff750e9f2c4d63854c33967d1646b5e89a9a19a2
Fixed
ce4be9e4307c5a60701ff6e0cafa74caffdc54ce

Database specific

source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-39941.json"