diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2019-04-30 13:35:05 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-04-30 15:19:04 +0300 |
commit | d687bdefba270c11df0234b3285cd50d60de284b (patch) | |
tree | 4681586615e195bb745752eee0cf938b2b3b856e /drivers | |
parent | 87232b827ef793060ed59af36d89ae90a092ac96 (diff) | |
download | linux-d687bdefba270c11df0234b3285cd50d60de284b.tar.xz |
staging: kpc2000: Fix a stack information leak in kp2000_cdev_ioctl()
The kp2000_regs struct has a 4 byte hole between ->hw_rev and ->ssid so
this could leak stack information to the user. This patch just memsets
the whole struct to zero.
Fixes: 7dc7967fc39a ("staging: kpc2000: add initial set of Daktronics drivers")
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/kpc2000/kpc2000/fileops.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/staging/kpc2000/kpc2000/fileops.c b/drivers/staging/kpc2000/kpc2000/fileops.c index 4bfba59570e6..a6beca8dbac5 100644 --- a/drivers/staging/kpc2000/kpc2000/fileops.c +++ b/drivers/staging/kpc2000/kpc2000/fileops.c @@ -91,6 +91,8 @@ long kp2000_cdev_ioctl(struct file *filp, unsigned int ioctl_num, unsigned long case KP2000_IOCTL_GET_EVERYTHING: { struct kp2000_regs temp; int ret; + + memset(&temp, 0, sizeof(temp)); temp.card_id = pcard->card_id; temp.build_version = pcard->build_version; temp.build_datestamp = pcard->build_datestamp; |