summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2013-04-21 14:07:53 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-04-22 10:25:46 -0700
commit2516ffac94e389cfeeb3abf2fd59d7c688a38f0c (patch)
tree9262d43af230ae78ff2ee7c34ca0c552bd528cd6
parenteecb262922209d714cc24a1dc8e5bf9a9fdbfc65 (diff)
downloadlinux-stable-2516ffac94e389cfeeb3abf2fd59d7c688a38f0c.tar.gz
linux-stable-2516ffac94e389cfeeb3abf2fd59d7c688a38f0c.tar.bz2
linux-stable-2516ffac94e389cfeeb3abf2fd59d7c688a38f0c.zip
staging/ozwpan: info leak in oz_cdev_ioctl()
If we're not maxed out then oz_get_pd_list() leaves part of the "list" struct uninitialized. We should clear this so that no stack information is leaked to userspace. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/staging/ozwpan/ozcdev.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/staging/ozwpan/ozcdev.c b/drivers/staging/ozwpan/ozcdev.c
index ba15aeb70672..27d06666c81a 100644
--- a/drivers/staging/ozwpan/ozcdev.c
+++ b/drivers/staging/ozwpan/ozcdev.c
@@ -253,6 +253,7 @@ static long oz_cdev_ioctl(struct file *filp, unsigned int cmd,
case OZ_IOCTL_GET_PD_LIST: {
struct oz_pd_list list;
oz_trace("OZ_IOCTL_GET_PD_LIST\n");
+ memset(&list, 0, sizeof(list));
list.count = oz_get_pd_list(list.addr, OZ_MAX_PDS);
if (copy_to_user((void __user *)arg, &list,
sizeof(list)))