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

- Priority: **Routine**
- Reason: Not severe (CVSS 7.8, local access); no exploitation reported by the 5 checked sources
- Next step: Fix in the normal cadence
- Status: published
- Published: 2025-02-27 · Modified: 2026-08-05
- Aliases: UBUNTU-CVE-2025-21811, DEBIAN-CVE-2025-21811
- Record: https://cvemate.com/vulnerability/CVE-2025-21811 · JSON: https://cvemate.com/vulnerability/CVE-2025-21811/json

## Description

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

## Signals

- CVSS: 7.8 high (v3.1, CVE.org) CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- EPSS: 0.255%, percentile 18.206%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 0

## Affected (first 20 of 140)

- debian linux (Debian): \< 6.1.129-1 \| \< 6.12.13-1
- ubuntu linux (Ubuntu): All versions (No fix recorded) \| \< 4.4.0-276.310 \| \< 4.15.0-245.257 \| \< 5.4.0-216.236 \| \< 5.15.0-140.150 \| \< 6.8.0-64.67
- ubuntu linux-allwinner-5.19 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws (Ubuntu): \< 4.4.0-1150.156 \| \< 4.4.0-1188.203 \| \< 4.15.0-1187.200 \| \< 5.4.0-1146.156 \| \< 5.15.0-1084.91 \| \< 6.8.0-1032.34
- ubuntu linux-aws-5.0 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.11 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.13 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.15 (Ubuntu): \< 5.15.0-1084.91~20.04.1
- ubuntu linux-aws-5.19 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.3 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.4 (Ubuntu): \< 5.4.0-1146.156~18.04.1
- ubuntu linux-aws-5.8 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-6.2 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-6.5 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-6.8 (Ubuntu): \< 6.8.0-1032.34~22.04.1
- ubuntu linux-aws-fips (Ubuntu): \< 4.15.0-2125.131 \| All versions (No fix recorded) \| \< 5.4.0-1146.156+fips1 \| \< 5.15.0-1084.91+fips1
- ubuntu linux-aws-hwe (Ubuntu): \< 4.15.0-1187.200~16.04.1
- ubuntu linux-azure (Ubuntu): \< 4.15.0-1195.210~14.04.1 \| \< 4.15.0-1195.210~16.04.1 \| All versions (No fix recorded) \| \< 5.4.0-1151.158 \| \< 5.15.0-1089.98 \| \< 6.8.0-1034.39
- ubuntu linux-azure-4.15 (Ubuntu): \< 4.15.0-1195.210
- ubuntu linux-azure-5.11 (Ubuntu): All versions (No fix recorded)

## References (first 20 of 64)

- <https://git.kernel.org/stable/c/e1fc4a90a90ea8514246c45435662531975937d9>
- <https://git.kernel.org/stable/c/72cf688d0ce7e642b12ddc9b2a42524737ec1b4a>
- <https://git.kernel.org/stable/c/d8ff250e085a4c4cdda4ad1cdd234ed110393143>
- <https://git.kernel.org/stable/c/58c27fa7a610b6e8d44e6220e7dbddfbaccaf439>
- <https://git.kernel.org/stable/c/8e1b9201c9a24638cf09c6e1c9f224157328010b>
- <https://git.kernel.org/stable/c/4b08d23d7d1917bef4fbee8ad81372f49b006656>
- <https://git.kernel.org/stable/c/c437dfac9f7a5a46ac2a5e6d6acd3059e9f68188>
- <https://git.kernel.org/stable/c/367a9bffabe08c04f6d725032cce3d891b2b9e1a>
- <https://lists.debian.org/debian-lts-announce/2025/05/msg00030.html>
- <https://lists.debian.org/debian-lts-announce/2025/03/msg00028.html>
- <https://ubuntu.com/security/CVE-2025-21811>
- <https://www.cve.org/CVERecord?id=CVE-2025-21811>
- <https://git.kernel.org/linus/367a9bffabe08c04f6d725032cce3d891b2b9e1a>
- <https://ubuntu.com/security/notices/USN-7510-1>
- <https://ubuntu.com/security/notices/USN-7510-2>
- <https://ubuntu.com/security/notices/USN-7511-1>
- <https://ubuntu.com/security/notices/USN-7511-2>
- <https://ubuntu.com/security/notices/USN-7512-1>
- <https://ubuntu.com/security/notices/USN-7516-1>
- <https://ubuntu.com/security/notices/USN-7516-2>

---

Data as of 2026-12-05T06:21:53.392Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
