KVM: x86: Use __try_cmpxchg_user() to update guest PTE A/D bits
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
5.17.135.18.25.19In 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.
From the CVE record · Linux
The Linux kernel KVM x86 code can access unintended page frame numbers when updating guest page-table accessed/dirty bits for VM_PFNMAP mappings other than the original /dev/mem use case. The input does not specify attacker capabilities, authentication requirements, or whether user interaction is needed.
Engineers running Linux kernels with KVM x86 should check whether their kernel is affected; affected versions were not provided.