Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795099139; b=b+oUmoBu63o+qgCln+5B6jgqndAQomVwh+dIehXShlct+1jgllzIZY7sZD1uXFK/cqu3 ZHd5SwFW4LuWqLKTUQkWzso8pKBYOmkmsDoKSlsYc8SJwRKn17D+RVovJIUimidW2BhjH pUpkSKiETyQ4lZLI0mFGG2xO+gYf9ic0/t1vCfqTD5geeynPPn/9Vt7XHMZaR8suQ5yUd a9WO8kdgx6m/aTpk9zyYVL5ZxOWEhHM4xYvxA8FXb+nItWPxk0MD+xbteNtYTsxVuUa0J Kqf49HmMHMm3ygpVw1n3pTSqU52yPuw+MNOyJn17ldoyHKKpPFHcKR6HU7PcOsCG2+g== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795099139; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer: Reply-To:MIME-Version:Lines:X-Developer-Signature:X-Developer-Key: Content-Transfer-Encoding; bh=PtBugzFek+cQc0mue/Igg6emoXvMUbqgTBOeeVFiplk=; b=NG7WMvUpA5rPSvwNR9gAh9XHJqjm/GCYitMUVenQ18l2Iqod3K1aoUZWL4FAHeJtjqb6 Vs02jXI6OW1WKKZRQ2XnP1xAVgjDWX0QO+CSRl1/b/V/g92gq5TOKnD46k+Zul/+JgTk+ EsEL84hYv22IGWfjP2UrwwVUSF9YeGyjBHZ+160Q15jHGPUW3wLwy/YU5sgWXNUVkwvXq YVFL7uyLMmL8zS7Uc9hXHF9VjaxDAJInoBYo2/LsAxUCr1gwqmDZoL1QH1MdxoONAZL3T N6hAxU+jhLKed8QBMRT0Tyak14CEYxgiNLNgTn98f6IQ7/UnFpM9rl16w2flp3XMBzg== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=HwmxuWen; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AFC73606A320 for ; Thu, 19 Nov 2026 14:38:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=HwmxuWen Received: by smtp.kernel.org (Postfix) with ESMTPSA id CD7B91F000C4; Thu, 19 Nov 2026 14:38:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1795099139; bh=PtBugzFek+cQc0mue/Igg6emoXvMUbqgTBOeeVFiplk=; h=From:To:Cc:Subject:Date:Reply-To; b=HwmxuWen7QZIcpHpYXGb6nrisV4ADpx8RxuU7SG5JZ0ZAac8QPgtjRNF8SsKWBs7U 2Wftz66xMEHiYTin6QxooeMUig+WXtz+UxdZcwu8XKj3mFPQV2WyFJjaTbhDniXTaJ vPy9kBzGfSz6FT7K2y7Fj9YCVoQyUuIjrszXfYUA= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-99375: NFSv4/flexfiles: fail I/O to the data server once a lock is lost Date: Thu, 19 Nov 2026 15:24:33 +0100 Message-ID: <2026111952-CVE-2026-99375-801e@gregkh> X-Mailer: git-send-email 2.56.0 Reply-To: , X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=4702; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=NIjLWGLbkh6O9MkzuVo2k75NrmfaDg3O5AgD7IxylRE=; b=owGbwMvMwCRo6H6F97bub03G02pJDFn/2Sq+d7Gerxef3rBeaiKHz7mgI+IqvFutVaJjvsd2y hc+Ud7VEcvCIMjEICumyPJlG8/R/RWHFL0MbU/DzGFlAhnCwMUpABMxmc8wT7klX6Vus/UPs/re hxGuu9NfaEl1Myy4ZndqdYHFSoF8m3eP48JrNjw2nmUPAA== X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit From: Greg Kroah-Hartman Description =========== In the Linux kernel, the following vulnerability has been resolved: NFSv4/flexfiles: fail I/O to the data server once a lock is lost When a client loses a byte-range lock, because its lease expired and it may not recover the lock (nfs.recover_lost_locks=0) or because reclaim failed, it marks the lock state NFS_LOCK_LOST and fails further I/O by that lock owner. Otherwise an application that believes it holds a lock over a range is never told that the lock is gone, and can overwrite data that another client has since written under its own lock on that range. The NFSv4 READ/WRITE and file layout I/O paths apply this in rpc_call_prepare, where nfs4_set_rw_stateid() returns -EIO for a lost lock. The flexfiles data server I/O path does not: the NFSv3 data server path never checked, and the check on the NFSv4 path was removed when the data server stateid began to be taken from the layout. Fail read and write RPCs to the data server in rpc_call_prepare when the lock is lost. The data server path has no use for the stateid that nfs4_set_rw_stateid() selects, and selecting it looks up a delegation or open stateid on every I/O. Instead add nfs4_lock_context_lost(), which only tests NFS_LOCK_LOST, and check it alongside the open state. Its lookup, __nfs4_lookup_lock_state(), is split out of __nfs4_find_lock_state() and takes no reference: a lock state is only unlinked from state->lock_states under state->state_lock, so one found while holding that lock cannot be freed before it is released. Use it in nfs4_copy_lock_stateid() as well, which only reads the lock state under that lock. That drops a reference get and put from stateid selection for all NFSv4 I/O without changing the stateid selected. Terminating the RPC in rpc_call_prepare is not enough on its own. The done callback reads the -EIO as a data server connection error, forgets the device ID, and resets the I/O to pNFS (or, for an NFSv4 data server, possibly to the MDS). After a reset to pNFS a new LAYOUTGET is granted and rpc_call_prepare fails the I/O again, without end. The existing NFS_CONTEXT_BAD check does not loop, since the open state is then invalid and pnfs_update_layout() fails the reset I/O, but it still forgets the device ID. So when an RPC that was never sent fails and the open context is bad, the open state is invalid, or the lock is lost, complete it with -EIO without error handling. An RPC that was sent and failed is handled as before, so a real data server error is still reported to the MDS. The Linux kernel CVE team has assigned CVE-2026-99375 to this issue. Affected and fixed versions =========================== Issue introduced in 4.0 with commit d67ae825a59d639e4d8b82413af84d854617a87e and fixed in 6.12.117 with commit 88f3916a239fc945362eaac13ca2e29f59539f42 Issue introduced in 4.0 with commit d67ae825a59d639e4d8b82413af84d854617a87e and fixed in 6.18.61 with commit 938f374ec83912d1383810a1d31aa7ac1940b11e Issue introduced in 4.0 with commit d67ae825a59d639e4d8b82413af84d854617a87e and fixed in 7.3.2 with commit fe52fa5319458d3d5f04046422b4cf954024a26f Issue introduced in 4.0 with commit d67ae825a59d639e4d8b82413af84d854617a87e and fixed in 7.4-rc1 with commit 7fa2ad367abe6d3155daefb57331e7fce1a17afd 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-2026-99375 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/flexfilelayout/flexfilelayout.c fs/nfs/nfs4_fs.h fs/nfs/nfs4state.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/88f3916a239fc945362eaac13ca2e29f59539f42 https://git.kernel.org/stable/c/938f374ec83912d1383810a1d31aa7ac1940b11e https://git.kernel.org/stable/c/fe52fa5319458d3d5f04046422b4cf954024a26f https://git.kernel.org/stable/c/7fa2ad367abe6d3155daefb57331e7fce1a17afd