Re: [PATCH] KVM: x86: Initialize the PIO bounce buffer on PIT control-port reads
From: Sean Christopherson
Date: Fri Nov 13 2026 - 09:10:07 EST
On Sun, 18 Oct 2026 13:52:29 +0200, Pablo Azuaje wrote:
> pit_ioport_read() bails out for reads of the control word register
> (port 0x43) without writing to the PIO bounce buffer. The read is
> nevertheless reported as successful, so the guest receives whatever the
> buffer happens to hold -- typically its own bytes from a previous OUT
> or IN on the same port -- as the readback value.
>
> Real hardware returns undefined data for reads of the control word
> register, so keep KVM's behavior well-defined and predictable: zero the
> bounce buffer before returning. The read is still reported as
> successful, and returning the guest's own prior IO bytes as a
> pseudo-readback is observable state with no architectural meaning;
> zeroing is the least-surprise choice. This is also hardening rather
> than a security fix: the leaked bytes belong to the guest itself, never
> to the host.
>
> [...]
Applied to kvm-x86 misc, thanks!
[1/1] KVM: x86: Initialize the PIO bounce buffer on PIT control-port reads
https://github.com/kvm-x86/linux/commit/54cb295ef092
--
https://github.com/kvm-x86/linux/tree/next