LiveActive security incident?Get immediate response
CVE Record

CVE-2024-42104: nilfs2: add missing check for inode numbers on directory entries

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.

HighCVSS 7.8Not KEV-listedUpdated
Glexia's TakeAutomated analysishigh

Security readout for executives and security teams

Plain-English summary

A locally accessible, corrupted NILFS2 filesystem can trigger a Linux kernel use-after-free during mounting and unmounting. Successful abuse could crash the system or potentially compromise kernel-level confidentiality and integrity. Exposure depends on whether NILFS2 is available and an attacker can cause a crafted filesystem image or device to be mounted.

Executive priority

Prioritize patching systems where users, tenants, or automated workflows can mount externally supplied filesystems. Treat shared hosts and systems processing disk images as higher urgency. Other affected systems should follow routine high-severity kernel maintenance after confirming vendor package status.

Technical view

NILFS2 failed to reject directory entries referencing internal metadata inode numbers. A corrupted image could reduce a metadata inode link count to zero, causing nilfs_evict_inode() to delete it and producing a use-after-free observed in lru_add_fn(). The fix treats these internal inode references as directory-validation errors.

Likely exposure

Systems running affected Linux kernels are most exposed when NILFS2 is enabled and a low-privileged local actor can influence filesystem mounting. Servers that never use NILFS2 or prevent untrusted users from supplying and mounting filesystem images have lower practical exposure. Exact distribution package status requires vendor confirmation.

Exploitation context

The supplied CVSS 3.1 score is 7.8, with local access, low complexity, low privileges, and no user interaction. Syzbot reproduced a kernel failure using a corrupted NILFS2 image. The supplied sources and KEV status do not establish active exploitation in the wild.

Researcher notes

The source bundle identifies multiple stable-kernel fix commits but presents ambiguous flattened version data, including repeated commit identifiers and version boundaries. Use distribution advisories or upstream stable history for precise package mapping. Evidence supports a reproducible use-after-free condition, but not confirmed weaponization or real-world exploitation.

Mitigation direction

  • Install a vendor kernel update incorporating the applicable upstream NILFS2 fix.
  • Check distribution advisories to determine the fixed package for each deployed kernel.
  • Until updated, prevent low-privileged users from mounting untrusted NILFS2 images or devices.
  • Disable unnecessary NILFS2 support according to vendor guidance where operationally acceptable.

Validation and detection

  • Inventory running kernel versions and compare them with vendor-specific CVE advisories.
  • Determine whether NILFS2 support is installed, enabled, or required on each system.
  • Review mount permissions and workflows for exposure to untrusted filesystem images or devices.
  • Confirm the updated kernel contains the applicable upstream fix and is currently running.
  • Review kernel logs for related NILFS2 errors or lru_add_fn() bug reports.
Prepared
Confidence
medium
Sources
5

Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.

Potential ATT&CK relevance

Conservative CVE-to-ATT&CK context

These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.

ATT&CK lookup starting points

Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.

cve · low confidence lookup

CVE-2024-42104 mapping review

Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.

Open ATT&CK lookup
Vulnerability profileCVE Program record
Severity
High
CVSS
7.8 (3.1)
Known Exploited
No
Published

Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Official CVE source material

CNA and ADP enrichment extracted from CVE v5

These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.

1CVSS vectors
3Timeline events
2ADP providers
10Source links

SSVC decision data

CISA-ADPCISA Coordinator
Timestamp
Version
2.0.3
Exploitation: noneAutomatable: noTechnical Impact: partial

CVSS vector scores

1 official score

We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.

ScoreVersionSeverityVectorExploitImpactSource
7.8CVSS 3.1HighCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H1.85.9Linux

Vulnerability scoring details

Base CVSS 3.1 score

7.8High
CVSS 3.1 vector shape for CVE-2024-42104Attack VectorAttack ComplexityPrivileges RequiredUser InteractionScopeConfidentiality ImpactIntegrity ImpactAvailability Impact

Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Attack Vector
NetworkAdjacentLocalPhysical
Attack Complexity
LowHigh
Privileges Required
NoneLowHigh
User Interaction
NoneRequired
Scope
ChangedUnchanged
Confidentiality Impact
HighLowNone
Integrity Impact
HighLowNone
Availability Impact
HighLowNone

Vulnerability timeline

Timeline events are normalized from CVE metadata, CNA source timelines, ADP timelines, and KEV metadata when present.

  1. CVE reservedCVE Program

    The CVE ID was reserved by the assigning CNA.

  2. CVE publishedCVE Program

    The CVE record was published.

  3. CVE updatedCVE Program

    The CVE record metadata indicates this as the latest update time.

ADP provider summaries

CVECVE Program Container
CISA-ADPCISA ADP Vulnrichment
other:ssvc
Affected products

Products and packages named in the record

VendorProductVersion / packageStatus
LinuxLinux2ba466d74ed74f073257f86e61519cb8f8f46184, 2ba466d74ed74f073257f86e61519cb8f8f46184, 2ba466d74ed74f073257f86e61519cb8f8f46184, 2ba466d74ed74f073257f86e61519cb8f8f46184, 2ba466d74ed74f073257f86e61519cb8f8f46184, 2ba466d74ed74f073257f86e61519cb8f8f46184, 2ba466d74ed74f073257f86e61519cb8f8f46184, 2ba466d74ed74f073257f86e61519cb8f8f46184unaffected
LinuxLinux2.6.30, 0, 4.19.318, 5.4.280, 5.10.222, 5.15.163, 6.1.98, 6.6.39, 6.9.9, 6.10affected
Weakness

CWE details

No CWE listed

CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.