From: Vasiliy Kulikov <segoon@openwall.com>
To: linux-kernel@vger.kernel.org
Cc: Arnd Bergmann <arnd@arndb.de>, Frederic Weisbecker <fweisbec@gmail.com>
Subject: [PATCH] char: genrtc: fix infoleak to userspace
Date: Sat, 9 Apr 2011 16:41:30 +0400 [thread overview]
Message-ID: <1302352890-20892-1-git-send-email-segoon@openwall.com> (raw)
struct pll is copied to userspace. It is filled in "multiplexing" function
get_rtc_pll(). At least one implementator, q40_get_rtc_pll(), doesn't
fill .pll_ctrl field. It's hard to understand whether either the caller
or the callee must zero the unused struct fields, however, on another
ioctl commands the caller already zeroes the structure. So, let's the
caller use memset().
Signed-off-by: Vasiliy Kulikov <segoon@openwall.com>
---
drivers/char/genrtc.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/drivers/char/genrtc.c b/drivers/char/genrtc.c
index f773a9d..65cd683 100644
--- a/drivers/char/genrtc.c
+++ b/drivers/char/genrtc.c
@@ -273,6 +273,7 @@ static int gen_rtc_ioctl(struct file *file,
switch (cmd) {
case RTC_PLL_GET:
+ memset(&pll, 0, sizeof(pll));
if (get_rtc_pll(&pll))
return -EINVAL;
else
--
1.7.0.4
reply other threads:[~2011-04-09 12:41 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=1302352890-20892-1-git-send-email-segoon@openwall.com \
--to=segoon@openwall.com \
--cc=arnd@arndb.de \
--cc=fweisbec@gmail.com \
--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®