CVE-2024-26982
Severity CVSS v4.0:
Pending analysis
Type:
CWE-125
Out-of-bounds Read
Publication date:
01/05/2024
Last modified:
16/04/2025
Description
In the Linux kernel, the following vulnerability has been resolved:<br />
<br />
Squashfs: check the inode number is not the invalid value of zero<br />
<br />
Syskiller has produced an out of bounds access in fill_meta_index().<br />
<br />
That out of bounds access is ultimately caused because the inode<br />
has an inode number with the invalid value of zero, which was not checked.<br />
<br />
The reason this causes the out of bounds access is due to following<br />
sequence of events:<br />
<br />
1. Fill_meta_index() is called to allocate (via empty_meta_index())<br />
and fill a metadata index. It however suffers a data read error<br />
and aborts, invalidating the newly returned empty metadata index.<br />
It does this by setting the inode number of the index to zero,<br />
which means unused (zero is not a valid inode number).<br />
<br />
2. When fill_meta_index() is subsequently called again on another<br />
read operation, locate_meta_index() returns the previous index<br />
because it matches the inode number of 0. Because this index<br />
has been returned it is expected to have been filled, and because<br />
it hasn&#39;t been, an out of bounds access is performed.<br />
<br />
This patch adds a sanity check which checks that the inode number<br />
is not zero when the inode is created and returns -EINVAL if it is.<br />
<br />
[phillip@squashfs.org.uk: whitespace fix]
Impact
Base Score 3.x
7.10
Severity 3.x
HIGH
Vulnerable products and versions
CPE | From | Up to |
---|---|---|
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 6.6.30 (excluding) | |
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 6.7 (including) | 6.8.8 (excluding) |
cpe:2.3:o:linux:linux_kernel:6.9:rc1:*:*:*:*:*:* | ||
cpe:2.3:o:linux:linux_kernel:6.9:rc2:*:*:*:*:*:* | ||
cpe:2.3:o:linux:linux_kernel:6.9:rc3:*:*:*:*:*:* | ||
cpe:2.3:o:linux:linux_kernel:6.9:rc4:*:*:*:*:*:* |
To consult the complete list of CPE names with products and versions, see this page
References to Advisories, Solutions, and Tools
- https://git.kernel.org/stable/c/32c114a58236fe67141634774559f21f1dc96fd7
- https://git.kernel.org/stable/c/4a1b6f89825e267e156ccaeba3d235edcac77f94
- https://git.kernel.org/stable/c/5b99dea79650b50909c50aba24fbae00f203f013
- https://git.kernel.org/stable/c/7def00ebc9f2d6a581ddf46ce4541f84a10680e5
- https://git.kernel.org/stable/c/9253c54e01b6505d348afbc02abaa4d9f8a01395
- https://git.kernel.org/stable/c/be383effaee3d89034f0828038f95065b518772e
- https://git.kernel.org/stable/c/cf46f88b92cfc0e32bd8a21ba1273cff13b8745f
- https://git.kernel.org/stable/c/7def00ebc9f2d6a581ddf46ce4541f84a10680e5
- https://git.kernel.org/stable/c/9253c54e01b6505d348afbc02abaa4d9f8a01395
- https://git.kernel.org/stable/c/be383effaee3d89034f0828038f95065b518772e