CVE-2026-138937
Received Received - Intake

nilfs2 Log Write Failure Leaves Dirty Buffers

Vulnerability report for CVE-2026-138937, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.

Publication date: 2026-11-30

Last updated on: 2026-11-30

Assigner: kernel.org

Description

In the Linux kernel, the following vulnerability has been resolved: nilfs2: clear dirty flag on bdev buffers on log write failure Since the commit referenced in the Fixes tag stopped directly calling inode_attach_wb(), a dirty flag is set on buffers (with mark_buffer_dirty()) allocated to the backing device for segment summaries and the super root block during log writes. While this dirty flag is cleared upon a successful log write, it remains uncleared if the log write fails. Consequently, when a log write fails, these backing device buffers are left in an inconsistent state where their uptodate flag and the dirty flag of the containing page/folio are cleared, but the buffer's dirty flag remains as stale garbage. Particularly when the block size is smaller than the page size, if other buffers on the same page/folio become dirty, this buffer unexpectedly becomes a target for writeback again. As a result, if the block is later reused for other data or metadata, that contents risks being corrupted. Fix this issue by calling clear_buffer_dirty() for the backing device buffers when aborting log writes in nilfs_abort_logs().

CVSS Scores

EPSS Scores

Probability:
Percentile:

Meta Information

Published
2026-11-30
Last Modified
2026-11-30
Generated
2026-12-01
AI Q&A
2026-12-01
EPSS Evaluated
N/A
NVD
EUVD

Affected Vendors & Products

Currently, no data is known.

Helpful Resources

Exploitability

CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-UNKNOWN

Attack-Flow Graph

AI Quick Actions

Instant insights powered by AI
Executive Summary

This vulnerability affects the Linux kernel's nilfs2 filesystem. When a log write fails, dirty flags on backing device buffers are not cleared properly. This leaves buffers in an inconsistent state where the dirty flag remains set even though the data is not up-to-date. If other buffers on the same page become dirty later, this stale buffer may be written back, risking data corruption when the block is reused.

Detection Guidance

This vulnerability is specific to the Linux kernel's nilfs2 filesystem and requires kernel-level inspection. Detection involves checking for uncleared dirty flags on backing device buffers during log write failures. No direct network or system commands are provided in the context to detect this issue.

Impact Analysis

If you use a Linux system with the nilfs2 filesystem, this vulnerability could lead to filesystem corruption. Data loss or inconsistencies may occur if log writes fail and buffers are reused. Systems relying on nilfs2 for storage may experience crashes, file corruption, or other stability issues.

Mitigation Strategies

Apply the kernel patch that fixes the issue by clearing dirty flags on backing device buffers during log write failures. Update to a patched kernel version where nilfs_abort_logs() includes clear_buffer_dirty() calls for affected buffers.

Chat Assistant

Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-138937. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70

EPSS Chart

Security Radar

News mentioning this vulnerability
Loading related security news...