mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-05 06:18:45 -04:00
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: 7dc7967fc3 ("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>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
87232b827e
commit
d687bdefba
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user