projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
eb45fda
)
KVM: PPC: fix information leak to userland
author
Vasiliy Kulikov
<segooon@gmail.com>
Sat, 30 Oct 2010 09:04:24 +0000
(13:04 +0400)
committer
Marcelo Tosatti
<mtosatti@redhat.com>
Fri, 5 Nov 2010 16:42:26 +0000
(14:42 -0200)
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>
arch/powerpc/kvm/powerpc.c
patch
|
blob
|
history
diff --git
a/arch/powerpc/kvm/powerpc.c
b/arch/powerpc/kvm/powerpc.c
index 2f87a1627f6cff35604f96e8e041cffd9af071ff..38f756f2505389ac5f59eb9ae3921ef72175eea1 100644
(file)
--- a/
arch/powerpc/kvm/powerpc.c
+++ b/
arch/powerpc/kvm/powerpc.c
@@
-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;