Skip to contentSkip to conversation

CVE-2025-68349: NFSv4/pNFS: Clear NFS_INO_LAYOUTCOMMIT in pnfs_mark_layout_stateid_invalid

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Dec 24, 2025

lore
Share & tools
lore
#0 lore raw

From: Greg Kroah-Hartman <[email protected]>

Description
===========

In the Linux kernel, the following vulnerability has been resolved:

NFSv4/pNFS: Clear NFS_INO_LAYOUTCOMMIT in pnfs_mark_layout_stateid_invalid

Fixes a crash when layout is null during this call stack:

write_inode

    -> nfs4_write_inode
        -> pnfs_layoutcommit_inode

pnfs_set_layoutcommit relies on the lseg refcount to keep the layout around. Need to clear NFS_INO_LAYOUTCOMMIT otherwise we might attempt to reference a null layout.

The Linux kernel CVE team has assigned CVE-2025-68349 to this issue.

Affected and fixed versions
===========================

	Issue introduced in 4.10 with commit fe1cf9469d7bcb6af27e42eb555a41b0135bce4a and fixed in 6.12.63 with commit 59947dff0fb7c19c09ce6dccbcd253fd542b6c25
	Issue introduced in 4.10 with commit fe1cf9469d7bcb6af27e42eb555a41b0135bce4a and fixed in 6.17.13 with commit ca2e7fdad7c683b64821c94a58b9b68733214dad
	Issue introduced in 4.10 with commit fe1cf9469d7bcb6af27e42eb555a41b0135bce4a and fixed in 6.18.2 with commit 38694f9aae00459ab443a7dc8b3949a6b33b560a
	Issue introduced in 4.10 with commit fe1cf9469d7bcb6af27e42eb555a41b0135bce4a and fixed in 6.19-rc1 with commit e0f8058f2cb56de0b7572f51cd563ca5debce746

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

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/pnfs.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/59947dff0fb7c19c09ce6dccbcd253fd542b6c25
	https://git.kernel.org/stable/c/ca2e7fdad7c683b64821c94a58b9b68733214dad
	https://git.kernel.org/stable/c/38694f9aae00459ab443a7dc8b3949a6b33b560a
	https://git.kernel.org/stable/c/e0f8058f2cb56de0b7572f51cd563ca5debce746