summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2013-04-21 11:08:31 (GMT)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-04-22 17:25:46 (GMT)
commiteecb262922209d714cc24a1dc8e5bf9a9fdbfc65 (patch)
treec7ff7180cb3401e7a705752be24e8476149cbc5a /drivers
parenta4b47eeac2fe1687a6af0d30509a39b23a466cf6 (diff)
downloadlinux-eecb262922209d714cc24a1dc8e5bf9a9fdbfc65.tar.xz
staging: dgrp: info leak in dgrp_dpa_ioctl()
If "nd->nd_vpd_len" is less than 512 then the last part of the "vpd.vpd_data" has uninitialized stack information. We need to clear it before copying the buffer to user space. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/staging/dgrp/dgrp_dpa_ops.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/staging/dgrp/dgrp_dpa_ops.c b/drivers/staging/dgrp/dgrp_dpa_ops.c
index 67fb3d6..ca10a33 100644
--- a/drivers/staging/dgrp/dgrp_dpa_ops.c
+++ b/drivers/staging/dgrp/dgrp_dpa_ops.c
@@ -432,6 +432,7 @@ static long dgrp_dpa_ioctl(struct file *file, unsigned int cmd,
case DIGI_GETVPD:
+ memset(&vpd, 0, sizeof(vpd));
if (nd->nd_vpd_len > 0) {
vpd.vpd_len = nd->nd_vpd_len;
memcpy(&vpd.vpd_data, &nd->nd_vpd, nd->nd_vpd_len);