CVE-2025-21908: Vulnerability in Linux Linux
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]
AI Analysis
Technical Summary
CVE-2025-21908 is a vulnerability identified in the Linux kernel related to the Network File System (NFS) implementation, specifically in the function nfs_release_folio(). The issue arises from a deadlock condition triggered during memory compaction operations handled by the kernel's kcompactd thread. The root cause is that nfs_release_folio() calls nfs_wb_folio(), which initiates writeback operations. When these writebacks occur in the context of kcompactd, a recursive deadlock can happen because kcompactd waits on writeback completion that in turn triggers NFS writeback to the NFS daemon (NFSD) via a loopback mount on the same host. NFSD then blocks waiting for XFS filesystem operations, creating a circular dependency that halts the kcompactd thread indefinitely. This deadlock can severely impact system stability and performance, as kcompactd is responsible for memory compaction, a critical kernel function for managing memory fragmentation. The fix introduced involves adding a PF_KCOMPACTD flag and a helper function current_is_kcompactd() to detect when the current context is kcompactd, allowing nfs_release_folio() to skip calling nfs_wb_folio() in this scenario, thus preventing the deadlock. This vulnerability affects Linux kernel versions identified by the given commit hashes and was publicly disclosed on April 1, 2025. There are no known exploits in the wild at this time, and no CVSS score has been assigned yet.
Potential Impact
For European organizations, this vulnerability poses a risk primarily to systems running Linux kernels with NFS mounts, especially those using XFS filesystems and relying on memory compaction for performance optimization. The deadlock can cause prolonged system hangs or degraded performance, impacting availability of critical services that depend on NFS for file sharing and storage. This is particularly relevant for data centers, cloud service providers, and enterprises using Linux-based infrastructure with NFS storage backends. The deadlock could lead to denial of service conditions, affecting business continuity and potentially causing cascading failures in multi-tenant environments. While this vulnerability does not directly expose confidentiality or integrity risks, the availability impact can be significant, especially in high-demand environments. The absence of known exploits reduces immediate risk, but unpatched systems remain vulnerable to potential future exploitation or accidental triggering of the deadlock under heavy memory compaction and NFS load conditions.
Mitigation Recommendations
European organizations should prioritize updating their Linux kernel to versions that include the fix for CVE-2025-21908. Specifically, kernel versions incorporating the PF_KCOMPACTD flag and the updated nfs_release_folio() logic should be deployed. System administrators should audit their environments for NFS usage patterns, particularly where loopback mounts and XFS filesystems are involved, as these configurations are more susceptible to the deadlock. Monitoring kernel logs for signs of kcompactd thread blocking or prolonged writeback delays can help identify affected systems. In environments where immediate patching is not feasible, temporarily reducing memory compaction aggressiveness or adjusting NFS mount options to minimize writeback recursion may mitigate the risk. Additionally, thorough testing of kernel updates in staging environments is recommended to ensure compatibility and stability before production deployment. Implementing robust system monitoring and alerting for kernel thread stalls will aid in early detection of this issue.
Affected Countries
Germany, France, United Kingdom, Netherlands, Sweden, Finland, Denmark, Ireland
CVE-2025-21908: Vulnerability in Linux Linux
Description
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]
AI-Powered Analysis
Technical Analysis
CVE-2025-21908 is a vulnerability identified in the Linux kernel related to the Network File System (NFS) implementation, specifically in the function nfs_release_folio(). The issue arises from a deadlock condition triggered during memory compaction operations handled by the kernel's kcompactd thread. The root cause is that nfs_release_folio() calls nfs_wb_folio(), which initiates writeback operations. When these writebacks occur in the context of kcompactd, a recursive deadlock can happen because kcompactd waits on writeback completion that in turn triggers NFS writeback to the NFS daemon (NFSD) via a loopback mount on the same host. NFSD then blocks waiting for XFS filesystem operations, creating a circular dependency that halts the kcompactd thread indefinitely. This deadlock can severely impact system stability and performance, as kcompactd is responsible for memory compaction, a critical kernel function for managing memory fragmentation. The fix introduced involves adding a PF_KCOMPACTD flag and a helper function current_is_kcompactd() to detect when the current context is kcompactd, allowing nfs_release_folio() to skip calling nfs_wb_folio() in this scenario, thus preventing the deadlock. This vulnerability affects Linux kernel versions identified by the given commit hashes and was publicly disclosed on April 1, 2025. There are no known exploits in the wild at this time, and no CVSS score has been assigned yet.
Potential Impact
For European organizations, this vulnerability poses a risk primarily to systems running Linux kernels with NFS mounts, especially those using XFS filesystems and relying on memory compaction for performance optimization. The deadlock can cause prolonged system hangs or degraded performance, impacting availability of critical services that depend on NFS for file sharing and storage. This is particularly relevant for data centers, cloud service providers, and enterprises using Linux-based infrastructure with NFS storage backends. The deadlock could lead to denial of service conditions, affecting business continuity and potentially causing cascading failures in multi-tenant environments. While this vulnerability does not directly expose confidentiality or integrity risks, the availability impact can be significant, especially in high-demand environments. The absence of known exploits reduces immediate risk, but unpatched systems remain vulnerable to potential future exploitation or accidental triggering of the deadlock under heavy memory compaction and NFS load conditions.
Mitigation Recommendations
European organizations should prioritize updating their Linux kernel to versions that include the fix for CVE-2025-21908. Specifically, kernel versions incorporating the PF_KCOMPACTD flag and the updated nfs_release_folio() logic should be deployed. System administrators should audit their environments for NFS usage patterns, particularly where loopback mounts and XFS filesystems are involved, as these configurations are more susceptible to the deadlock. Monitoring kernel logs for signs of kcompactd thread blocking or prolonged writeback delays can help identify affected systems. In environments where immediate patching is not feasible, temporarily reducing memory compaction aggressiveness or adjusting NFS mount options to minimize writeback recursion may mitigate the risk. Additionally, thorough testing of kernel updates in staging environments is recommended to ensure compatibility and stability before production deployment. Implementing robust system monitoring and alerting for kernel thread stalls will aid in early detection of this issue.
Affected Countries
For access to advanced analysis and higher rate limits, contact root@offseq.com
Technical Details
- Data Version
- 5.1
- Assigner Short Name
- Linux
- Date Reserved
- 2024-12-29T08:45:45.786Z
- Cisa Enriched
- false
- Cvss Version
- null
- State
- PUBLISHED
Threat ID: 682d9833c4522896dcbe8b8a
Added to database: 5/21/2025, 9:09:07 AM
Last enriched: 6/30/2025, 10:39:55 AM
Last updated: 8/16/2025, 9:31:35 PM
Views: 17
Related Threats
CVE-2025-8567: CWE-79 Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in posimyththemes Nexter Blocks – WordPress Gutenberg Blocks & 1000+ Starter Templates
MediumCVE-2025-41689: CWE-306 Missing Authentication for Critical Function in Wiesemann & Theis Motherbox 3
MediumCVE-2025-41685: CWE-359 Exposure of Private Personal Information to an Unauthorized Actor in SMA ennexos.sunnyportal.com
MediumCVE-2025-8723: CWE-94 Improper Control of Generation of Code ('Code Injection') in mecanik Cloudflare Image Resizing – Optimize & Accelerate Your Images
CriticalCVE-2025-8622: CWE-79 Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in webaware Flexible Map
MediumActions
Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.
External Links
Need enhanced features?
Contact root@offseq.com for Pro access with improved analysis and higher rate limits.