CVE-2025-40049

Source
https://cve.org/CVERecord?id=CVE-2025-40049
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2025-40049.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2025-40049
Downstream
Related
Published
2025-10-28T11:48:25.862Z
Modified
2026-03-20T12:43:09.296505Z
Summary
Squashfs: fix uninit-value in squashfs_get_parent
Details

In the Linux kernel, the following vulnerability has been resolved:

Squashfs: fix uninit-value in squashfsgetparent

Syzkaller reports a "KMSAN: uninit-value in squashfsgetparent" bug.

This is caused by openbyhandle_at() being called with a file handle containing an invalid parent inode number. In particular the inode number is that of a symbolic link, rather than a directory.

Squashfsgetparent() gets called with that symbolic link inode, and accesses the parent member field.

unsigned int parent_ino = squashfs_i(inode)->parent;

Because non-directory inodes in Squashfs do not have a parent value, this is uninitialised, and this causes an uninitialised value access.

The fix is to initialise parent with the invalid inode 0, which will cause an EINVAL error to be returned.

Regular inodes used to share the parent field with the blockliststart field. This is removed in this commit to enable the parent field to contain the invalid inode number 0.

Database specific
{
    "cna_assigner": "Linux",
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/40xxx/CVE-2025-40049.json"
}
References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
122601408d20c77704268f1dea9f9ce4abf997c2
Fixed
f81a5bc9e924ee1950e0dd82bd10749048390f6e
Fixed
382a47fae449e554ef1e8c198667fd2f3270b945
Fixed
61d38b5ce2782bff3cacaacbb8164087a73ed1a5
Fixed
81a2bca52d43fc9d9abf07408b91255131c5dc53
Fixed
c28b0ca029edf5d0558abcd76cb8c732706cd339
Fixed
1b3ccd0019132880c94bb00ca7088c1749308f82
Fixed
91b99db7a92e57ff48a96a1b10fddfd2547e7f53
Fixed
74058c0a9fc8b2b4d5f4a0ef7ee2cfa66a9e49cf

Database specific

source
"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2025-40049.json"

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
2.6.29
Fixed
5.4.301
Type
ECOSYSTEM
Events
Introduced
5.5.0
Fixed
5.10.246
Type
ECOSYSTEM
Events
Introduced
5.11.0
Fixed
5.15.195
Type
ECOSYSTEM
Events
Introduced
5.16.0
Fixed
6.1.156
Type
ECOSYSTEM
Events
Introduced
6.2.0
Fixed
6.6.112
Type
ECOSYSTEM
Events
Introduced
6.7.0
Fixed
6.12.53
Type
ECOSYSTEM
Events
Introduced
6.13.0
Fixed
6.17.3

Database specific

source
"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2025-40049.json"