CVE-2025-40242 gfs2: Fix unlikely race in gdlm_put_lock

High 7.0 Published Updated

A race condition in the Linux kernel GFS2 filesystem allows dereferencing freed memory, potentially causing a system crash.

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-40242?

CVE-2025-40242 is a high-severity vulnerability in Linux, published on 4 Dec 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:

gfs2: Fix unlikely race in gdlm_put_lock

In gdlm_put_lock(), there is a small window of time in which the DFL_UNMOUNT flag has been set but the lockspace hasn't been released, yet. In that window, dlm may still call gdlm_ast() and gdlm_bast(). To prevent it from dereferencing freed glock objects, only free the glock if the lockspace has actually been released.

Which versions are affected by CVE-2025-40242?

How do I fix CVE-2025-40242?

Apply the vendor's patch.

Is CVE-2025-40242 being exploited?

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

Sources

Also known as BELL-CVE-2025-40242, DEBIAN-CVE-2025-40242, GHSA-4g8j-hwjq-h8fr, ROOT-OS-DEBIAN-11-CVE-2025-40242, ROOT-OS-DEBIAN-12-CVE-2025-40242, ROOT-OS-UBUNTU-2204-CVE-2025-40242 and 2 more.

Is CVE-2025-40242 in your software?

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

Check your SBOMs for free