KVM: PPC: Book3S HV: fix secure device page leak on uv_page_in() failure
- Published
- Last modified
- Where the record stands: published, rejected by its publisher, or superseded by another id.What do these mean? →
- published
- Whether CISA lists it in its Known Exploited Vulnerabilities catalog: proof that attackers are using it.What do these mean? →
- Not listed in CISA KEV
- Fix
- Fixed in 5.10.271, 5.15.222, 6.1.189, 6.6.158, 6.12.112, and 2 more
- Whether working attack code is public (Exploit-DB, Metasploit, Nuclei or GitHub). Public code makes attacks easier.What do these mean? →
- None on Exploit-DB, Metasploit or GitHub
Summary
In the Linux kernel, the following vulnerability has been resolved: KVM: PPC: Book3S HV: fix secure device page leak on uv_page_in() failure In kvmppc_svm_page_in(), if uv_page_in() fails after kvmppc_uvmem_get_page() has succeeded, the secure device page is never released. kvmppc_uvmem_get_page() sets a bit in kvmppc_uvmem_bitmap, allocates a kvmppc_uvmem_page_pvt struct, marks the GFN as KVMPPC_GFN_UVMEM_PFN, and calls zone_device_page_init() which sets refcount=1 and locks the page. The subsequent goto out_finalize skips the *mig.dst assignment, so migrate_vma_finalize() is a no-op for the page, and none of those resources are ever reclaimed. Each occurrence permanently consumes one entry from the firmware-bounded secure memory pool (kvmppc_uvmem_bitmap), leaks pvt, and leaves the GFN marked as secure — making it unusable for the lifetime of the VM. The twin __kvmppc_svm_page_out() already handles the analogous uv_page_out() failure correctly with unlock_page(dpage); __free_page(dpage). Apply the same pattern here: unlock_page() followed by put_page(), which chains through free_zone_device_folio() into kvmppc_uvmem_folio_free() to clear the bitmap bit, free pvt, and reset the GFN state. Reachable whenever uv_page_in() returns an error (e.g. UV pool exhaustion) on any POWER9/10 + Ultravisor/PEF system.
Timeline
- CVE published
- Record last updated
Affected versions
- Linux Linux
From ca9f4942670c37407bb109090eaf776ce2ccc54c · fixed in ed2f2ff63cb7e71204096e765c6d02c3b6974b95; From ca9f4942670c37407bb109090eaf776ce2ccc54c · fixed in 8f3b7746874b39fc20e0363c9076c7787d4765ba; From ca9f4942670c37407bb109090eaf776ce2ccc54c · fixed in a933d7024359e2e566b07903d1294b84f90482ae; From ca9f4942670c37407bb109090eaf776ce2ccc54c · fixed in c41088b2765af1e97e7bb05f906ae1823eca0388; From ca9f4942670c37407bb109090eaf776ce2ccc54c · fixed in f3d4b2fc30c97cf8e6f8b880d2de9c17ecac7f5b; From ca9f4942670c37407bb109090eaf776ce2ccc54c · fixed in dfb84274932737e338ff5eb27f34b4c8ecb01b50; From ca9f4942670c37407bb109090eaf776ce2ccc54c · fixed in fcbff8008b0e08cd53b611bd0ff7e01f5b962f80; From ca9f4942670c37407bb109090eaf776ce2ccc54c · fixed in 0a416ee20bcccddf91ca5b63696a23b9d11d73aa
- Linux Linux
5.5
- KernelLinux
From 5.5.0 · fixed in 5.10.271; From 5.11.0 · fixed in 5.15.222; From 5.16.0 · fixed in 6.1.189; From 6.2.0 · fixed in 6.6.158; From 6.7.0 · fixed in 6.12.112; From 6.13.0 · fixed in 6.18.54; From 6.19.0 · fixed in 7.2.8
References 8
git.kernel.org
- stable/c/ed2f2ff63cb7e71204096e765c6d02c3b6974b95
- stable/c/8f3b7746874b39fc20e0363c9076c7787d4765ba
- stable/c/a933d7024359e2e566b07903d1294b84f90482ae
- stable/c/c41088b2765af1e97e7bb05f906ae1823eca0388
- stable/c/f3d4b2fc30c97cf8e6f8b880d2de9c17ecac7f5b
- stable/c/dfb84274932737e338ff5eb27f34b4c8ecb01b50
- stable/c/fcbff8008b0e08cd53b611bd0ff7e01f5b962f80
- stable/c/0a416ee20bcccddf91ca5b63696a23b9d11d73aa