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 45C2345C10 for ; Wed, 1 May 2024 05:30:57 +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=1714541458; cv=none; b=g+ufY434Wyh2JwRGPLR4NOXmz2HX4shyoq9OLPBxN48yr4MPpHSt2742t7Vy0O7VAEgomlQZXoOStFSmaf8YbsvWQCrxnyjTkOhTQiOJxl7nXElDXYUAFDHcW/ACUr/xX8nEEeesry/BBPzitbm6PUnap4YOqmlbXsZNeDLyTwg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714541458; c=relaxed/simple; bh=8Vk3iZpcUq2v0dUHT2gG4F6D/7VNmGalfbemlG96ITg=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=GnrNFtbVc1O6QBoPdVZKwPfxCy96J3Cka5IdaHPhDMAUfNEgkZopJy1ZGO5G4uQOqTyVnFIoxfcTqLgNDbo9DiY1u0y7x2WbMY5MYTv0Ck4m2Uhhr1GZc61pHBplVlS3WFV/jzrXJ2AfEmyweANpYodePkaUJxMq1sAoFUOkM5c= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=aok/mSaI; 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="aok/mSaI" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6D6CDC4AF19; Wed, 1 May 2024 05:30:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1714541457; bh=8Vk3iZpcUq2v0dUHT2gG4F6D/7VNmGalfbemlG96ITg=; h=From:To:Cc:Subject:Date:Reply-to:From; b=aok/mSaIR5JVUKSJ/6vRA+u88+cUy7fYyDzrSHpfIXftrdEV7rIekIxH4LYo5cUv8 LnKoCVfFrP9YwleGzfEwDZENv8w6HJKag3TNvCPxSgoIoJJdFnPzzOGZZ31OT4x5Wr nboSJ/LHbiZc1farE/uBNXX9sNEC3+4k14z5l16k= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-26936: ksmbd: validate request buffer size in smb2_allocate_rsp_buf() Date: Wed, 1 May 2024 07:30:40 +0200 Message-ID: <2024050141-CVE-2024-26936-0264@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=2063; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=8Vk3iZpcUq2v0dUHT2gG4F6D/7VNmGalfbemlG96ITg=; b=owGbwMvMwCRo6H6F97bub03G02pJDGmGlxtt4zjWTv7H8tZ0laxY6jWpCAblhVliN3ftL3j+e YXdDvUjHbEsDIJMDLJiiixftvEc3V9xSNHL0PY0zBxWJpAhDFycAjCR4iMMc7hOhPWd+z4pUSY3 OS790sqbQpPuTmBYMIc1bnMJ/9VptV7BPfE3iioif/xSBwA= 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: ksmbd: validate request buffer size in smb2_allocate_rsp_buf() The response buffer should be allocated in smb2_allocate_rsp_buf before validating request. But the fields in payload as well as smb2 header is used in smb2_allocate_rsp_buf(). This patch add simple buffer size validation to avoid potencial out-of-bounds in request buffer. The Linux kernel CVE team has assigned CVE-2024-26936 to this issue. Affected and fixed versions =========================== Fixed in 6.1.88 with commit 21ff9d7d223c Fixed in 6.6.29 with commit 5c20b242d4fe Fixed in 6.8.8 with commit 2c27a64a2bc4 Fixed in 6.9-rc6 with commit 17cf0c2794bd 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-26936 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/server/smb2pdu.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/21ff9d7d223c5c19cb4334009e4c0c83a2f4d674 https://git.kernel.org/stable/c/5c20b242d4fed73a93591e48bfd9772e2322fb11 https://git.kernel.org/stable/c/2c27a64a2bc47d9bfc7c3cf8be14be53b1ee7cb6 https://git.kernel.org/stable/c/17cf0c2794bdb6f39671265aa18aea5c22ee8c4a