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 751AB2F12AE for ; Tue, 30 Dec 2025 12:37:37 +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=1767098257; cv=none; b=dVhn0b6XM5pAZQn9qokIQ4D94JZoM5VVg9c6OW9BwGuGGXI0J2X3ymJXAtc0+r/K71gdXK8ajj5E1T1CtqV2KgJi5tEbvqxwLVj3VErdD/oIBO1QGJK4MBFK2u1RfxYBUWmIQLNi0cULKh1Rc0KmvkSrubobOOZE/wH4M6j2jig= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767098257; c=relaxed/simple; bh=WVfV2TzVoRzrfsomNDjamWQp0xVHrcrIw88WKXjncy4=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=t8xLxocF01aEAAFDglE0xfCkKp0HFQNTQTtvk3T2he/CRitKnAG0yNu/qToU/ea3So4QsLehOMgxP+cJEsG5zeNOGNiOTo9nkFO9L102AE93mJpjRYodHKk5Az2UdBDYjDvwR5PhN9N0ADdyrXYRyGW1gMYHaNxqNsI8EpR0u9M= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=Sts9WgpQ; 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="Sts9WgpQ" Received: by smtp.kernel.org (Postfix) with ESMTPSA id EEFE8C4CEFB; Tue, 30 Dec 2025 12:37:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1767098257; bh=WVfV2TzVoRzrfsomNDjamWQp0xVHrcrIw88WKXjncy4=; h=From:To:Cc:Subject:Date:Reply-To:From; b=Sts9WgpQG1wEAvyEC62wgkpBZJnRoVTfXSpE28rE8Oy0f+ivQe8PnqZB28UXMflEJ E7etRkRpz38vWyJTqvxv8ys2ZhYKjaF+9SjHXfoInLxoh0SFxsa5FYWhNtPQX5Lsbb GJksqn9+wGHEW0LLNZThJ1xxqORyb6to8dd4gRHU= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2023-54325: crypto: qat - fix out-of-bounds read Date: Tue, 30 Dec 2025 13:37:20 +0100 Message-ID: <2025123016-CVE-2023-54325-3e5c@gregkh> X-Mailer: git-send-email 2.52.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=3610; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=SpIXEAnLmH1QO3lltGezac2MT66oQxo3xKpr3ISQE6U=; b=owGbwMvMwCRo6H6F97bub03G02pJDJnBx2t+L/l/LPhuXOqkVN3Nwrz6B3iX8K/Tt9DiVQ29o vd4bTd/RywLgyATg6yYIsuXbTxH91ccUvQytD0NM4eVCWQIAxenAEwkvo5hwendnJ/M/c9sZFFl O/ZCrJLn+P3H4QzzzD/MPHbya8qnXANu1clG59OUTt93AgA= 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: crypto: qat - fix out-of-bounds read When preparing an AER-CTR request, the driver copies the key provided by the user into a data structure that is accessible by the firmware. If the target device is QAT GEN4, the key size is rounded up by 16 since a rounded up size is expected by the device. If the key size is rounded up before the copy, the size used for copying the key might be bigger than the size of the region containing the key, causing an out-of-bounds read. Fix by doing the copy first and then update the keylen. This is to fix the following warning reported by KASAN: [ 138.150574] BUG: KASAN: global-out-of-bounds in qat_alg_skcipher_init_com.isra.0+0x197/0x250 [intel_qat] [ 138.150641] Read of size 32 at addr ffffffff88c402c0 by task cryptomgr_test/2340 [ 138.150651] CPU: 15 PID: 2340 Comm: cryptomgr_test Not tainted 6.2.0-rc1+ #45 [ 138.150659] Hardware name: Intel Corporation ArcherCity/ArcherCity, BIOS EGSDCRB1.86B.0087.D13.2208261706 08/26/2022 [ 138.150663] Call Trace: [ 138.150668] [ 138.150922] kasan_check_range+0x13a/0x1c0 [ 138.150931] memcpy+0x1f/0x60 [ 138.150940] qat_alg_skcipher_init_com.isra.0+0x197/0x250 [intel_qat] [ 138.151006] qat_alg_skcipher_init_sessions+0xc1/0x240 [intel_qat] [ 138.151073] crypto_skcipher_setkey+0x82/0x160 [ 138.151085] ? prepare_keybuf+0xa2/0xd0 [ 138.151095] test_skcipher_vec_cfg+0x2b8/0x800 The Linux kernel CVE team has assigned CVE-2023-54325 to this issue. Affected and fixed versions =========================== Issue introduced in 5.11 with commit 67916c9516893528ecce060ada1f58af0ce33d93 and fixed in 5.15.99 with commit 7697139d5dfd491f4c495a914a1dd68f6e827a0f Issue introduced in 5.11 with commit 67916c9516893528ecce060ada1f58af0ce33d93 and fixed in 6.1.16 with commit dc3809f390357c8992f0a23083da934a20fef9af Issue introduced in 5.11 with commit 67916c9516893528ecce060ada1f58af0ce33d93 and fixed in 6.2.3 with commit 2b1501f058245573a3aa6bf234d205dde1196184 Issue introduced in 5.11 with commit 67916c9516893528ecce060ada1f58af0ce33d93 and fixed in 6.3 with commit f6044cc3030e139f60c281386f28bda6e3049d66 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-2023-54325 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: drivers/crypto/qat/qat_common/qat_algs.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/7697139d5dfd491f4c495a914a1dd68f6e827a0f https://git.kernel.org/stable/c/dc3809f390357c8992f0a23083da934a20fef9af https://git.kernel.org/stable/c/2b1501f058245573a3aa6bf234d205dde1196184 https://git.kernel.org/stable/c/f6044cc3030e139f60c281386f28bda6e3049d66