Cyber Resilience

CVE-2025-21811

High

Published: 27 February 2025

Published
27 February 2025
Modified
03 November 2025
KEV Added
Patch
CVSS Score v3.1 7.8 CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
EPSS Score 0.0003 7.5th percentile
Risk Priority 16 60% EPSS · 20% KEV · 20% CVSS

Summary

CVE-2025-21811 is a high-severity Use After Free (CWE-416) vulnerability in Linux Linux Kernel. Its CVSS base score is 7.8 (High).

Operationally, exploitation aligns with the MITRE ATT&CK technique Exploitation for Privilege Escalation (T1068); ranked at the 7.5th percentile by exploit likelihood (below the median); it is not currently listed in the CISA KEV catalog.

The strongest mitigations our analysis identified are NIST 800-53 SI-2 (Flaw Remediation) and CM-7 (Least Functionality).

Deeper analysis

CVE-2025-21811 is a use-after-free vulnerability (CWE-416) in the Linux kernel's nilfs2 filesystem. The issue affects the nilfs_lookup_dirty_data_buffers() function, which iterates through buffers attached to dirty data folios or pages without properly locking them. This creates a race condition where buffers can lose their dirty state protection asynchronously via nilfs_clear_folio_dirty() during filesystem degeneration to read-only mode, leading to unintentional freeing by try_to_free_buffers() and subsequent use-after-free access. The vulnerability has a CVSS v3.1 base score of 7.8.

A local attacker with low privileges (AV:L/AC:L/PR:L/UI:N/S:U) can exploit this flaw. Successful exploitation could result in high impacts to confidentiality, integrity, and availability (C:H/I:H/A:H), potentially allowing arbitrary code execution, data corruption, or system crashes on systems using the nilfs2 filesystem.

Mitigation involves applying kernel patches from the referenced stable commits, which adjust the lock section in nilfs_lookup_dirty_data_buffers() to protect buffer access. The patches are available at: https://git.kernel.org/stable/c/367a9bffabe08c04f6d725032cce3d891b2b9e1a, https://git.kernel.org/stable/c/4b08d23d7d1917bef4fbee8ad81372f49b006656, https://git.kernel.org/stable/c/58c27fa7a610b6e8d44e6220e7dbddfbaccaf439, https://git.kernel.org/stable/c/72cf688d0ce7e642b12ddc9b2a42524737ec1b4a, and https://git.kernel.org/stable/c/8e1b9201c9a24638cf09c6e1c9f224157328010b.

EU & UK References

Vulnerability details

In the Linux kernel, the following vulnerability has been resolved: nilfs2: protect access to buffers with no active references nilfs_lookup_dirty_data_buffers(), which iterates through the buffers attached to dirty data folios/pages, accesses the attached buffers without locking the folios/pages. For data…

more

cache, nilfs_clear_folio_dirty() may be called asynchronously when the file system degenerates to read only, so nilfs_lookup_dirty_data_buffers() still has the potential to cause use after free issues when buffers lose the protection of their dirty state midway due to this asynchronous clearing and are unintentionally freed by try_to_free_buffers(). Eliminate this race issue by adjusting the lock section in this function.

CWE(s)

Related Threats

MITRE ATT&CK Enterprise TechniquesAI

T1068 Exploitation for Privilege Escalation Privilege Escalation
Adversaries may exploit software vulnerabilities in an attempt to elevate privileges.
Why these techniques?

Use-after-free in Linux kernel nilfs2 allows local low-priv attacker to achieve arbitrary code execution via race condition, directly enabling exploitation for privilege escalation.

Confidence: HIGH · MITRE ATT&CK Enterprise v18.1

CVEs Like This One

CVE-2026-23111Same product: Linux Linux Kernel
CVE-2026-31530Same product: Linux Linux Kernel
CVE-2026-43019Same product: Linux Linux Kernel
CVE-2026-23158Same product: Linux Linux Kernel
CVE-2025-21893Same product: Linux Linux Kernel
CVE-2026-31446Same product: Linux Linux Kernel
CVE-2026-31650Same product: Linux Linux Kernel
CVE-2026-23001Same product: Linux Linux Kernel
CVE-2024-50051Same product: Linux Linux Kernel
CVE-2025-21759Same product: Linux Linux Kernel

Affected Assets

linux
linux kernel
3.10 — 5.4.291 · 5.5 — 5.10.235 · 5.11 — 5.15.179

Mitigating Controls

Mitigating Controls (NIST 800-53 r5) AI

prevent

Directly mandates identification, reporting, and correction of the use-after-free flaw in nilfs2 via timely kernel patching as specified in the CVE mitigation.

prevent

Implements memory safeguards like address space layout randomization and data execution protection to mitigate exploitation of the kernel use-after-free race condition.

prevent

Restricts or prohibits non-essential nilfs2 filesystem functionality, preventing local attackers from triggering the vulnerability on systems where it is not required.

References