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 1FE6E1C3C14 for ; Wed, 16 Apr 2025 14:15:47 +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=1744812947; cv=none; b=DlpBzHHa8tP/xlJWBkqryrZMvnJipCXmMHt2z/RLCZQhs3yl60Q8MMFvoTgjPW3wi5fCLifK/ajRtqrZ7PG7PWGPXp1rvZ0+CqPT9Up6hzZrzwmxsrCQRrRx1Dz5sEanAcqpgd+S1FQO3tqggQjaWox+CaOwyHM14QIGwPhdbp8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1744812947; c=relaxed/simple; bh=MN6pqmV6F51eAyUVSVztXIjXFlKfwASMsT39428hBFQ=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=B9EH2Sex0FajYgy/0Edgxh5TpijzRM8aL4V5CAmn7YDJVLdjj2mShU4ezdKPOQ+OS/kFrnVzFkkipCQG8XIrDdYN41gZIW2M2V+cC9hq8wKaxqq9r4knQRNJ1Edl6kwr1DXclEWk1dpGHQ+T4w/fT5L+yaz8R+Ny7RPpklgwqME= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=A5XvlK6/; 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="A5XvlK6/" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 84811C4CEE2; Wed, 16 Apr 2025 14:15:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1744812947; bh=MN6pqmV6F51eAyUVSVztXIjXFlKfwASMsT39428hBFQ=; h=From:To:Cc:Subject:Date:Reply-to:From; b=A5XvlK6/l7L8RUFogsg1UFJ9jwZ7aIM+jWg41sQ7aBAcNVke8wAh4cxsdzn2VXbSr UiF/hAJoK2W4Azf1SMI/1kiAPVmW+AuLsV3RPa+8mQ2TdbMbvPKILOhcEByaRmCiyn 68chgTf0UTsN09clJUAqgxmefYqoZrsj1rjWTtZY= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-22038: ksmbd: validate zero num_subauth before sub_auth is accessed Date: Wed, 16 Apr 2025 16:12:09 +0200 Message-ID: <2025041659-CVE-2025-22038-1b5a@gregkh> X-Mailer: git-send-email 2.49.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=2406; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=MN6pqmV6F51eAyUVSVztXIjXFlKfwASMsT39428hBFQ=; b=owGbwMvMwCRo6H6F97bub03G02pJDOn/d62XvWHi+9jNe1K1j0Mgo53Dv8dfbrtPdhc5uyWwo Y7x6k3njlgWBkEmBlkxRZYv23iO7q84pOhlaHsaZg4rE8gQBi5OAZjIt30MC6aKzsozz3R4XtBe a3JpWdBs7lfvmRnmWYtITU9Z1fPB1Nvdrktyxp2ueRHtAA== 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 zero num_subauth before sub_auth is accessed Access psid->sub_auth[psid->num_subauth - 1] without checking if num_subauth is non-zero leads to an out-of-bounds read. This patch adds a validation step to ensure num_subauth != 0 before sub_auth is accessed. The Linux kernel CVE team has assigned CVE-2025-22038 to this issue. Affected and fixed versions =========================== Fixed in 6.1.134 with commit 3ac65de111c686c95316ade660f8ba7aea3cd3cc Fixed in 6.6.87 with commit 0e36a3e080d6d8bd7a34e089345d043da4ac8283 Fixed in 6.12.23 with commit 56de7778a48560278c334077ace7b9ac4bfb2fd1 Fixed in 6.13.11 with commit 68c6c3142bfcdb049839d40a9a59ebe8ea865002 Fixed in 6.14.2 with commit c8bfe1954a0b89e7b29b3a3e7f4c5e0ebd295e20 Fixed in 6.15-rc1 with commit bf21e29d78cd2c2371023953d9c82dfef82ebb36 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-22038 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/smbacl.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/3ac65de111c686c95316ade660f8ba7aea3cd3cc https://git.kernel.org/stable/c/0e36a3e080d6d8bd7a34e089345d043da4ac8283 https://git.kernel.org/stable/c/56de7778a48560278c334077ace7b9ac4bfb2fd1 https://git.kernel.org/stable/c/68c6c3142bfcdb049839d40a9a59ebe8ea865002 https://git.kernel.org/stable/c/c8bfe1954a0b89e7b29b3a3e7f4c5e0ebd295e20 https://git.kernel.org/stable/c/bf21e29d78cd2c2371023953d9c82dfef82ebb36