CVE-2024-42104
"Linux Kernel Nilfs2 Use-After-Free Vulnerability"
Description
In the Linux kernel, the following vulnerability has been resolved: nilfs2: add missing check for inode numbers on directory entries Syzbot reported that mounting and unmounting a specific pattern of corrupted nilfs2 filesystem images causes a use-after-free of metadata file inodes, which triggers a kernel bug in lru_add_fn(). As Jan Kara pointed out, this is because the link count of a metadata file gets corrupted to 0, and nilfs_evict_inode(), which is called from iput(), tries to delete that inode (ifile inode in this case). The inconsistency occurs because directories containing the inode numbers of these metadata files that should not be visible in the namespace are read without checking. Fix this issue by treating the inode numbers of these internal files as errors in the sanity check helper when reading directory folios/pages. Also thanks to Hillf Danton and Matthew Wilcox for their initial mm-layer analysis.
INFO
Published Date :
July 30, 2024, 8:15 a.m.
Last Modified :
Nov. 21, 2024, 9:33 a.m.
Source :
416baaa9-dc9f-4396-8d5f-8c081fb06d67
Remotely Exploitable :
No
Impact Score :
5.9
Exploitability Score :
1.8
References to Advisories, Solutions, and Tools
Here, you will find a curated list of external links that provide in-depth
information, practical solutions, and valuable tools related to
CVE-2024-42104
.
We scan GitHub repositories to detect new proof-of-concept exploits. Following list is a collection of public exploits and proof-of-concepts, which have been published on GitHub (sorted by the most recently updated).
Results are limited to the first 15 repositories due to potential performance issues.
The following list is the news that have been mention
CVE-2024-42104
vulnerability anywhere in the article.
The following table lists the changes that have been made to the
CVE-2024-42104
vulnerability over time.
Vulnerability history details can be useful for understanding the evolution of a vulnerability, and for identifying the most recent changes that may impact the vulnerability's severity, exploitability, or other characteristics.
-
CVE Modified by af854a3a-2127-422b-91ae-364da2661108
Nov. 21, 2024
Action Type Old Value New Value Added Reference https://git.kernel.org/stable/c/07c176e7acc5579c133bb923ab21316d192d0a95 Added Reference https://git.kernel.org/stable/c/1b7d549ed2c1fa202c751b69423a0d3a6bd5a180 Added Reference https://git.kernel.org/stable/c/265fff1a01cdc083aeaf0d934c929db5cc64aebf Added Reference https://git.kernel.org/stable/c/2f2fa9cf7c3537958a82fbe8c8595a5eb0861ad7 Added Reference https://git.kernel.org/stable/c/3ab40870edb883b9633dc5cd55f5a2a11afa618d Added Reference https://git.kernel.org/stable/c/b11e8fb93ea5eefb2e4e719497ea177a58ff6131 Added Reference https://git.kernel.org/stable/c/bb76c6c274683c8570ad788f79d4b875bde0e458 Added Reference https://git.kernel.org/stable/c/c33c2b0d92aa1c2262d999b2598ad6fbd53bd479 -
Initial Analysis by [email protected]
Aug. 27, 2024
Action Type Old Value New Value Added CVSS V3.1 NIST AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H Changed Reference Type https://git.kernel.org/stable/c/07c176e7acc5579c133bb923ab21316d192d0a95 No Types Assigned https://git.kernel.org/stable/c/07c176e7acc5579c133bb923ab21316d192d0a95 Patch Changed Reference Type https://git.kernel.org/stable/c/1b7d549ed2c1fa202c751b69423a0d3a6bd5a180 No Types Assigned https://git.kernel.org/stable/c/1b7d549ed2c1fa202c751b69423a0d3a6bd5a180 Patch Changed Reference Type https://git.kernel.org/stable/c/265fff1a01cdc083aeaf0d934c929db5cc64aebf No Types Assigned https://git.kernel.org/stable/c/265fff1a01cdc083aeaf0d934c929db5cc64aebf Patch Changed Reference Type https://git.kernel.org/stable/c/2f2fa9cf7c3537958a82fbe8c8595a5eb0861ad7 No Types Assigned https://git.kernel.org/stable/c/2f2fa9cf7c3537958a82fbe8c8595a5eb0861ad7 Patch Changed Reference Type https://git.kernel.org/stable/c/3ab40870edb883b9633dc5cd55f5a2a11afa618d No Types Assigned https://git.kernel.org/stable/c/3ab40870edb883b9633dc5cd55f5a2a11afa618d Patch Changed Reference Type https://git.kernel.org/stable/c/b11e8fb93ea5eefb2e4e719497ea177a58ff6131 No Types Assigned https://git.kernel.org/stable/c/b11e8fb93ea5eefb2e4e719497ea177a58ff6131 Patch Changed Reference Type https://git.kernel.org/stable/c/bb76c6c274683c8570ad788f79d4b875bde0e458 No Types Assigned https://git.kernel.org/stable/c/bb76c6c274683c8570ad788f79d4b875bde0e458 Patch Changed Reference Type https://git.kernel.org/stable/c/c33c2b0d92aa1c2262d999b2598ad6fbd53bd479 No Types Assigned https://git.kernel.org/stable/c/c33c2b0d92aa1c2262d999b2598ad6fbd53bd479 Patch Added CWE NIST CWE-416 Added CPE Configuration OR *cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* versions up to (excluding) 4.19.318 *cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* versions from (including) 4.20 up to (excluding) 5.4.280 *cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* versions from (including) 5.5 up to (excluding) 5.10.222 *cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* versions from (including) 5.11 up to (excluding) 5.15.163 *cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* versions from (including) 5.16 up to (excluding) 6.1.98 *cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* versions from (including) 6.2 up to (excluding) 6.6.39 *cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* versions from (including) 6.7 up to (excluding) 6.9.9 -
CVE Received by 416baaa9-dc9f-4396-8d5f-8c081fb06d67
Jul. 30, 2024
Action Type Old Value New Value Added Description In the Linux kernel, the following vulnerability has been resolved: nilfs2: add missing check for inode numbers on directory entries Syzbot reported that mounting and unmounting a specific pattern of corrupted nilfs2 filesystem images causes a use-after-free of metadata file inodes, which triggers a kernel bug in lru_add_fn(). As Jan Kara pointed out, this is because the link count of a metadata file gets corrupted to 0, and nilfs_evict_inode(), which is called from iput(), tries to delete that inode (ifile inode in this case). The inconsistency occurs because directories containing the inode numbers of these metadata files that should not be visible in the namespace are read without checking. Fix this issue by treating the inode numbers of these internal files as errors in the sanity check helper when reading directory folios/pages. Also thanks to Hillf Danton and Matthew Wilcox for their initial mm-layer analysis. Added Reference kernel.org https://git.kernel.org/stable/c/c33c2b0d92aa1c2262d999b2598ad6fbd53bd479 [No types assigned] Added Reference kernel.org https://git.kernel.org/stable/c/07c176e7acc5579c133bb923ab21316d192d0a95 [No types assigned] Added Reference kernel.org https://git.kernel.org/stable/c/2f2fa9cf7c3537958a82fbe8c8595a5eb0861ad7 [No types assigned] Added Reference kernel.org https://git.kernel.org/stable/c/b11e8fb93ea5eefb2e4e719497ea177a58ff6131 [No types assigned] Added Reference kernel.org https://git.kernel.org/stable/c/1b7d549ed2c1fa202c751b69423a0d3a6bd5a180 [No types assigned] Added Reference kernel.org https://git.kernel.org/stable/c/3ab40870edb883b9633dc5cd55f5a2a11afa618d [No types assigned] Added Reference kernel.org https://git.kernel.org/stable/c/265fff1a01cdc083aeaf0d934c929db5cc64aebf [No types assigned] Added Reference kernel.org https://git.kernel.org/stable/c/bb76c6c274683c8570ad788f79d4b875bde0e458 [No types assigned]
CWE - Common Weakness Enumeration
While CVE identifies
specific instances of vulnerabilities, CWE categorizes the common flaws or
weaknesses that can lead to vulnerabilities. CVE-2024-42104
is
associated with the following CWEs:
Common Attack Pattern Enumeration and Classification (CAPEC)
Common Attack Pattern Enumeration and Classification
(CAPEC)
stores attack patterns, which are descriptions of the common attributes and
approaches employed by adversaries to exploit the CVE-2024-42104
weaknesses.