Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d8cdddcd authored by Vasiliy Kulikov's avatar Vasiliy Kulikov Committed by Marcelo Tosatti
Browse files

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: default avatarVasiliy Kulikov <segooon@gmail.com>
Signed-off-by: default avatarMarcelo Tosatti <mtosatti@redhat.com>
parent eb45fda4
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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;