CVE-2026-99712: KVM: x86: Conditionally resched when restarting REP string emulation
In the Linux kernel, the following vulnerability has been resolved:
KVM: x86: Conditionally resched when restarting REP string emulation
When restarting emulation, e.g. of a REP-prefixed string instruction, conditionally reschedule as emulating guest writes can be deceptively slow and expensive, e.g. when shadow paging is in use and each write can trigger write tracking.
In a perfect world, restarting emulation (or not) would be less arbitrary, e.g. would honor not only host events (NEEDRESCHED, signals, etc.) but also guest events (e.g. by checking kvmvcpuhasevents()). Unfortunately, as pointed out by Sashiko, pioinemulated()'s read-ahead logic is baked into the restart logic, as KVM relies on restarting emulation to drain the cache and avoid duplicate reads from the I/O port. I.e. re-entering the guest on kvmvcpuhasevents() or xfertoguestmodeworkpending() would introduce architecturally-incorrect, guest-visible changes.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.12.118 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.18.64 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 7.3.5 - Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 7.3.5-1
Event History
Frequently Asked Questions
Which environments are most likely to experience the performance impact?
KVM on x86 is affected when emulation is restarted, such as for REP-prefixed string instructions. The cost can be especially high with shadow paging, where guest writes may trigger write tracking for each write.
Why does the fix only conditionally reschedule instead of responding to all pending guest events?
KVM's restart behavior is required to drain the I/O port read-ahead cache and prevent duplicate I/O-port reads. Re-entering the guest merely because guest events or guest-mode work are pending could create architecturally incorrect, guest-visible behavior.