From mboxrd@z Thu Jan 1 00:00:00 1970 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 4E073219EA5 for ; Wed, 26 Feb 2025 02:15:54 +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=1740536154; cv=none; b=SnLYBkMnUReTK4gtz/4uPhhXSkGYrpsnKZ+jBP9giu/U9mfjZmS1bN0Rg7zvqC/5EjHVbRIOyrgs7zidMQPphNncXFQC1qaNnpiUzVCDVBYU4ydh3HPCQgz1M5ch7GxHmDuOw852nXEXuRkXnQqiqBfxXwceHH93+9XSV5UQAX0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740536154; c=relaxed/simple; bh=M+wVs8JurCON22x8V32E1ElqiOSrb3wfd2O2bf6s39Y=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=T2tnOKZP87Ja72s5BZ0avxbtBfXKEMmEmqtxmvO811/vRumEUERtXwJ4ZNidskY9schqNqeqfyg0mDHXbHVh7OQ7PTQEo+BajMebnjcHvAqGtIJSifi+QBil77dglXZ7cUnI4ARdsVEcdHKvw7mMgY6dsRLmuBAg3YvNbu75J3M= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=1Sds3KiD; 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="1Sds3KiD" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2360BC4CEE6; Wed, 26 Feb 2025 02:15:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1740536154; bh=M+wVs8JurCON22x8V32E1ElqiOSrb3wfd2O2bf6s39Y=; h=From:To:Cc:Subject:Date:Reply-to:From; b=1Sds3KiDYO6SWz8cCOBaAaCKe3wmCVatY9Mc6weJtRm5rm3SMH+ZLHzU2SQCGaRAX MQpaVgBUDc3YpYIWmf6/rdyisMb9KZvYEHnBBjPgJW26vC0+obMmQVlEVySpjKVROc W4Hb970JQ+iJ2WDgFm5HOBx3kww16ANu7eyen6Rg= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2022-49562: KVM: x86: Use __try_cmpxchg_user() to update guest PTE A/D bits Date: Wed, 26 Feb 2025 03:13:56 +0100 Message-ID: <2025022618-CVE-2022-49562-1d2c@gregkh> X-Mailer: git-send-email 2.48.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=2519; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=M+wVs8JurCON22x8V32E1ElqiOSrb3wfd2O2bf6s39Y=; b=owGbwMvMwCRo6H6F97bub03G02pJDOn7Krg232lqXBgqUlE+bXZRw6EPy8P8P87nXHfs3Ps98 e8rk4UKO2JZGASZGGTFFFm+bOM5ur/ikKKXoe1pmDmsTCBDGLg4BWAicyUZFqyZkL6Y943KseI7 MVrzxcxdc4IsmhgWLJ8uc+nla789ap7fTJmEXi4+FlvDAQA= 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: x86: Use __try_cmpxchg_user() to update guest PTE A/D bits Use the recently introduced __try_cmpxchg_user() to update guest PTE A/D bits instead of mapping the PTE into kernel address space. The VM_PFNMAP path is broken as it assumes that vm_pgoff is the base pfn of the mapped VMA range, which is conceptually wrong as vm_pgoff is the offset relative to the file and has nothing to do with the pfn. The horrific hack worked for the original use case (backing guest memory with /dev/mem), but leads to accessing "random" pfns for pretty much any other VM_PFNMAP case. The Linux kernel CVE team has assigned CVE-2022-49562 to this issue. Affected and fixed versions =========================== Issue introduced in 5.2 with commit bd53cb35a3e9adb73a834a36586e9ad80e877767 and fixed in 5.17.13 with commit 38b888911e8dc89b89d8147cfb1d2dbe6373bf78 Issue introduced in 5.2 with commit bd53cb35a3e9adb73a834a36586e9ad80e877767 and fixed in 5.18.2 with commit 8089e5e1d18402fb8152d6b6815450a36fffa9b0 Issue introduced in 5.2 with commit bd53cb35a3e9adb73a834a36586e9ad80e877767 and fixed in 5.19 with commit f122dfe4476890d60b8c679128cd2259ec96a24c 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-49562 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/kvm/mmu/paging_tmpl.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/38b888911e8dc89b89d8147cfb1d2dbe6373bf78 https://git.kernel.org/stable/c/8089e5e1d18402fb8152d6b6815450a36fffa9b0 https://git.kernel.org/stable/c/f122dfe4476890d60b8c679128cd2259ec96a24c