CVE-2026-99334: KVM: PPC: Book3S HV: Add preempt_disable() around virtual-mode HPTE bit-lock users

Published Nov 19, 2026
·
Updated

In the Linux kernel, the following vulnerability has been resolved:

KVM: PPC: Book3S HV: Add preemptdisable() around virtual-mode HPTE bit-lock users

kvmppchvfindlockhpte() requires virtual-mode callers to run with preemption disabled, because it can return with HPTEVHVLOCK still held until the caller later unlocks the HPTE. Existing virtual-mode callers in book3s64mmuhv.c already follow that rule.

Two virtual-mode call paths do not:

1. kvmppchandleexithv() calls kvmppchptehvfault() for hash-mode data-side and instruction-side faults after guest exit, with preemption already enabled. kvmppchptehvfault() calls kvmppchvfindlockhpte() directly.

2. kvmppcpseriesdohcall() executes virtual-mode handlers for HPT hcalls via kvmppcpseriesdohpthcall() with preemption enabled. The handlers for HENTER, HREMOVE, HREAD, HCLEARMOD, HCLEARREF, HPROTECT, and HBULKREMOVE spin on trylockhpte() or lockrmap(), and HENTER also reaches kvmppcdohenter(), which uses archspinlock() on kvm->mmulock. That raw lock choice is intentional because kvmppcdohenter() is also used by real-mode callers, so the correct fix is to establish the proper preemption context at the virtual-mode caller boundary.

If a vCPU thread is preempted while holding HPTEVHVLOCK, any other thread on the same CPU trying to acquire the same bit-lock can spin indefinitely. The same applies to lockrmap() users and to the HENTER path while holding the raw mmulock.

Fix this by adding preemptdisable()/preemptenable() pairs around the two kvmppchptehvfault() call sites in kvmppchandleexithv(), and around the kvmppcpseriesdohpthcall() invocation in kvmppcpseriesdohcall(). Targeting only the HPT hcall helper avoids wrapping non-HPT hcalls (such as HRTAS, HCONFER, HREGISTERVPA) that perform page faults, blocking memory allocations, or context switches.

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Compensating control

    In virtual-mode callers, add preempt_disable()/preempt_enable() pairs around HPT operations that use HPTE bit-locks, including the H_PROTECT and H_BULK_REMOVE paths; establish the preemption-disabled context at the caller boundary.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203