diff options
| author | Sean Christopherson <seanjc@google.com> | 2026-08-26 11:44:49 -0700 |
|---|---|---|
| committer | Sean Christopherson <seanjc@google.com> | 2026-09-11 15:41:56 -0700 |
| commit | 2616f497506a772db53e7bb1024cde50b4c165e0 (patch) | |
| tree | 297d98dc49bdf70ab7f08a85846f071cf0a7c0cf /tools/perf/scripts/python/task-analyzer.py | |
| parent | 7d2a727f44d833c5f5771e61fc721359f01a0b6f (diff) | |
KVM: x86: Zero reserved synic flags when delivering message to avoid stack leak
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.
Fixes: 3a0e7731724f ("x86: kvm: hyperv: simplify SynIC message delivery")
Cc: stable@vger.kernel.org
Reported-by: Stefan Teodorescu <fane@google.com>
Reviewed-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Link: https://patch.msgid.link/20260826184449.814130-1-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
Diffstat (limited to 'tools/perf/scripts/python/task-analyzer.py')
0 files changed, 0 insertions, 0 deletions
