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 9EA03535BE for ; Fri, 15 Mar 2024 20:15:20 +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=1710533720; cv=none; b=LEmBmoAADBP2x8CIURHarNY0QaLK5FziwmHzQtrLVEWvwX50KpbBV1XKraqDjhzs7xcWEhXS5dGCtAv6IVUQGPBK4XApb3oO/4louM+gGCB8YupSKbgw17q295KJPeLFv9k04Q9jj3gYAV6A4rb2TS2UvFOBKa6g/8qbTiWzU+w= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710533720; c=relaxed/simple; bh=MRogQqfdQio3/6/EWqFi0gCfWbHt7zl9YNTte3ZTLUM=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=XpoJop3cVreTVZf3Iory4OdWEg+i6nQroWzN0FnVKrEA5RtHEtXZwMu36Nfh2gB9xJBZeNO8sS8JLujs4lZn9URz80Sbnzgeb9M2Dgc6ML9mHz5gvgbfTVgYlmWLiot0toA2xyV7VijAtzBYRvi7y9CivzRQGqfONZIvkmZrjY0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=hTj2Z1EZ; 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="hTj2Z1EZ" Received: by smtp.kernel.org (Postfix) with ESMTPSA id A23A0C433C7; Fri, 15 Mar 2024 20:15:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1710533720; bh=MRogQqfdQio3/6/EWqFi0gCfWbHt7zl9YNTte3ZTLUM=; h=From:To:Cc:Subject:Date:Reply-to:From; b=hTj2Z1EZM8/vb9sdtVH925vcwMcFH8Rio57Nw3ywtOoyUZfe9NwoVbEAvuq33arBe wDjM68i/OINO9Ss4A5H2lKw6O3DqCnI+tkzCwKOa+VI+HdezEHSfUZHEMgzkhQmRoo 5opHs0Kh5tn9poTq0OXBHH7j3CiIxVPl6yzW9HQU= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2021-47110: x86/kvm: Disable kvmclock on all CPUs on shutdown Date: Fri, 15 Mar 2024 21:15:00 +0100 Message-ID: <2024031506-CVE-2021-47110-2cb8@gregkh> X-Mailer: git-send-email 2.44.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=2315; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=MRogQqfdQio3/6/EWqFi0gCfWbHt7zl9YNTte3ZTLUM=; b=owGbwMvMwCRo6H6F97bub03G02pJDKlf1nh19XEeiOU8xbhK9ul5Jq7ch2I2bAIJQnMjrtu7t FjV9fR3xLIwCDIxyIopsnzZxnN0f8UhRS9D29Mwc1iZQIYwcHEKwEQOdDMsWBl3JtC1mN9E/wRf qsfuZ5PuzDs2m2HBKe2MP7LuB612zSjT+fVq0n8uCbcYAA== 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: x86/kvm: Disable kvmclock on all CPUs on shutdown Currenly, we disable kvmclock from machine_shutdown() hook and this only happens for boot CPU. We need to disable it for all CPUs to guard against memory corruption e.g. on restore from hibernate. Note, writing '0' to kvmclock MSR doesn't clear memory location, it just prevents hypervisor from updating the location so for the short while after write and while CPU is still alive, the clock remains usable and correct so we don't need to switch to some other clocksource. The Linux kernel CVE team has assigned CVE-2021-47110 to this issue. Affected and fixed versions =========================== Fixed in 5.4.125 with commit 9084fe1b3572 Fixed in 5.10.43 with commit 3b0becf8b1ec Fixed in 5.12.10 with commit 1df2dc09926f Fixed in 5.13 with commit c02027b5742b Please see https://www.kernel.org or 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-47110 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/x86/include/asm/kvm_para.h arch/x86/kernel/kvm.c arch/x86/kernel/kvmclock.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/9084fe1b3572664ad276f427dce575f580c9799a https://git.kernel.org/stable/c/3b0becf8b1ecf642a9edaf4c9628ffc641e490d6 https://git.kernel.org/stable/c/1df2dc09926f61319116c80ee85701df33577d70 https://git.kernel.org/stable/c/c02027b5742b5aa804ef08a4a9db433295533046