KVM: x86: zero base3 of unusable segments
authorRadim Krčmář <rkrcmar@redhat.com>
Thu, 18 May 2017 17:37:30 +0000 (19:37 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 2 Nov 2017 06:16:29 +0000 (07:16 +0100)
commitfe77accbd15d54708f5f4f23b585f6ca6225f9a4
tree6a3f528135a0aeda00a6fe999f01ce6d1b9256bb
parent40cfe451debb10d983378f72868359a17656be8a
KVM: x86: zero base3 of unusable segments

commit f0367ee1d64d27fa08be2407df5c125442e885e3 upstream.

Static checker noticed that base3 could be used uninitialized if the
segment was not present (useable).  Random stack values probably would
not pass VMCS entry checks.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Fixes: 1aa366163b8b ("KVM: x86 emulator: consolidate segment accessors")
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
Signed-off-by: Willy Tarreau <w@1wt.eu>
arch/x86/kvm/x86.c