Skip to content

Commit

Permalink
staging: dgrp: info leak in dgrp_dpa_ioctl()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Dan Carpenter authored and Greg Kroah-Hartman committed Apr 22, 2013
1 parent a4b47ee commit eecb262
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/staging/dgrp/dgrp_dpa_ops.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit eecb262

Please sign in to comment.