Skip to contentSkip to conversation

hpet: Fix a small information leak

PATCH New Allen Pais 1 participant 1 message May 12, 2020

Subsystems (2)
lore
Share & tools
lore

Allen Pais

author
#0 lore raw

PATCH 1/1 hpet: Fix a small information leak

hpet_info has a hole in it cause of which
we might end up leaking a few bytes.

Zero them with memset().

Fixes 54066a57c584 ("hpet: kill BKL, add compat_ioctl")
---
 drivers/char/hpet.c | 1 +
 1 file changed, 1 insertion(+)
drivers/char/hpet.c +1 -0
index ed3b7dab678d..d9592eb24635 100644
@@ -667,6 +667,7 @@ hpet_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
 	struct hpet_info info;
 	int err;
 
+	memset(&info, 0, sizeof(info));
 	mutex_lock(&hpet_mutex);
 	err = hpet_ioctl_common(file->private_data, cmd, arg, &info);
 	mutex_unlock(&hpet_mutex);
Signature · 1 line
2.17.1