* [PATCH 1/8] char: applicom: fix information leak to userland
@ 2010-10-17 14:41 Vasiliy Kulikov
0 siblings, 0 replies; only message in thread
From: Vasiliy Kulikov @ 2010-10-17 14:41 UTC (permalink / raw)
To: kernel-janitors
Cc: Arnd Bergmann, Andrew Morton, Frederic Weisbecker, Julia Lawall,
Jiri Kosina, linux-kernel
Structure st_loc is copied to userland with some fields unitialized.
It leads to leaking of stack memory.
Signed-off-by: Vasiliy Kulikov <segooon@gmail.com>
---
Compile tested.
drivers/char/applicom.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/drivers/char/applicom.c b/drivers/char/applicom.c
index e7ba774..25373df 100644
--- a/drivers/char/applicom.c
+++ b/drivers/char/applicom.c
@@ -566,6 +566,7 @@ static ssize_t ac_read (struct file *filp, char __user *buf, size_t count, loff_
struct mailbox mailbox;
/* Got a packet for us */
+ memset(&st_loc, 0, sizeof(st_loc));
ret = do_ac_read(i, buf, &st_loc, &mailbox);
spin_unlock_irqrestore(&apbs[i].mutex, flags);
set_current_state(TASK_RUNNING);
--
1.7.0.4
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2010-10-17 14:41 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-10-17 14:41 [PATCH 1/8] char: applicom: fix information leak to userland Vasiliy Kulikov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome