Skip to content

Commit

Permalink
drivers/char/applicom.c: fix information leak to userland
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Vasiliy Kulikov authored and Linus Torvalds committed Oct 28, 2010
1 parent ffd7d6b commit 19714a8
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/char/applicom.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 19714a8

Please sign in to comment.