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 9475647A5D for ; Mon, 20 May 2024 09:48:44 +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=1716198524; cv=none; b=rfuHYk2MVrmaEfbuMoX8uF4hwlb19UQgPzwhv3kWvqQpxSQ/ejKt8wWvP/f941KU48JfPDc7PPfUUX9Qduej0kisebbSFFxW1M4unejLnISj6VR9DiAjJdf5qhRuJplXeGWRk3vBGJOLPcu0dGydi40Ah0l79V/ZSqz1iJLSroM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716198524; c=relaxed/simple; bh=So8NICYujLV2doRl/0dSAk5aIcT5Y6UJXep4cfRNSy8=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=Zchs+N4GlhfrV2+nl1xJjHKSTI1UZM77e0FSBEucYLQRoB0O/Sklo0E2BJ7lsv9MRWUeIe6TUqzFkrzMb0ENSG2fYyq3pvik3Zdz2NhOnMZIlP1MGIENnYKmE3TPXdwmsUFRZ7opzo57Tl538XK5b60F3TYzVWbJKs0YzvqztCM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=oRObRpY8; 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="oRObRpY8" Received: by smtp.kernel.org (Postfix) with ESMTPSA id D0284C2BD11; Mon, 20 May 2024 09:48:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1716198524; bh=So8NICYujLV2doRl/0dSAk5aIcT5Y6UJXep4cfRNSy8=; h=From:To:Cc:Subject:Date:Reply-to:From; b=oRObRpY8/r1vep25RodtisK5EBTPKL2GK7eOL9CEzuF8G9R+SuJVIbT9zldlDs7LN wUXIrcCdLLIqxZnK4NLMBT1rr3tAlskbye93mcc1u9eqy+Bz3JsMdckC60sQrH8QLa Zc5igVA3Mx5fnhHTN5DklhlhfW4yPOrptD9J62xk= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-35987: riscv: Fix loading 64-bit NOMMU kernels past the start of RAM Date: Mon, 20 May 2024 11:48:23 +0200 Message-ID: <2024052019-CVE-2024-35987-c5e7@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=2311; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=So8NICYujLV2doRl/0dSAk5aIcT5Y6UJXep4cfRNSy8=; b=owGbwMvMwCRo6H6F97bub03G02pJDGneMsl7XzblhFbN+ts0J27brbgrz7uWPdlh08WwhNNpz Qa/utOtHbEsDIJMDLJiiixftvEc3V9xSNHL0PY0zBxWJpAhDFycAjARtpcM82Pjin/ZfufZYOR0 JMX/9I/n3zpur2VYcGravQXvosKcvVJWePumG92L/61zCgA= 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: Fix loading 64-bit NOMMU kernels past the start of RAM commit 3335068f8721 ("riscv: Use PUD/P4D/PGD pages for the linear mapping") added logic to allow using RAM below the kernel load address. However, this does not work for NOMMU, where PAGE_OFFSET is fixed to the kernel load address. Since that range of memory corresponds to PFNs below ARCH_PFN_OFFSET, mm initialization runs off the beginning of mem_map and corrupts adjacent kernel memory. Fix this by restoring the previous behavior for NOMMU kernels. The Linux kernel CVE team has assigned CVE-2024-35987 to this issue. Affected and fixed versions =========================== Issue introduced in 6.4 with commit 3335068f8721 and fixed in 6.6.30 with commit b008e327fa57 Issue introduced in 6.4 with commit 3335068f8721 and fixed in 6.8.9 with commit ea6628e4e235 Issue introduced in 6.4 with commit 3335068f8721 and fixed in 6.9 with commit aea702dde7e9 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-35987 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/page.h arch/riscv/mm/init.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/b008e327fa570aca210f98c817757649bae56694 https://git.kernel.org/stable/c/ea6628e4e2353978af7e3b4ad4fdaab6149acf3d https://git.kernel.org/stable/c/aea702dde7e9876fb00571a2602f25130847bf0f