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 CEB621C7B64 for ; Mon, 21 Oct 2024 20:12:39 +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=1729541559; cv=none; b=rkvL9ltUmb8Sy6i1+Y4G8l/p0JV4hD0o8kExCILkxdHTN0rHiWBGxMEtxeHy4oM3klGiztvaTDVCvfzDcz5NA8vZ3Q5DROR/GoUBJ0p8+iJvDxzOEmM99J0Knv8CgIj46t/zFhoOCtkndlWZgNwZV3kgLcfbCMOgCzd2NnOGBiw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729541559; c=relaxed/simple; bh=oUymZT4/uxui4r2dfC9K59xEKFMJiis82bdL9Ciyj2c=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=TbsZ6Ju8deNq6ddIaMeCcs5R0DLHIXITI09qR87ckRe+Ng5hrbvn1xKHS3xXsb7cplGDNPoVqhZCipIeqEHyUciTGZOYbnMhs75KzDb2mghlTnAkl5uiq7denjpW3BeR+Ol9TrTTOTFcu6gWh3IzQJxyVDnpbPIzrzcTxtxnGiI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=eVoh0w3s; 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="eVoh0w3s" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 52B79C4CEC3; Mon, 21 Oct 2024 20:12:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1729541559; bh=oUymZT4/uxui4r2dfC9K59xEKFMJiis82bdL9Ciyj2c=; h=From:To:Cc:Subject:Date:Reply-to:From; b=eVoh0w3sAyhjTQ6LHz1yF/1T6u52pYNLTOs3dYp57bVkoHKDq+l0+kCdNFEdWc2jN Sw7fLn1SGfeHrNonZeXu+z/93lzYFI2YdwQicimzo3uxId52deIZMecna0I8aqKu8x H4tuyQowXevYmpT317jxHkEzB4UshqgLyK6fyOmk= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2022-49004: riscv: Sync efi page table's kernel mappings before switching Date: Mon, 21 Oct 2024 22:06:36 +0200 Message-ID: <2024102151-CVE-2022-49004-18ac@gregkh> X-Mailer: git-send-email 2.47.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=2402; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=oUymZT4/uxui4r2dfC9K59xEKFMJiis82bdL9Ciyj2c=; b=owGbwMvMwCRo6H6F97bub03G02pJDOliW+Qn15Ymp/msvTJ3xeQ61toKhn7ZObyvnFtaRKKOb NweLr+tI5aFQZCJQVZMkeXLNp6j+ysOKXoZ2p6GmcPKBDKEgYtTACaiGsUwT1/zYuuxo3uEF5v1 8fmvfH/Qy0eLgWHBmRn7rJsurdke6P3ueL+kt4uJ38UXAA== 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: Sync efi page table's kernel mappings before switching The EFI page table is initially created as a copy of the kernel page table. With VMAP_STACK enabled, kernel stacks are allocated in the vmalloc area: if the stack is allocated in a new PGD (one that was not present at the moment of the efi page table creation or not synced in a previous vmalloc fault), the kernel will take a trap when switching to the efi page table when the vmalloc kernel stack is accessed, resulting in a kernel panic. Fix that by updating the efi kernel mappings before switching to the efi page table. The Linux kernel CVE team has assigned CVE-2022-49004 to this issue. Affected and fixed versions =========================== Issue introduced in 5.10 with commit b91540d52a08 and fixed in 5.15.82 with commit fa7a7d185ef3 Issue introduced in 5.10 with commit b91540d52a08 and fixed in 6.0.12 with commit 96f479383d92 Issue introduced in 5.10 with commit b91540d52a08 and fixed in 6.1 with commit 3f105a742725 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-2022-49004 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/efi.h arch/riscv/include/asm/pgalloc.h 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/fa7a7d185ef380546b4b1fed6f84f31dbae8cec7 https://git.kernel.org/stable/c/96f479383d92944406d4b3f2bc03c2f640def9f1 https://git.kernel.org/stable/c/3f105a742725a1b78766a55169f1d827732e62b8