CVE-2023-54140: nilfs2: fix WARNING in mark_buffer_dirty due to discarded buffer reuse
In the Linux kernel, the following vulnerability has been resolved:
nilfs2: fix WARNING in mark_buffer_dirty due to discarded buffer reuse
A syzbot stress test using a corrupted disk image reported that
mark_buffer_dirty() called from __nilfs_mark_inode_dirty() or
nilfs_palloc_commit_alloc_entry() may output a kernel warning, and can
panic if the kernel is booted with panic_on_warn.
This is because nilfs2 keeps buffer pointers in local structures for some
metadata and reuses them, but such buffers may be forcibly discarded by
nilfs_clear_dirty_page() in some critical situations.
This issue is reported to appear after commit 28a65b49eb53 ("nilfs2: do
not write dirty data after degenerating to read-only"), but the issue has
potentially existed before.
Fix this issue by checking the uptodate flag when attempting to reuse an
internally held buffer, and reloading the metadata instead of reusing the
buffer if the flag was lost.
Security readout for executives and security teams
Plain-English summary
A flaw in Linux’s NILFS2 filesystem can reuse invalidated metadata buffers when processing a corrupted filesystem. This may trigger a kernel warning and, on systems configured to panic on warnings, crash the operating system. The CVSS assessment also indicates possible confidentiality and integrity impact, although the supplied description demonstrates only warnings and potential panic.
Executive priority
Treat this as a focused high-priority kernel maintenance issue, not an internet-wide emergency. Expedite remediation for hosts using NILFS2 or processing untrusted filesystem images, especially systems configured to panic on warnings. Other Linux hosts should follow normal vendor patch cycles after confirming whether their packaged kernels contain affected code.
Technical view
NILFS2 retains metadata buffer pointers in local structures. Under critical conditions, nilfs_clear_dirty_page() can discard those buffers, yet allocation or inode-dirtying paths may reuse them. The fix checks whether a retained buffer remains up to date and reloads its metadata when necessary. A syzbot stress test using a corrupted disk image exposed the condition.
Likely exposure
Exposure is limited to Linux systems using affected NILFS2 code and processing a filesystem capable of triggering the discarded-buffer condition. Risk is higher where untrusted or corrupted NILFS2 images may be handled or panic_on_warn is enabled. The supplied affected-version data is ambiguous, so kernel and distribution advisories should determine exact exposure.
Exploitation context
The CVSS vector describes a local, low-complexity issue requiring low privileges and no user interaction. The bundle documents discovery through syzbot with a corrupted disk image. It does not establish practical privilege escalation, public weaponization, or active exploitation, and the CVE is not listed as KEV.
Researcher notes
The demonstrated path involves stale NILFS2 metadata-buffer reuse after a buffer loses its uptodate state. Referenced commits appear to carry the correction across stable branches. The supplied version lists contain duplicate commit identifiers and unclear boundaries; do not infer exact vulnerable ranges without distribution mapping. Impact beyond warning or panic is asserted by CVSS but not demonstrated in the description.
Mitigation direction
Update to a vendor-supported kernel containing the applicable upstream NILFS2 stable fix.
Consult the Linux distribution’s advisory to map the fix to its packaged kernel versions.
Prioritize systems that use NILFS2, accept filesystem images, or enable panic_on_warn.
Restrict handling of untrusted NILFS2 media until the corrected kernel is installed.
Validation and detection
Inventory running kernel versions and identify systems with NILFS2 configured, loaded, or mounted.
Compare each packaged kernel against its distribution advisory and the referenced stable fix commits.
Confirm the replacement kernel is active after updating, not merely installed.
Review kernel logs for NILFS2-related mark_buffer_dirty warnings or unexpected warning-triggered panics.
Test filesystem handling safely in an isolated environment without using production data.
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-2023-54140 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.
1CVSS vectors
3Timeline events
0ADP providers
10Source links
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.