VYPR
Unrated severityNVD Advisory· Published Nov 12, 2025· Updated Apr 15, 2026

CVE-2025-40200

CVE-2025-40200

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]

AI Insight

LLM-synthesized narrative grounded in this CVE's description and references.

Squashfs now rejects negative file sizes in read_inode() to prevent a kernel warning in overlayfs and potential denial of service.

Root

Cause

In the Linux kernel's Squashfs filesystem, the squashfs_read_inode() function did not validate that the file size (stored as a 64-bit signed integer) was negative. When a crafted Squashfs image containing a negative file size was mounted, the function would propagate this invalid value to other kernel subsystems, such as overlayfs, triggering a warning in ovl_copy_up_file() [1].

Attack

Vector

An attacker with the ability to mount a malicious Squashfs image (e.g., via a removable device, network share, or in a container environment) could exploit this missing validation. The attack requires local access or the ability to trigger a mount operation using a crafted filesystem image. No additional authentication is needed beyond standard mount permissions.

Impact

Upon accessing the file with a negative size, the kernel emits a warning message and may exhibit unpredictable behavior, effectively leading to a denial of service (system instability or panic). The patch by Phillip Lougher adds a check for a negative 64-bit file size in squashfs_read_inode() and returns -EINVAL immediately, preventing the invalid value from reaching higher layers [1].

Mitigation

The fix has been merged into the stable kernel tree. Users should update their kernel to a version containing commit 875fb3f87ae0 or the corresponding backports (commits f271155ff31a, 8118f6612489, 8c7aad767518) [2][3][4]. No workaround other than avoiding the use of untrusted Squashfs images is available.

AI Insight generated on May 19, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.

Affected products

3

Patches

8

Vulnerability mechanics

Generated on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.

References

8

News mentions

0

No linked articles in our index yet.