From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 8442F58FD1A for ; Fri, 11 Sep 2026 20:02:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789156934; cv=none; b=nrakPypsnURI8nqdb8JUnuQMaj/K9HT2j0BWIPzC9O0vlU71l+RZUjTq9YAHOE2H8H5X4qO2QigHMhWZUsu1kj/DF3V5ncqHFR4eokIrZIkImkAozhHFT5CRE0JX3BxjTXZExi6rX3GrV4GHuvs636/s6PwzZSV4n+QdWBxKDdk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789156934; c=relaxed/simple; bh=asYCsHzzkaCUf0mdCxWHVGfmG3PqBm7r4sxR6nwhb9k=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=DGqqPNBLGpl+2I/mFre0VErvN3KTE5BW5xHedYbsiDXBYFp3TbvvaTU4tpXrVlyy0ovNB5ByhjwcZ0MgSTq3Z3SW7flbD4+FEwB2ylQHa6F0t0Cp1TvZa3Xv7g2oeJ1aRV0/cJIY4Yum8t65udRhtJC7oSd7RS3DPuAu42Fxnmg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=lXW0fsgH; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="lXW0fsgH" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 72B331F0089B; Fri, 11 Sep 2026 20:02:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1789156922; bh=/aoikSOQfjjRmypRlfn4vreMQwCIHWS1YZSrvuTn95U=; h=From:To:Cc:Subject:Date:Reply-To; b=lXW0fsgHth31ZakXJGo8i2lCuzT+TNQ5VwVfECY/aI+tiQ/UR/ufvTGiND7cboeO5 9U6LtBX0nPv2KkQSX7VY4G56P2s6aMOt9I9lZvR525uTHjd4G1yoOebCIohsMTnX/M HZzIfJTRBWa8/j6K3+66HrkrJ/HXwHAgWfidCmNE= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-89678: nfsd: fix partial-write detection in nfsd_direct_write Date: Fri, 11 Sep 2026 21:46:07 +0200 Message-ID: <2026091150-CVE-2026-89678-64d4@gregkh> X-Mailer: git-send-email 2.55.0 Reply-To: , Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=3065; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=1nElCjQR/dqzKeKi2fh/V90alHrS/tMVy459Ge5dFVc=; b=owGbwMvMwCRo6H6F97bub03G02pJDFlLIutsFvjmLNintINN/SkT65/7UboRJ422OqWdOtP+7 Z/jrktmHbEsDIJMDLJiiixftvEc3V9xSNHL0PY0zBxWJpAhDFycAjCRqQ4Mc/gPTtHuDTqWZs7O G/D8w/RNkr5rNBnmVy5ICPltx/HqKcNk276d+51k951dAgA= 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: nfsd: fix partial-write detection in nfsd_direct_write nfsd_direct_write() walks a list of write segments and, after each vfs_iocb_iter_write(), tries to detect a short write so the loop can stop before placing the next segment at a wrong file offset: host_err = vfs_iocb_iter_write(file, kiocb, &segments[i].iter); if (host_err < 0) return host_err; *cnt += host_err; if (host_err < segments[i].iter.count) break; /* partial write */ vfs_iocb_iter_write() runs the iter through ->write_iter(), which advances the iter by the number of bytes written. By the time the check runs, segments[i].iter.count is the residual, not the original request length: before write_iter: iter.count == original_len after write_iter: iter.count == original_len - host_err The condition then reduces to host_err < original_len - host_err, so the break fires only when less than half of the segment was written. Any short write completing between 50% and 99% of the segment slips through; the loop advances to the next segment with kiocb->ki_pos only bumped by the short amount, writing the next segment's payload at the wrong offset and over-reporting *cnt to the NFS client. Snapshot the segment's byte count before the write and compare host_err against that snapshot so any short write breaks the loop. The Linux kernel CVE team has assigned CVE-2026-89678 to this issue. Affected and fixed versions =========================== Issue introduced in 6.19 with commit 06c5c97293e3fca99ce15da157068edf45a7c6e4 and fixed in 7.2.4 with commit fa6590dfd16ab55f03b658b079072ace3504825e Issue introduced in 6.19 with commit 06c5c97293e3fca99ce15da157068edf45a7c6e4 and fixed in 7.3-rc1 with commit 250ec14932d5cfe102f68a57892bb566eee7f83e 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-89678 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/nfsd/vfs.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/fa6590dfd16ab55f03b658b079072ace3504825e https://git.kernel.org/stable/c/250ec14932d5cfe102f68a57892bb566eee7f83e