From mboxrd@z Thu Jan 1 00:00:00 1970 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 6682B1494BB for ; Wed, 3 Apr 2024 14:55:59 +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=1712156159; cv=none; b=kYsfmeSFmES8FV8cs7K9lTid5WKS2uPj2W/p6BPqAtDEZLzIN96NllMMjYBGrY2ZfY/+TvJEVQPHpyEq6i6aOICBrrChP8kJBIbiatlu0Mgs/voRptsIjJFgFDctPyrLyK0eMpTbEpht+w4B7Uq/S3Iy6oyTCwCe/fRaBhqghnc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712156159; c=relaxed/simple; bh=n0Gr46dfXsSWj+F+fAsGm7yd1zTw+eWr3vmbTxeF04Y=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=Jf9L7D1yZnSRkv3tiTHIQMSfqPCbrXMjBVrT3mZsQrSmmHKeG0SG+TClMqup6qbgy0+g2pC2yx2qEqNN0V/I0lK0lXvikUxdzJP0QCxKU+EinbAYkzUJOKk+2iJfdHdZMIb5lQU7I/nn0SvwDuldb4X53OfLVqTBqNLR57X9r3c= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=kgrjOPuN; 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="kgrjOPuN" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 89D2BC433C7; Wed, 3 Apr 2024 14:55:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1712156159; bh=n0Gr46dfXsSWj+F+fAsGm7yd1zTw+eWr3vmbTxeF04Y=; h=From:To:Cc:Subject:Date:Reply-to:From; b=kgrjOPuNccJnmECItJi/+2ICLlqpG78Nj4fqyWtEXFC58szFPSV2stbtNW0ITvDb2 ETgOuznj2TIstAO4tT4rAxVBVcltavgnLk0gaEl9QWLVlIQv8Hj12Or5VXF9LGkD8L u1/Ud0mtmg39T6UOejs+gLmXc5TZPxIBA8ujumRc= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-26692: smb: Fix regression in writes when non-standard maximum write size negotiated Date: Wed, 3 Apr 2024 16:55:43 +0200 Message-ID: <2024040337-CVE-2024-26692-162f@gregkh> X-Mailer: git-send-email 2.44.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=2840; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=n0Gr46dfXsSWj+F+fAsGm7yd1zTw+eWr3vmbTxeF04Y=; b=owGbwMvMwCRo6H6F97bub03G02pJDGm8uS+97d6nd6994nEriqvfW2FBwdoTM/2kHr/9tuHwo 2MuU5vFO2JZGASZGGTFFFm+bOM5ur/ikKKXoe1pmDmsTCBDGLg4BWAiJmoMC1ZtPTNVaAO/9yIp R+WN3reZb5W3ijDMj9/L/bic41FE/wMlX1+/3MVGcjpXAQ== X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit Description =========== In the Linux kernel, the following vulnerability has been resolved: smb: Fix regression in writes when non-standard maximum write size negotiated The conversion to netfs in the 6.3 kernel caused a regression when maximum write size is set by the server to an unexpected value which is not a multiple of 4096 (similarly if the user overrides the maximum write size by setting mount parm "wsize", but sets it to a value that is not a multiple of 4096). When negotiated write size is not a multiple of 4096 the netfs code can skip the end of the final page when doing large sequential writes, causing data corruption. This section of code is being rewritten/removed due to a large netfs change, but until that point (ie for the 6.3 kernel until now) we can not support non-standard maximum write sizes. Add a warning if a user specifies a wsize on mount that is not a multiple of 4096 (and round down), also add a change where we round down the maximum write size if the server negotiates a value that is not a multiple of 4096 (we also have to check to make sure that we do not round it down to zero). The Linux kernel CVE team has assigned CVE-2024-26692 to this issue. Affected and fixed versions =========================== Issue introduced in 6.3 with commit d08089f649a0 and fixed in 6.6.18 with commit 4145ccff546e Issue introduced in 6.3 with commit d08089f649a0 and fixed in 6.7.6 with commit 63c35afd50e2 Issue introduced in 6.3 with commit d08089f649a0 and fixed in 6.8 with commit 4860abb91f3d 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-2024-26692 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/smb/client/connect.c fs/smb/client/fs_context.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/4145ccff546ea868428b3e0fe6818c6261b574a9 https://git.kernel.org/stable/c/63c35afd50e28b49c5b75542045a8c42b696dab9 https://git.kernel.org/stable/c/4860abb91f3d7fbaf8147d54782149bb1fc45892