All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] hpet: Fix a small information leak
@ 2020-05-12  6:14 Allen Pais
  0 siblings, 0 replies; only message in thread
From: Allen Pais @ 2020-05-12  6:14 UTC (permalink / raw)
  To: clemens; +Cc: linux-kernel, Allen Pais

 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")
Signed-off-by: Allen Pais <allen.lkml@gmail.com>
---
 drivers/char/hpet.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/char/hpet.c b/drivers/char/hpet.c
index ed3b7dab678d..d9592eb24635 100644
--- a/drivers/char/hpet.c
+++ b/drivers/char/hpet.c
@@ -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);
-- 
2.17.1


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2020-05-12  6:14 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-12  6:14 [PATCH] hpet: Fix a small information leak Allen Pais

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.