Skip to content

Commit d8cdddc

Browse files
segoonmatosatti
authored andcommitted
KVM: PPC: fix information leak to userland
Structure kvm_ppc_pvinfo is copied to userland with flags and pad fields unitialized. It leads to leaking of contents of kernel stack memory. Signed-off-by: Vasiliy Kulikov <segooon@gmail.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
1 parent eb45fda commit d8cdddc

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

‎arch/powerpc/kvm/powerpc.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -617,6 +617,7 @@ long kvm_arch_vm_ioctl(struct file *filp,
617617
switch (ioctl) {
618618
case KVM_PPC_GET_PVINFO: {
619619
struct kvm_ppc_pvinfo pvinfo;
620+
memset(&pvinfo, 0, sizeof(pvinfo));
620621
r = kvm_vm_ioctl_get_pvinfo(&pvinfo);
621622
if (copy_to_user(argp, &pvinfo, sizeof(pvinfo))) {
622623
r = -EFAULT;

0 commit comments

Comments
 (0)