CVE-2024-42104

HIGH

Linux Kernel < 4.19.318, 4.20.0-6.9.9 - Use-After-Free in nilfs2 Directory Entry Handling

Title source: llm
STIX 2.1

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.

Scores

CVSS v3 7.8
EPSS 0.0026
EPSS Percentile 17.3%
Attack Vector LOCAL
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

CISA SSVC

Vulnrichment
Exploitation none
Automatable no
Technical Impact partial

Details

CWE
CWE-416
Status published
Products (26)
linux/Kernel 2.6.30 - 4.19.318linux
linux/Kernel 4.20.0 - 5.4.280linux
linux/Kernel 5.11.0 - 5.15.163linux
linux/Kernel 5.16.0 - 6.1.98linux
linux/Kernel 5.5.0 - 5.10.222linux
linux/Kernel 6.2.0 - 6.6.39linux
linux/Kernel 6.7.0 - 6.9.9linux
Linux/Linux < 2.6.30
Linux/Linux 2.6.30
Linux/Linux 2ba466d74ed74f073257f86e61519cb8f8f46184 - 07c176e7acc5579c133bb923ab21316d192d0a95
... and 16 more
Published Jul 30, 2024
Tracked Since Feb 18, 2026