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 F1B8C1F429E for ; Fri, 27 Dec 2024 13:55: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=1735307758; cv=none; b=HBRlSzPdg9EfaOvwDxhSrHGKvKBoEG20ieNHvob8wnk47Sx5/UVmWa/GUoSHB54A5iGhZSl2xZwnX/8yck/+rypeccsqb2EP+lqcdh5tFu+0jKfqZ3WGEZE2HtvPPSgQ4TX2Zmml7q141PiaZKvISnX+C/b7zsMHh3N57tslzNM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735307758; c=relaxed/simple; bh=6YaxSmbBvxE1jkfu+i/jRn35opxRpSlcZTrmxgtJe6c=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=G65Jjtdyrqnn9eYe9Bl1Vz0ThRlHexDm7YBqMU5uiHcIzuAWM4dVpWnxEx2Im9sU8z3fz+Fi1urhA3qoAVFdZIhh+ciBeAyDrNo0RCsJw8gFrRT2N0kHtr5GvuxeMXjQE7Pkt+HoWeRD8UthI6sQCcktrbxYd1Fp9zYaLe1tnN4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=kmn0IbGN; 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="kmn0IbGN" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 63A0AC4CED0; Fri, 27 Dec 2024 13:55:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1735307757; bh=6YaxSmbBvxE1jkfu+i/jRn35opxRpSlcZTrmxgtJe6c=; h=From:To:Cc:Subject:Date:Reply-to:From; b=kmn0IbGNMiTBECn8gHx+w4fPxvP2gZ/Nqqr1pjfHuNWZDLBRNYSQpSe1Ntp1ouY43 q6Tt+daguT/eR1YUdgw2P//R+1inQlXt4s4XCmBBHAJPwMiDHKGn28l8ys6pGg3e+8 KcWlzr5xnU6FYs6C8as4DSUMJeva+C2fOJrZHfDg= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-53228: riscv: kvm: Fix out-of-bounds array access Date: Fri, 27 Dec 2024 14:53:14 +0100 Message-ID: <2024122736-CVE-2024-53228-0c5f@gregkh> X-Mailer: git-send-email 2.47.1 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=2299; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=6YaxSmbBvxE1jkfu+i/jRn35opxRpSlcZTrmxgtJe6c=; b=owGbwMvMwCRo6H6F97bub03G02pJDOl5G1WWGT27e1nL484JtVNbFyvfZll9JC7tyR9j90KzQ MOSikObOmJZGASZGGTFFFm+bOM5ur/ikKKXoe1pmDmsTCBDGLg4BWAiB34yLNiRsaJpz6++VeyL pKbp3Fzgs0xgegjDgg3Za30EuCV6Dse0z4n7+8v48pWVjwE= 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: riscv: kvm: Fix out-of-bounds array access In kvm_riscv_vcpu_sbi_init() the entry->ext_idx can contain an out-of-bound index. This is used as a special marker for the base extensions, that cannot be disabled. However, when traversing the extensions, that special marker is not checked prior indexing the array. Add an out-of-bounds check to the function. The Linux kernel CVE team has assigned CVE-2024-53228 to this issue. Affected and fixed versions =========================== Issue introduced in 6.7 with commit 56d8a385b60556019ecb45d6098830c9ef6a13e0 and fixed in 6.11.11 with commit 3c49e1084a5df99807fc43dd318c491e6cbaa168 Issue introduced in 6.7 with commit 56d8a385b60556019ecb45d6098830c9ef6a13e0 and fixed in 6.12.2 with commit b1af648f0d610665c956ea4604d9f797e5c7e991 Issue introduced in 6.7 with commit 56d8a385b60556019ecb45d6098830c9ef6a13e0 and fixed in 6.13-rc1 with commit 332fa4a802b16ccb727199da685294f85f9880cb 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-53228 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: arch/riscv/kvm/vcpu_sbi.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/3c49e1084a5df99807fc43dd318c491e6cbaa168 https://git.kernel.org/stable/c/b1af648f0d610665c956ea4604d9f797e5c7e991 https://git.kernel.org/stable/c/332fa4a802b16ccb727199da685294f85f9880cb