CVE-2022-49562

KVM: x86: Use __try_cmpxchg_user() to update guest PTE A/D bits

MEDIUM
5.5
CVSS Score
Published: February 26, 2025 at 02:14 AM UTC
Updated: August 5, 2026 at 09:24 AM UTC
1 product affected across 1 vendorLinux Kernel

Using Linux by Linux?

Get instant alerts when new vulnerabilities affect Linux - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
MEDIUM5.5
Exploit prediction
EPSS 0.3%

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.

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

5.18 ≤ v < 5.18.25.2 ≤ v < 5.17.135.2 ≤ v < 5.18.25.2 ≤ v < 5.195.2bd53cb35a3e9adb73a834a36586e9ad80e877767
Vendor states this is fixed in 38b888911e8dc89b89d8147cfb1d2dbe6373bf78 (fixed)
Vendor states this is fixed in 8089e5e1d18402fb8152d6b6815450a36fffa9b0 (fixed)
Vendor states this is fixed in f122dfe4476890d60b8c679128cd2259ec96a24c (fixed)
Vendor states this is fixed in 5.17.13 (unaffected)
Vendor states this is fixed in 5.18.2 (unaffected)
Vendor states this is fixed in 5.19 (unaffected)
Vendor states this is fixed in 5.2 (unaffected)

References (3)

Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/38b888911e8dc89b89d8147cfb1d2dbe6373bf78
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/8089e5e1d18402fb8152d6b6815450a36fffa9b0
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/f122dfe4476890d60b8c679128cd2259ec96a24c

CVSS

Attack Vector
LOCAL
Complexity
LOW
Privileges
LOW
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
NONE
Integrity
NONE
Availability
HIGH
Vector?

Quick Info

StatusMODIFIED
CWE
NVD-CWE-noinfo

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card