Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1B6BF313288 for ; Fri, 5 Sep 2025 17:22:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1757092978; cv=none; b=VL4eUSmjRxS4bI0aEIXdtDApen9LmZq/j3b/ntm2q7GizAkmhzrplTI+7XnzgcGloJ2pO6azNHBTo3/clckdB3axqCgRWGjUYsu7vFdGKKreGNMu/A/+PunRdXL1BMe7YZpKJ8Th8P0oerucJDjTl4pBIg1hBl1CYiLkSu/nvs0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1757092978; c=relaxed/simple; bh=iDU0CMdfLTUx82iZHYWVfe8NkUgNQAThI8nSzzMEZiw=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=H2hXdzefu+xOKNngLqR3sVaoqwQU4kZnRt9YeEi0lLyTqtL0QxLIsuPjzBKue2BwF93LVrxGvOeW4ZTf6En9XU3NBHzQ5x4ylG4Kv3QryKShwpNZoBx2jqcJjJrQuk+lRR7FyyY8KNg+9zhIMB+vOLNz/Qqd/7eYipixZAmJFyg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=g+5Ov7aJ; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="g+5Ov7aJ" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 94874C4CEF1; Fri, 5 Sep 2025 17:22:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1757092978; bh=iDU0CMdfLTUx82iZHYWVfe8NkUgNQAThI8nSzzMEZiw=; h=From:To:Cc:Subject:Date:Reply-to:From; b=g+5Ov7aJiVMC6STztF6egvVUnfk45E+M8/LzaYFzPnCNtck7fuhmeRmHEJ6JYqbGX rmqXiv2SjmTiUHSEYYUYO6k4uQwPGsRU4sIBKQE8TStVqMOQA4IoBwLL4/7ULncnCW mizXZm8nDDfT42BUz7+dpQW3DZpdD5Srq99NJlns= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-39697: NFS: Fix a race when updating an existing write Date: Fri, 5 Sep 2025 19:21:10 +0200 Message-ID: <2025090548-CVE-2025-39697-5284@gregkh> X-Mailer: git-send-email 2.51.0 Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Reply-to: , X-Developer-Signature: v=1; a=openpgp-sha256; l=2536; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=er6M0Z46fiSw2YJ9PTT2o242gkLMiNixmLBulIV9Gis=; b=owGbwMvMwCRo6H6F97bub03G02pJDBm7pT9MtNBwufZRMWnFH/foqjnXr9RXBcl/8J5VXJ2zT a85wHNXRywLgyATg6yYIsuXbTxH91ccUvQytD0NM4eVCWQIAxenAExkAjPDTEZ3iQkrjv672L6R KzvyR9GpmTenLmdYcOyKnNb3zetepG8qCDnCvOvQdU/WBAA= 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: NFS: Fix a race when updating an existing write After nfs_lock_and_join_requests() tests for whether the request is still attached to the mapping, nothing prevents a call to nfs_inode_remove_request() from succeeding until we actually lock the page group. The reason is that whoever called nfs_inode_remove_request() doesn't necessarily have a lock on the page group head. So in order to avoid races, let's take the page group lock earlier in nfs_lock_and_join_requests(), and hold it across the removal of the request in nfs_inode_remove_request(). The Linux kernel CVE team has assigned CVE-2025-39697 to this issue. Affected and fixed versions =========================== Issue introduced in 4.14 with commit bd37d6fce184836bd5e7cd90ce40116a4fadaf2a and fixed in 6.12.44 with commit 92278ae36935a54e65fef9f8ea8efe7e80481ace Issue introduced in 4.14 with commit bd37d6fce184836bd5e7cd90ce40116a4fadaf2a and fixed in 6.16.4 with commit 202a3432d21ac060629a760fff3b0a39859da3ea Issue introduced in 4.14 with commit bd37d6fce184836bd5e7cd90ce40116a4fadaf2a and fixed in 6.17-rc3 with commit 76d2e3890fb169168c73f2e4f8375c7cc24a765e 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-39697 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/pagelist.c fs/nfs/write.c include/linux/nfs_page.h 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/92278ae36935a54e65fef9f8ea8efe7e80481ace https://git.kernel.org/stable/c/202a3432d21ac060629a760fff3b0a39859da3ea https://git.kernel.org/stable/c/76d2e3890fb169168c73f2e4f8375c7cc24a765e