# CVE-2025-21811: nilfs2: protect access to buffers with no active references

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 7.8
- **CVSS:** 7.8 (v3.1, CNA) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: High; Integrity impact: High; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.33% (percentile 18, 2026-11-26)
- **CWE:** CWE-416
- **Published:** 2025-02-27T20:01:02.256Z
- **Modified:** 2026-08-05T11:54:38.930Z

## Who should check

- Anyone running Linux \>= 8c26c4e2694a163d525976e804d81cd955bbb40c, \< e1fc4a90a90ea8514246c45435662531975937d9; \>= 8c26c4e2694a163d525976e804d81cd955bbb40c, \< 72cf688d0ce7e642b12ddc9b2a42524737ec1b4a; \>= 8c26c4e2694a163d525976e804d81cd955bbb40c, \< d8ff250e085a4c4cdda4ad1cdd234ed110393143; \>= 8c26c4e2694a163d525976e804d81cd955bbb40c, \< 58c27fa7a610b6e8d44e6220e7dbddfbaccaf439; \>= 8c26c4e2694a163d525976e804d81cd955bbb40c, \< 8e1b9201c9a24638cf09c6e1c9f224157328010b; \>= 8c26c4e2694a163d525976e804d81cd955bbb40c, \< 4b08d23d7d1917bef4fbee8ad81372f49b006656; \>= 8c26c4e2694a163d525976e804d81cd955bbb40c, \< c437dfac9f7a5a46ac2a5e6d6acd3059e9f68188; \>= 8c26c4e2694a163d525976e804d81cd955bbb40c, \< 367a9bffabe08c04f6d725032cce3d891b2b9e1a
- Anyone running Linux 3.10

## Description

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 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.

## Affected and fixed versions

- Linux: \>= 8c26c4e2694a163d525976e804d81cd955bbb40c, \< e1fc4a90a90ea8514246c45435662531975937d9; \>= 8c26c4e2694a163d525976e804d81cd955bbb40c, \< 72cf688d0ce7e642b12ddc9b2a42524737ec1b4a; \>= 8c26c4e2694a163d525976e804d81cd955bbb40c, \< d8ff250e085a4c4cdda4ad1cdd234ed110393143; \>= 8c26c4e2694a163d525976e804d81cd955bbb40c, \< 58c27fa7a610b6e8d44e6220e7dbddfbaccaf439; \>= 8c26c4e2694a163d525976e804d81cd955bbb40c, \< 8e1b9201c9a24638cf09c6e1c9f224157328010b; \>= 8c26c4e2694a163d525976e804d81cd955bbb40c, \< 4b08d23d7d1917bef4fbee8ad81372f49b006656; \>= 8c26c4e2694a163d525976e804d81cd955bbb40c, \< c437dfac9f7a5a46ac2a5e6d6acd3059e9f68188; \>= 8c26c4e2694a163d525976e804d81cd955bbb40c, \< 367a9bffabe08c04f6d725032cce3d891b2b9e1a (cvelist)
- Linux: 3.10 (cvelist)

## Mitigation

- Upgrade Linux to 367a9bffabe08c04f6d725032cce3d891b2b9e1a or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2025-21811. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2025-21811.md
Affected: Linux >= 8c26c4e2694a163d525976e804d81cd955bbb40c, < e1fc4a90a90ea8514246c45435662531975937d9; >= 8c26c4e2694a163d525976e804d81cd955bbb40c, < 72cf688d0ce7e642b12ddc9b2a42524737ec1b4a; >= 8c26c4e2694a163d525976e804d81cd955bbb40c, < d8ff250e085a4c4cdda4ad1cdd234ed110393143; >= 8c26c4e2694a163d525976e…
Fixed in: Linux 72cf688d0ce7e642b12ddc9b2a42524737ec1b4a, Linux 58c27fa7a610b6e8d44e6220e7dbddfbaccaf439, Linux 8e1b9201c9a24638cf09c6e1c9f224157328010b, Linux 4b08d23d7d1917bef4fbee8ad81372f49b006656, Linux 367a9bffabe08c04f6d725032cce3d891b2b9e1a

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2025-21811 being exploited?

There is no confirmed exploitation: CVE-2025-21811 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.33% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2025-21811?

High: CVSS 7.8 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2025-21811?

Linux \>= 8c26c4e2694a163d525976e804d81cd955bbb40c, \< e1fc4a90a90ea8514246c45435662531975937d9; \>= 8c26c4e2694a163d525976e804d81cd955bbb40c, \< 72cf688d0ce7e642b12ddc9b2a42524737ec1b4a; \>= 8c26c4e2694a163d525976e804d81cd955bbb40c, \< d8ff250e085a4c4cdda4ad1cdd234ed110393143; \>= 8c26c4e2694a163d525976e804d81cd955bbb40c, \< 58c27fa7a610b6e8d44e6220e7dbddfbaccaf439; \>= 8c26c4e2694a163d525976e804d81cd955bbb40c, \< 8e1b9201c9a24638cf09c6e1c9f224157328010b; \>= 8c26c4e2694a163d525976e804d81cd955bbb40c, \< 4b08d23d7d1917bef4fbee8ad81372f49b006656; \>= 8c26c4e2694a163d525976e804d81cd955bbb40c, \< c437dfac9f7a5a46ac2a5e6d6acd3059e9f68188; \>= 8c26c4e2694a163d525976e804d81cd955bbb40c, \< 367a9bffabe08c04f6d725032cce3d891b2b9e1a; Linux 3.10.

### Is there a fix for CVE-2025-21811?

Yes. Fixed in Linux 72cf688d0ce7e642b12ddc9b2a42524737ec1b4a, Linux 58c27fa7a610b6e8d44e6220e7dbddfbaccaf439, Linux 8e1b9201c9a24638cf09c6e1c9f224157328010b, Linux 4b08d23d7d1917bef4fbee8ad81372f49b006656, Linux 367a9bffabe08c04f6d725032cce3d891b2b9e1a. Upgrade Linux to 367a9bffabe08c04f6d725032cce3d891b2b9e1a or later.

### How do I check if I'm affected by CVE-2025-21811?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <https://git.kernel.org/stable/c/e1fc4a90a90ea8514246c45435662531975937d9>
- patch: <https://git.kernel.org/stable/c/72cf688d0ce7e642b12ddc9b2a42524737ec1b4a>
- patch: <https://git.kernel.org/stable/c/d8ff250e085a4c4cdda4ad1cdd234ed110393143>
- patch: <https://git.kernel.org/stable/c/58c27fa7a610b6e8d44e6220e7dbddfbaccaf439>
- patch: <https://git.kernel.org/stable/c/8e1b9201c9a24638cf09c6e1c9f224157328010b>
- patch: <https://git.kernel.org/stable/c/4b08d23d7d1917bef4fbee8ad81372f49b006656>
- patch: <https://git.kernel.org/stable/c/c437dfac9f7a5a46ac2a5e6d6acd3059e9f68188>
- patch: <https://git.kernel.org/stable/c/367a9bffabe08c04f6d725032cce3d891b2b9e1a>
- other: <https://lists.debian.org/debian-lts-announce/2025/05/msg00030.html>
- other: <https://lists.debian.org/debian-lts-announce/2025/03/msg00028.html>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2025-21811>

HTML: <https://flawdb.com/CVE-2025-21811> · JSON: <https://flawdb.com/api/v1/entries/CVE-2025-21811>
