CVE-2025-40312 jfs: Verify inode mode when loading from disk

Not scored Published Updated

A local attacker can cause a denial of service by mounting a corrupted JFS filesystem with an invalid inode mode.

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

What is CVE-2025-40312?

CVE-2025-40312 is a denial of service vulnerability in Linux, published on 8 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:

jfs: Verify inode mode when loading from disk

The inode mode loaded from corrupted disk can be invalid. Do like what commit 0a9e74051313 ("isofs: Verify inode mode when loading from disk") does.

Which versions are affected by CVE-2025-40312?

How do I fix CVE-2025-40312?

Apply the vendor's patch.

Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.

Is CVE-2025-40312 being exploited?

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

Sources

Also known as BELL-CVE-2025-40312, DEBIAN-CVE-2025-40312, GHSA-hh7h-6wp4-3r4m, ROOT-OS-DEBIAN-12-CVE-2025-40312, ROOT-OS-DEBIAN-13-CVE-2025-40312, ROOT-OS-UBUNTU-2204-CVE-2025-40312 and 2 more.

Is CVE-2025-40312 in your software?

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

Check your SBOMs for free