CVE-2025-40200

Squashfs: reject negative file sizes in squashfs_read_inode()

No CVSS score yet EPSS 0.21%

Published 12 Nov 2025 Updated 11 May 2026 CNA: Linux

Check your servers for CVE-2025-40200

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-40200 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:

Squashfs: reject negative file sizes in squashfs_read_inode()

Syskaller reports a "WARNING in ovl_copy_up_file" in overlayfs.

This warning is ultimately caused because the underlying Squashfs file system returns a file with a negative file size.

This commit checks for a negative file size and returns EINVAL.

[phillip@squashfs.org.uk: only need to check 64 bit quantity]

Exploitation

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

Affected products

As the CNA lists them.

ProductVersions
Linux
affected from 6545b246a2c815a8fcd07d58240effb6ec3481b1, before 54170057a5fadd24a37b70de41e61d39284d9bd7
affected from 6545b246a2c815a8fcd07d58240effb6ec3481b1, before 2871c74caa3f4f05b429e6bfefebac62dbf1b408
affected from 6545b246a2c815a8fcd07d58240effb6ec3481b1, before fbfc745db628de31f5c089147deeb87e95b89e66
affected from 6545b246a2c815a8fcd07d58240effb6ec3481b1, before 8118f66124895829443d09c207e654adcb2f9321
affected from 6545b246a2c815a8fcd07d58240effb6ec3481b1, before 8c7aad76751816207fee556d44aa88a710824810
affected from 6545b246a2c815a8fcd07d58240effb6ec3481b1, before 875fb3f87ae0225b881319ba016a1a8c4ffd5812
affected from 6545b246a2c815a8fcd07d58240effb6ec3481b1, before f271155ff31aca8ef82c61c8df23ca97e9a77dd4
affected from 6545b246a2c815a8fcd07d58240effb6ec3481b1, before 9f1c14c1de1bdde395f6cc893efa4f80a2ae3b2b
Other versions: unaffected
Linux
affected 2.6.29
unaffected before 2.6.29
unaffected from 5.4.301 up to and including 5.4.*
unaffected from 5.10.246 up to and including 5.10.*
unaffected from 5.15.195 up to and including 5.15.*
unaffected from 6.1.157 up to and including 6.1.*
unaffected from 6.6.113 up to and including 6.6.*
unaffected from 6.12.54 up to and including 6.12.*
unaffected from 6.17.4 up to and including 6.17.*
unaffected 6.18 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-40200 /usr/share/doc/linux-image-$(uname -r)/changelog.Debian.gz
# RHEL, Rocky, Alma
rpm -q --changelog kernel | grep CVE-2025-40200

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-40200
trivy image --scanners vuln IMAGE | grep CVE-2025-40200

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