diff options
author | Vasiliy Kulikov <segooon@gmail.com> | 2010-10-27 18:34:21 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-10-27 21:03:14 -0400 |
commit | 19714a8af8fe8618a9beace1f7a3bb10d55d5e2f (patch) | |
tree | cdeb07d5d1c2038d1f2251e8455075ccdfa4903e /drivers/char/applicom.c | |
parent | ffd7d6baa65e6161cfd996a59d55c48571c2a5f3 (diff) |
drivers/char/applicom.c: fix information leak to userland
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>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/char/applicom.c')
-rw-r--r-- | 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 e7ba774beda6..25373df1dcf8 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_ | |||
566 | struct mailbox mailbox; | 566 | struct mailbox mailbox; |
567 | 567 | ||
568 | /* Got a packet for us */ | 568 | /* Got a packet for us */ |
569 | memset(&st_loc, 0, sizeof(st_loc)); | ||
569 | ret = do_ac_read(i, buf, &st_loc, &mailbox); | 570 | ret = do_ac_read(i, buf, &st_loc, &mailbox); |
570 | spin_unlock_irqrestore(&apbs[i].mutex, flags); | 571 | spin_unlock_irqrestore(&apbs[i].mutex, flags); |
571 | set_current_state(TASK_RUNNING); | 572 | set_current_state(TASK_RUNNING); |