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 53FBA5FB8B for ; Fri, 17 May 2024 14:27:42 +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=1715956062; cv=none; b=gLlXtCvuiSl/HzJy5LRLjKLeGZ5lr4hFfjOJmtIfClXkcj4cQtwSZmXRLubYBRZj3BW2PPlYG1zrClFWqzZWlYehdVnp2Ohp0FoBoWeVAfwScmLF9DOHuo953Y8SaFJmG4mzwhoRWcObf4WUDj0IzgG4FBNWtd80gl/8XU3/Hig= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715956062; c=relaxed/simple; bh=P8phNwo2e/y4fsGdNqxLG2cbCUgavPA9/PMU+qHiQU0=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=VqJGZD92U7slUCQaFXIvtSLz6e633nt9UHpTpSZP9ISguX5VXEH0nQvSsZSOrrEqJviNBUqA9h5yoewxBTvJ72y03Uk1Mok7AGIJ/hsIJsVnicIn8UbyF7Afjt8G7m6fXmlMsyYWLr3kvfEBywX1/frhQRm0PecaBaRx3PhJ76A= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=AX4TWf6P; 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="AX4TWf6P" Received: by smtp.kernel.org (Postfix) with ESMTPSA id CB6B8C2BD10; Fri, 17 May 2024 14:27:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1715956062; bh=P8phNwo2e/y4fsGdNqxLG2cbCUgavPA9/PMU+qHiQU0=; h=From:To:Cc:Subject:Date:Reply-to:From; b=AX4TWf6PKhet9GA4Zhrsf3YlxSp11PudGXtIRJ/uxRqKDe+guaKWisfhgnlRc3LU5 sJbFlHXzrlqsfR1Nl5zokOQh6Vrn23Alaiy+X1ZAEfFJtNtiSc5dSJA34yeMdHcWqC /TJNvQkqbPF5CZGSzIMtHjt18bVtZfu3wKiHUKl0= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2023-52677: riscv: Check if the code to patch lies in the exit section Date: Fri, 17 May 2024 16:26:50 +0200 Message-ID: <2024051749-CVE-2023-52677-5d0c@gregkh> X-Mailer: git-send-email 2.45.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=2388; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=P8phNwo2e/y4fsGdNqxLG2cbCUgavPA9/PMU+qHiQU0=; b=owGbwMvMwCRo6H6F97bub03G02pJDGnumVpp0+6p+78zFrkb+/+QVOSB+cEB65bNP3VG7B3/b y4mtl2TO2JZGASZGGTFFFm+bOM5ur/ikKKXoe1pmDmsTCBDGLg4BWAizRsZ5rvbmS5eaJvFf/7H w62B3/+E2jlIdDMs6PrhXWNzMf3bnzl9LwP4mq4cXdi3HAA= 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: Check if the code to patch lies in the exit section Otherwise we fall through to vmalloc_to_page() which panics since the address does not lie in the vmalloc region. The Linux kernel CVE team has assigned CVE-2023-52677 to this issue. Affected and fixed versions =========================== Issue introduced in 5.7 with commit 043cb41a85de and fixed in 5.15.148 with commit 938f70d14618 Issue introduced in 5.7 with commit 043cb41a85de and fixed in 6.1.75 with commit 890cfe5337e0 Issue introduced in 5.7 with commit 043cb41a85de and fixed in 6.6.14 with commit 8db56df4a954 Issue introduced in 5.7 with commit 043cb41a85de and fixed in 6.7.2 with commit 1d7a03052846 Issue introduced in 5.7 with commit 043cb41a85de and fixed in 6.8 with commit 420370f3ae3d 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-52677 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/include/asm/sections.h arch/riscv/kernel/patch.c arch/riscv/kernel/vmlinux-xip.lds.S arch/riscv/kernel/vmlinux.lds.S 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/938f70d14618ec72e10d6fcf8a546134136d7c13 https://git.kernel.org/stable/c/890cfe5337e0aaf03ece1429db04d23c88da72e7 https://git.kernel.org/stable/c/8db56df4a954b774bdc68917046a685a9fa2e4bc https://git.kernel.org/stable/c/1d7a03052846f34d624d0ab41a879adf5e85c85f https://git.kernel.org/stable/c/420370f3ae3d3b883813fd3051a38805160b2b9f