CVE-2024-46781: nilfs2: fix missing cleanup on rollforward recovery error
In the Linux kernel, the following vulnerability has been resolved:
nilfs2: fix missing cleanup on rollforward recovery error
In an error injection test of a routine for mount-time recovery, KASAN
found a use-after-free bug.
It turned out that if data recovery was performed using partial logs
created by dsync writes, but an error occurred before starting the log
writer to create a recovered checkpoint, the inodes whose data had been
recovered were left in the ns_dirty_files list of the nilfs object and
were not freed.
Fix this issue by cleaning up inodes that have read the recovery data if
the recovery routine fails midway before the log writer starts.
Security readout for executives and security teams
Plain-English summary
A Linux NILFS2 filesystem recovery flaw can leave recovered inode objects improperly tracked after a mount-time error, causing a use-after-free. A successful trigger could compromise confidentiality, integrity, and availability. Exposure is limited to systems using affected Linux kernels with NILFS2 recovery conditions; this is not described as remotely exploitable.
Executive priority
Treat as a high-priority kernel maintenance issue on NILFS2-using systems, especially multi-user or untrusted-workload hosts. Patch through normal expedited maintenance. Broader emergency action is not supported by the supplied evidence because exploitation is local, active attacks are unconfirmed, and exposure depends on NILFS2 recovery.
Technical view
During NILFS2 roll-forward recovery of partial logs created by dsync writes, an error before the recovered-checkpoint log writer starts can leave recovered inodes on ns_dirty_files. Subsequent cleanup may access freed memory. KASAN identified the flaw through error injection. The correction cleans those inodes when recovery fails midway.
Likely exposure
Prioritize Linux systems that mount or may process NILFS2 filesystems on affected kernel versions. The supplied record lists versions from 2.6.30 through several stable-series releases, but distribution backports complicate version-only assessment. Systems without NILFS2 usage have substantially lower practical exposure.
Exploitation context
CVSS 3.1 scores this 7.8 with local access, low complexity, low privileges, no user interaction, and high potential impact. The supplied sources do not establish active exploitation, and the CVE is not listed as KEV. Practical triggering requirements beyond the documented recovery-error path remain incomplete.
Researcher notes
The issue was reproduced with KASAN error injection, establishing a genuine use-after-free but not public exploitation. Assessment should focus on reachability of the pre-log-writer recovery failure and distribution backport status. The supplied affected-version data contains duplicated commit entries and should not replace vendor package guidance.
Mitigation direction
Install a vendor-supported kernel containing the applicable stable NILFS2 correction.
Consult distribution advisories because patched kernels may retain older version numbers through backports.
Where operationally feasible, avoid mounting untrusted or unnecessary NILFS2 filesystems until patched.
Restrict local access and filesystem-mount privileges as defense in depth.
Validation and detection
Inventory kernel builds and compare them with vendor-specific fixed package versions.
Identify hosts loading NILFS2 or configured to mount NILFS2 filesystems.
Confirm the installed kernel includes the relevant upstream stable fix or distribution backport.
Review kernel logs for NILFS2 recovery failures or memory-safety diagnostics.
Reboot into the updated kernel and verify the running version.
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-46781 mapping review
Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.
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.
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.