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.
Advisories
Source ID Title
Debian DLA Debian DLA DLA-4008-1 linux-6.1 security update
Debian DSA Debian DSA DSA-5747-1 linux security update
Ubuntu USN Ubuntu USN USN-7003-1 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-7003-2 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-7003-3 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-7003-4 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-7003-5 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-7006-1 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-7007-1 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-7007-2 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-7007-3 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-7009-1 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-7009-2 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-7019-1 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-7089-1 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-7089-2 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-7089-3 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-7089-4 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-7089-5 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-7089-6 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-7089-7 Linux kernel (Low Latency) vulnerabilities
Ubuntu USN Ubuntu USN USN-7090-1 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-7095-1 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-7121-1 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-7121-2 Linux kernel (Azure) vulnerabilities
Ubuntu USN Ubuntu USN USN-7121-3 Linux kernel (Oracle) vulnerabilities
Ubuntu USN Ubuntu USN USN-7148-1 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-7156-1 Linux kernel (GKE) vulnerabilities
Fixes

Solution

No solution given by the vendor.


Workaround

No workaround given by the vendor.

History

Mon, 03 Nov 2025 22:30:00 +0000

Type Values Removed Values Added
References

Wed, 11 Sep 2024 13:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Tue, 27 Aug 2024 14:45:00 +0000

Type Values Removed Values Added
First Time appeared Linux
Linux linux Kernel
Weaknesses CWE-416
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
Metrics cvssV3_1

{'score': 5.5, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H'}

cvssV3_1

{'score': 7.8, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H'}


Projects

Sign in to view the affected projects.

cve-icon MITRE

Status: PUBLISHED

Assigner: Linux

Published:

Updated: 2026-01-05T10:51:52.100Z

Reserved: 2024-07-29T15:50:41.175Z

Link: CVE-2024-42104

cve-icon Vulnrichment

Updated: 2025-11-03T22:01:39.601Z

cve-icon NVD

Status : Modified

Published: 2024-07-30T08:15:02.900

Modified: 2025-11-03T22:17:38.740

Link: CVE-2024-42104

cve-icon Redhat

Severity : Moderate

Publid Date: 2024-07-30T00:00:00Z

Links: CVE-2024-42104 - Bugzilla

cve-icon OpenCVE Enrichment

No data.

Weaknesses