[<prev] [next>] [day] [month] [year] [list]
Message-ID: <2025040129-CVE-2025-21908-b8ce@gregkh>
Date: Tue, 1 Apr 2025 16:39:32 +0100
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-cve-announce@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Subject: CVE-2025-21908: NFS: fix nfs_release_folio() to not deadlock via kcompactd writeback
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@...ux-foundation.org: fix build]
The Linux kernel CVE team has assigned CVE-2025-21908 to this issue.
Affected and fixed versions
===========================
Issue introduced in 6.3 with commit 96780ca55e3cbf4f150fd5a833a61492c9947b5b and fixed in 6.6.83 with commit ab0727d6e2196682351c25c1dd112136f6991f11
Issue introduced in 6.3 with commit 96780ca55e3cbf4f150fd5a833a61492c9947b5b and fixed in 6.12.19 with commit 5ae31c54cff745832b9bd5b32e71f3d1b607cd1e
Issue introduced in 6.3 with commit 96780ca55e3cbf4f150fd5a833a61492c9947b5b and fixed in 6.13.7 with commit 8253ff29edcb429a9a6c75710941c6a16a9a34b1
Issue introduced in 6.3 with commit 96780ca55e3cbf4f150fd5a833a61492c9947b5b and fixed in 6.14 with commit ce6d9c1c2b5cc785016faa11b48b6cd317eb367e
Please see https://www.kernel.org for a full list of currently supported
kernel versions by the kernel community.
Unaffected versions might change over time as fixes are backported to
older supported kernel versions. The official CVE entry at
https://cve.org/CVERecord/?id=CVE-2025-21908
will be updated if fixes are backported, please check that for the most
up to date information about this issue.
Affected files
==============
The file(s) affected by this issue are:
fs/nfs/file.c
include/linux/compaction.h
include/linux/sched.h
mm/compaction.c
Mitigation
==========
The Linux kernel CVE team recommends that you update to the latest
stable kernel version for this, and many other bugfixes. Individual
changes are never tested alone, but rather are part of a larger kernel
release. Cherry-picking individual commits is not recommended or
supported by the Linux kernel community at all. If however, updating to
the latest release is impossible, the individual changes to resolve this
issue can be found at these commits:
https://git.kernel.org/stable/c/ab0727d6e2196682351c25c1dd112136f6991f11
https://git.kernel.org/stable/c/5ae31c54cff745832b9bd5b32e71f3d1b607cd1e
https://git.kernel.org/stable/c/8253ff29edcb429a9a6c75710941c6a16a9a34b1
https://git.kernel.org/stable/c/ce6d9c1c2b5cc785016faa11b48b6cd317eb367e
Powered by blists - more mailing lists