CVE-2025-21908: NFS: fix nfs_release_folio() to not deadlock via kcompactd writeback
In the Linux kernel, the following vulnerability has been resolved:
NFS: fix nfs_release_folio() to not deadlock via kcompactd writeback
Add PF_KCOMPACTD flag and current_is_kcompactd() helper to check for it so
nfs_release_folio() can skip calling nfs_wb_folio() from kcompactd.
Otherwise NFS can deadlock waiting for kcompactd enduced writeback which
recurses back to NFS (which triggers writeback to NFSD via NFS loopback
mount on the same host, NFSD blocks waiting for XFS's call to
__filemap_get_folio):
6070.550357] INFO: task kcompactd0:58 blocked for more than 4435 seconds.
{---
[58] "kcompactd0"
[<0>] folio_wait_bit+0xe8/0x200
[<0>] folio_wait_writeback+0x2b/0x80
[<0>] nfs_wb_folio+0x80/0x1b0 [nfs]
[<0>] nfs_release_folio+0x68/0x130 [nfs]
[<0>] split_huge_page_to_list_to_order+0x362/0x840
[<0>] migrate_pages_batch+0x43d/0xb90
[<0>] migrate_pages_sync+0x9a/0x240
[<0>] migrate_pages+0x93c/0x9f0
[<0>] compact_zone+0x8e2/0x1030
[<0>] compact_node+0xdb/0x120
[<0>] kcompactd+0x121/0x2e0
[<0>] kthread+0xcf/0x100
[<0>] ret_from_fork+0x31/0x40
[<0>] ret_from_fork_asm+0x1a/0x30
---}
[akpm@linux-foundation.org: fix build]
Security readout for executives and security teams
Plain-English summary
CVE-2025-21908 is a Linux kernel NFS deadlock issue. Under specific local conditions, NFS writeback can recurse through memory compaction and block for a long time, causing an availability impact. It is not reported as actively exploited in the provided sources.
Executive priority
Treat as a scheduled but important availability fix. Prioritize NFS-heavy infrastructure and hosts where service hangs would affect production. There is no provided evidence of active exploitation, so this is not an emergency unless affected systems show deadlock symptoms.
Technical view
The flaw is a CWE-667 locking/deadlock issue in nfs_release_folio(). kcompactd-triggered writeback can call nfs_wb_folio(), then recurse back through NFS/NFSD and block. The kernel fix adds PF_KCOMPACTD and current_is_kcompactd() so NFS skips that writeback path from kcompactd.
Likely exposure
Exposure is most relevant to Linux systems running affected kernel versions with NFS in use. The described failure involves NFS loopback on the same host, NFSD, XFS, and memory compaction activity. Systems without NFS usage are less likely to encounter the condition.
Exploitation context
The CVSS vector is local, low complexity, low privileges, no user interaction, and high availability impact. The sources do not show remote exploitation or active exploitation. Practical impact is denial of service through a kernel deadlock rather than data theft or code execution.
Researcher notes
Evidence is limited to the CVE record and Linux stable commits. The vulnerable behavior is a kernel deadlock path, not a memory corruption issue. Affected-version details in the bundle are incomplete, so confirm exact distribution kernel status with vendor advisories.
Mitigation direction
Apply a vendor-supported Linux kernel update containing the referenced stable fixes.
Check distribution advisories for CVE-2025-21908 applicability and package availability.
Prioritize systems using NFS, especially same-host NFS loopback configurations.
If patching is delayed, review whether vulnerable NFS loopback usage can be avoided.
Validation and detection
Inventory Linux kernel versions across NFS servers and clients.
Confirm vendor kernel changelogs mention CVE-2025-21908 or the referenced stable commits.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Potential ATT&CK relevance
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
cwe · low confidence lookup
CWE-667: Exact CWE lookup
Use the exact CWE identifier as the starting point before reviewing related ATT&CK behavior. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.
We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.
CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.
CWE-667 · source CWE mapping
Improper Locking
Improper Locking represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.