# CVE-2025-40200: Squashfs: reject negative file sizes in squashfs_read_inode()

- Severity: not scored yet
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.29%, higher than 14% of CVEs (2026-11-30)
- Published: 2025-11-12T21:56:33.783Z
- Modified: 2026-10-19T21:10:00.160Z
- Assigned by: Linux

## 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]

(As written by CVE List.)

## Affected

- Linux Linux: from 6545b246a2c815a8fcd07d58240effb6ec3481b1 before 54170057a5fadd24a37b70de41e61d39284d9bd7; from 6545b246a2c815a8fcd07d58240effb6ec3481b1 before 2871c74caa3f4f05b429e6bfefebac62dbf1b408; from 6545b246a2c815a8fcd07d58240effb6ec3481b1 before fbfc745db628de31f5c089147deeb87e95b89e66; from 6545b246a2c815a8fcd07d58240effb6ec3481b1 before 8118f66124895829443d09c207e654adcb2f9321; from 6545b246a2c815a8fcd07d58240effb6ec3481b1 before 8c7aad76751816207fee556d44aa88a710824810; from 6545b246a2c815a8fcd07d58240effb6ec3481b1 before 875fb3f87ae0225b881319ba016a1a8c4ffd5812; from 6545b246a2c815a8fcd07d58240effb6ec3481b1 before f271155ff31aca8ef82c61c8df23ca97e9a77dd4; from 6545b246a2c815a8fcd07d58240effb6ec3481b1 before 9f1c14c1de1bdde395f6cc893efa4f80a2ae3b2b; 2.6.29 (not affected: before 2.6.29; from 5.4.301 up to 5.4.*; from 5.10.246 up to 5.10.*; from 5.15.195 up to 5.15.*; from 6.1.157 up to 6.1.*; from 6.6.113 up to 6.6.*; from 6.12.54 up to 6.12.*; from 6.17.4 up to 6.17.*; from 6.18 up to *)

## References

- <https://git.kernel.org/stable/c/54170057a5fadd24a37b70de41e61d39284d9bd7>
- <https://git.kernel.org/stable/c/2871c74caa3f4f05b429e6bfefebac62dbf1b408>
- <https://git.kernel.org/stable/c/fbfc745db628de31f5c089147deeb87e95b89e66>
- <https://git.kernel.org/stable/c/8118f66124895829443d09c207e654adcb2f9321>
- <https://git.kernel.org/stable/c/8c7aad76751816207fee556d44aa88a710824810>
- <https://git.kernel.org/stable/c/875fb3f87ae0225b881319ba016a1a8c4ffd5812>
- <https://git.kernel.org/stable/c/f271155ff31aca8ef82c61c8df23ca97e9a77dd4>
- <https://git.kernel.org/stable/c/9f1c14c1de1bdde395f6cc893efa4f80a2ae3b2b>

## Sources

- CVE List: [CVE-2025-40200](https://www.cve.org/CVERecord?id=CVE-2025-40200), CVE Terms of Use, modified 2026-05-11
- NVD: [CVE-2025-40200](https://nvd.nist.gov/vuln/detail/CVE-2025-40200), Public domain, modified 2026-10-19

---

Page: https://cve.day/CVE-2025-40200 · Whole record: https://cve.day/CVE-2025-40200.json · Rebuilt by cve.day 2026-11-25T22:59:07.599Z
