CVE-2025-21736

nilfs2: fix possible int overflows in nilfs_fiemap()

No CVSS score yet EPSS 0.25%

Published 27 Feb 2025 Updated 11 May 2026 CNA: Linux

Check your servers for CVE-2025-21736

The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2025-21736 affects the running kernel, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.

Check my servers

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.

Exploitation

EPSS 0.25%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 18.1% of all scored CVEs. Scores of 1 Dec 2026.

Affected products

As the CNA lists them.

ProductVersions
Linux
affected from 622daaff0a8975fb5c5b95f24f3234550ba32e92, before 7649937987fed51ed09985da4019d50189fc534e
affected from 622daaff0a8975fb5c5b95f24f3234550ba32e92, before 58b1c6881081f5ddfb9a14dc241a74732c0f855c
affected from 622daaff0a8975fb5c5b95f24f3234550ba32e92, before 8f41df5fd4c11d26e929a85f7239799641f92da7
affected from 622daaff0a8975fb5c5b95f24f3234550ba32e92, before f3d80f34f58445355fa27b9579a449fb186aa64e
affected from 622daaff0a8975fb5c5b95f24f3234550ba32e92, before f2bd0f1ab47822fe5bd699c8458b896c4b2edea1
affected from 622daaff0a8975fb5c5b95f24f3234550ba32e92, before b9495a9109abc31d3170f7aad7d48aa64610a1a2
affected from 622daaff0a8975fb5c5b95f24f3234550ba32e92, before 250423300b4b0335918be187ef3cade248c06e6a
affected from 622daaff0a8975fb5c5b95f24f3234550ba32e92, before 6438ef381c183444f7f9d1de18f22661cba1e946
Other versions: unaffected
Linux
affected 2.6.38
unaffected before 2.6.38
unaffected from 5.4.291 up to and including 5.4.*
unaffected from 5.10.235 up to and including 5.10.*
unaffected from 5.15.179 up to and including 5.15.*
unaffected from 6.1.129 up to and including 6.1.*
unaffected from 6.6.78 up to and including 6.6.*
unaffected from 6.12.14 up to and including 6.12.*
unaffected from 6.13.3 up to and including 6.13.*
unaffected 6.14 and later
Other versions: affected

Is my server affected?

This CVE is in the Linux kernel. Compare the running kernel with the fixed kernel version of your distribution, and reboot after a kernel update:

uname -r
# Debian, Ubuntu: does the changelog of the running kernel name the CVE?
zgrep -l CVE-2025-21736 /usr/share/doc/linux-image-$(uname -r)/changelog.Debian.gz
# RHEL, Rocky, Alma
rpm -q --changelog kernel | grep CVE-2025-21736

With Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:

trivy rootfs --scanners vuln / | grep CVE-2025-21736
trivy image --scanners vuln IMAGE | grep CVE-2025-21736

Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.

References

Other references

Source: the record CVE-2025-21736 of the CVE List (CVE Program), CVE Terms of Use; EPSS of FIRST. The text of the record is shown as published. Data sources and licences.