CVE-2025-21722
Linux Kernel vulnerability analysis and mitigation

Overview

CVE-2025-21722 affects the Linux kernel's NILFS2 filesystem implementation. The vulnerability was discovered in February 2025 and involves inconsistencies in buffer state management when the filesystem detects corruption and falls back to read-only mode. The issue specifically affects the nilfs2 filesystem module in the Linux kernel (Kernel Git).

Technical details

The vulnerability occurs when the filesystem's page/folio write request handlers forcibly clear various states, including working states of buffers, at unexpected times during read-only fallback. This leads to two specific issues: 1) Inconsistency when calling markbufferdirty() to set data or metadata buffers as dirty while detecting the buffer is not in uptodate state, and 2) Incorrect state detection in nilfsbtreepropagate() when propagating dirty states to ancestor nodes of a b-tree (Kernel Git). The vulnerability has been assigned a CVSS v3 Base Score of 5.5 with Local attack vector and Low attack complexity (Red Hat Portal).

Impact

When exploited, this vulnerability can lead to buffer head state inconsistency issues and associated buffer head use-after-free problems when the filesystem is corrupted and falls back to read-only mode. This can potentially result in system instability and filesystem corruption (Kernel Git).

Mitigation and workarounds

A patch has been developed and merged into the Linux kernel that checks if the buffer is referenced before clearing the page/folio state, and skips the clear operation if the buffer is in use. The fix has been confirmed effective through testing by syzbot (Kernel Git).

Additional resources


SourceThis report was generated using AI

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

“Best User Experience I have ever seen, provides full visibility to cloud workloads.”
David EstlickCISO
“Wiz provides a single pane of glass to see what is going on in our cloud environments.”
Adam FletcherChief Security Officer
“We know that if Wiz identifies something as critical, it actually is.”
Greg PoniatowskiHead of Threat and Vulnerability Management