Re: [PATCH] KVM: x86: Zero reserved synic flags when delivering message to avoid stack leak
From: Sean Christopherson
Date: Mon Sep 21 2026 - 11:01:44 EST
On Wed, 26 Aug 2026 11:44:49 -0700, Sean Christopherson wrote:
> Ensure all reserved flags are zeroed when setting the msg_pending flag as
> part of SynIC message delivery, as setting only msg_pending can leak seven
> bits of kernel stack data to the guest. E.g. gcc typically uses a
> bitwise-OR to set the msg_pending flag, without initializing the on-stack
> variable.
>
> Precisely zero the flags, e.g. as opposed to zeroing the entire structure,
> to make it somewhat more obvious that the flags *need* to be zeroed. E.g.
> it would be quite easy to misread the initial read of guest memory and
> think that zeroing the entire structure is completely superfluous.
>
> [...]
Applied to kvm-x86 misc, thanks!
[1/1] KVM: x86: Zero reserved synic flags when delivering message to avoid stack leak
https://github.com/kvm-x86/linux/commit/2616f497506a
--
https://github.com/kvm-x86/linux/tree/next