]> git.karo-electronics.de Git - karo-tx-linux.git/commit
KVM: x86: fix information leak to userland
authorVasiliy Kulikov <segooon@gmail.com>
Sat, 30 Oct 2010 18:54:47 +0000 (22:54 +0400)
committerAndi Kleen <ak@linux.intel.com>
Tue, 14 Dec 2010 22:40:09 +0000 (23:40 +0100)
commitbe6eb177af13eceaef0052a0628b7153844bbea9
treeef31a23809760dd0d6941c10fc5d65b55bf680bb
parente110ca176b8d6499d9b6d69a5e1b9055f10e6a1b
KVM: x86: fix information leak to userland

commit 97e69aa62f8b5d338d6cff49be09e37cc1262838 upstream.

Structures kvm_vcpu_events, kvm_debugregs, kvm_pit_state2 and
kvm_clock_data are copied to userland with some padding and reserved
fields unitialized.  It leads to leaking of contents of kernel stack
memory.  We have to initialize them to zero.

In patch v1 Jan Kiszka suggested to fill reserved fields with zeros
instead of memset'ting the whole struct.  It makes sense as these
fields are explicitly marked as padding.  No more fields need zeroing.

Signed-off-by: Vasiliy Kulikov <segooon@gmail.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Andi Kleen <ak@linux.intel.com>
arch/x86/kvm/x86.c