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

High 7.8 Published Updated

A race condition in the Linux kernel zram driver allows concurrent writes to leak memory, potentially leading to denial of service.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Local or same network only
Victim action needed
Not needed
Fix
Available

What is CVE-2025-39941?

CVE-2025-39941 is a high-severity vulnerability in Linux kernel, published on 4 Oct 2025. It can only be exploited from the same machine or local network, with no action from the victim.

Official 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.

Weakness: CWE-362

Which versions are affected by CVE-2025-39941?

It affects 1 product.

Products include Linux kernel.

How do I fix CVE-2025-39941?

Apply the vendor's patch.

Is CVE-2025-39941 being exploited?

There is no known exploitation of CVE-2025-39941 in the wild and no public exploit code.

All Linux kernel vulnerabilities

Sources

Also known as BELL-CVE-2025-39941, DEBIAN-CVE-2025-39941, GHSA-mjg7-65xv-hcjw, UBUNTU-CVE-2025-39941.

Is CVE-2025-39941 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free