CVE-2025-21736 nilfs2: fix possible int overflows in nilfs_fiemap()

Medium 5.5 Published Updated

An integer overflow in the nilfs2 filesystem's fiemap function could lead to a denial of service, requiring a kernel patch.

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

CVE-2025-21736 is a medium-severity vulnerability in Linux kernel, published on 27 Feb 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:

nilfs2: fix possible int overflows in nilfs_fiemap()

Since nilfs_bmap_lookup_contig() in nilfs_fiemap() calculates its result by being prepared to go through potentially maxblocks == INT_MAX blocks, the value in n may experience an overflow caused by left shift of blkbits.

While it is extremely unlikely to occur, play it safe and cast right hand expression to wider type to mitigate the issue.

Found by Linux Verification Center (linuxtesting.org) with static analysis tool SVACE.

Weakness: CWE-190

Which versions are affected by CVE-2025-21736?

It affects 1 product.

Products include Linux kernel.

How do I fix CVE-2025-21736?

Apply the vendor's patch.

Is CVE-2025-21736 being exploited?

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

All Linux kernel vulnerabilities

Sources

Also known as AZL-57832, BELL-CVE-2025-21736, DEBIAN-CVE-2025-21736, GHSA-jj6f-649q-27mh, ROOT-OS-UBUNTU-2404-CVE-2025-21736, UBUNTU-CVE-2025-21736.

Is CVE-2025-21736 in your software?

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

Check your SBOMs for free