diff options
| author | Uros Bizjak <ubizjak@gmail.com> | 2026-02-12 22:24:04 +0100 |
|---|---|---|
| committer | Sean Christopherson <seanjc@google.com> | 2026-03-02 14:30:59 -0800 |
| commit | e1df128dc00beaa53b0be4e751b7f2f0192dc146 (patch) | |
| tree | 480388d6b976f26ad265cd7f7bd8c6b6295590c5 /rust/kernel/interop/git@git.tavy.me:linux-stable.git | |
| parent | 11439c4635edd669ae435eec308f4ab8a0804808 (diff) | |
KVM: x86: Zero-initialize temporary fxregs_state buffers in FXSAVE emulation
Explicitly zero-initialize stack-allocated struct fxregs_state
variables in em_fxsave() and fxregs_fixup() to ensure all padding and
unused fields are cleared before use.
Both functions declare temporary fxregs_state buffers that may be
partially written by fxsave. Although the emulator copies only the
architecturally defined portion of the state to userspace, any padding
or otherwise untouched bytes in the structure can remain uninitialized.
This can lead to the use of uninitialized stack data and may trigger
KMSAN reports. In the worst case, it could result in leaking stack
contents if such bytes are ever exposed.
No functional change intended.
Suggested-by: Sean Christopherson <seanjc@google.com>
Signed-off-by: Uros Bizjak <ubizjak@gmail.com>
Cc: Sean Christopherson <seanjc@google.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Thomas Gleixner <tglx@kernel.org>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Link: https://patch.msgid.link/20260212212457.24483-1-ubizjak@gmail.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
Diffstat (limited to 'rust/kernel/interop/git@git.tavy.me:linux-stable.git')
0 files changed, 0 insertions, 0 deletions
