From: Allen Pais <allen.lkml@gmail.com>
To: clemens@ladisch.de
Cc: linux-kernel@vger.kernel.org, Allen Pais <allen.lkml@gmail.com>
Subject: [PATCH] hpet: Fix a small information leak
Date: Tue, 12 May 2020 11:44:24 +0530 [thread overview]
Message-ID: <20200512061424.28381-1-allen.lkml@gmail.com> (raw)
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
reply other threads:[~2020-05-12 6:14 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200512061424.28381-1-allen.lkml@gmail.com \
--to=allen.lkml@gmail.com \
--cc=clemens@ladisch.de \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®