powerpc: kvm: fix information leak to userland
Subsystems (4)
PATCH 1/1 powerpc: kvm: 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 <[email protected]>
---
I cannot compile this driver, so it is not tested at all.
arch/powerpc/kvm/powerpc.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
arch/powerpc/kvm/powerpc.c +1 -0
@@ -617,6 +617,7 @@ long kvm_arch_vm_ioctl(struct file *filp,switch (ioctl) {case KVM_PPC_GET_PVINFO : {struct kvm_ppc_pvinfo pvinfo; +memset (&pvinfo,0 ,sizeof (pvinfo)); r =kvm_vm_ioctl_get_pvinfo (&pvinfo);if (copy_to_user (argp, &pvinfo,sizeof (pvinfo))) { r = -EFAULT ;
Signature · 1 line
1.7.0.4
Marcelo Tosatti
AppliedQuoted 10 lines · Vasiliy Kulikov
Structure
kvm_ppc_pvinfois copied to userland with flags and pad fields unitialized. It leads to leaking of contents of kernel stack memory.Signed-off-by Vasiliy Kulikov <[email protected]>---
I cannot compile this driver, so it is not tested at all.arch/powerpc/kvm/powerpc.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
Applied, thanks.