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 5EB0176410 for ; Wed, 22 May 2024 06:20:17 +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=1716358817; cv=none; b=RUS4B3Q4JHArDFtbkoJ0BTEDnyUwvg3VUkK3gBGhTCmkK3QKyhcNpl9vTj08Wr2IA4gAl/kfVs1OdUkzZUgKTc9qQpVEQUj3wEvc6h5bSibRVCeo4nfZkIDYlKZqrfkoU7HBSFnvOhs2WMfZ6Ih/fTU4uuTJV4G2KQQ82c8GXBM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716358817; c=relaxed/simple; bh=3x5IyfZpoUhIA5RF/kWV7oazWYgpwc7e8uZD87WKtuU=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=lL2leVewaAefMgYmINKXvz4HYA5fkRrmnPseB6SvP2/MmpEwFUSb5reVDS1ZmHVdk6qfBcgMHBBDWl3nmw+1usTwFUsKuRX9aLg9m7vTUtYRYs1L5gxmGiiuV/F1myknNPIxCYdEpCCJRnkFfaITL49zEh09BrmjdtBf67rLShA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=G2C2S+rD; 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="G2C2S+rD" Received: by smtp.kernel.org (Postfix) with ESMTPSA id D09B9C2BD11; Wed, 22 May 2024 06:20:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1716358817; bh=3x5IyfZpoUhIA5RF/kWV7oazWYgpwc7e8uZD87WKtuU=; h=From:To:Cc:Subject:Date:Reply-to:From; b=G2C2S+rDXs3MSzJyp/xOvqndyNlk4cOnGBz5CQCs2F/dRArLxcvSY3f6fExF8X+y7 uoQWqKk/SC7pq09PqZRdHWVDg8yg8eUtmQKkYzoAZ/Dhs3KzmOVGUqYKLR8Ncborn5 Y+90E6Oh80CvFoXvHVgKSs40KzCqUl2eGObl27jc= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2021-47450: KVM: arm64: Fix host stage-2 PGD refcount Date: Wed, 22 May 2024 08:19:53 +0200 Message-ID: <2024052242-CVE-2021-47450-c72f@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=2255; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=3x5IyfZpoUhIA5RF/kWV7oazWYgpwc7e8uZD87WKtuU=; b=owGbwMvMwCRo6H6F97bub03G02pJDGm+fXWT4tOcAt7+2eAjZt0uJtFQmR4k7aYk8sSys7Ovz XJXNFtHLAuDIBODrJgiy5dtPEf3VxxS9DK0PQ0zh5UJZAgDF6cATORZF8M86/4itjUBxwRmP5y0 TF4vai3brnJThjmcr09ZxClfT7vRfCv1zrPsgJ3X2NQA 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: KVM: arm64: Fix host stage-2 PGD refcount The KVM page-table library refcounts the pages of concatenated stage-2 PGDs individually. However, when running KVM in protected mode, the host's stage-2 PGD is currently managed by EL2 as a single high-order compound page, which can cause the refcount of the tail pages to reach 0 when they shouldn't, hence corrupting the page-table. Fix this by introducing a new hyp_split_page() helper in the EL2 page allocator (matching the kernel's split_page() function), and make use of it from host_s2_zalloc_pages_exact(). The Linux kernel CVE team has assigned CVE-2021-47450 to this issue. Affected and fixed versions =========================== Issue introduced in 5.13 with commit 1025c8c0c6ac and fixed in 5.14.15 with commit b372264c66ef Issue introduced in 5.13 with commit 1025c8c0c6ac and fixed in 5.15 with commit 1d58a17ef545 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-2021-47450 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/arm64/kvm/hyp/include/nvhe/gfp.h arch/arm64/kvm/hyp/nvhe/mem_protect.c arch/arm64/kvm/hyp/nvhe/page_alloc.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/b372264c66ef78f2cab44e877fbd765ad6d24c39 https://git.kernel.org/stable/c/1d58a17ef54599506d44c45ac95be27273a4d2b1