# CVE-2022-49562: KVM: x86: Use __try_cmpxchg_user() to update guest PTE A/D bits

- Severity: High 7.8 (CVSS:3.1, scored by Linux) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.28%, higher than 21% of CVEs (2026-12-01)
- Published: 2025-02-26T02:14:06.515Z
- Modified: 2026-08-05T08:55:46.165Z
- Assigned by: Linux

## 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.

(As written by CVE List.)

## Affected

- Linux Linux: from bd53cb35a3e9adb73a834a36586e9ad80e877767 before 38b888911e8dc89b89d8147cfb1d2dbe6373bf78; from bd53cb35a3e9adb73a834a36586e9ad80e877767 before 8089e5e1d18402fb8152d6b6815450a36fffa9b0; from bd53cb35a3e9adb73a834a36586e9ad80e877767 before f122dfe4476890d60b8c679128cd2259ec96a24c; 5.2 (not affected: before 5.2; from 5.17.13 up to 5.17.*; from 5.18.2 up to 5.18.*; from 5.19 up to *)
- linux linux_kernel: from 5.2 before 5.17.13; from 5.18 before 5.18.2

## Every score

- Linux: CVSS:3.1 7.8 High `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- NVD: CVSS:3.1 5.5 Medium `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`

## References

- <https://git.kernel.org/stable/c/38b888911e8dc89b89d8147cfb1d2dbe6373bf78> (patch)
- <https://git.kernel.org/stable/c/8089e5e1d18402fb8152d6b6815450a36fffa9b0> (patch)
- <https://git.kernel.org/stable/c/f122dfe4476890d60b8c679128cd2259ec96a24c> (patch)

## Sources

- CVE List: [CVE-2022-49562](https://www.cve.org/CVERecord?id=CVE-2022-49562), CVE Terms of Use, modified 2026-08-05
- NVD: [CVE-2022-49562](https://nvd.nist.gov/vuln/detail/CVE-2022-49562), Public domain, modified 2026-08-04

---

Page: https://cve.day/CVE-2022-49562 · Whole record: https://cve.day/CVE-2022-49562.json · Rebuilt by cve.day 2026-11-25T22:58:20.733Z
