summaryrefslogtreecommitdiffstats
path: root/drivers/misc
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2013-06-12 23:05:00 +0200
committerLinus Torvalds <torvalds@linux-foundation.org>2013-06-13 01:29:46 +0200
commit282c4c0ecce9b9ac1b69acae32a4239441601405 (patch)
tree5c4be94e5dcb31e36ec0dcaf9c3c0045769e7533 /drivers/misc
parentaio: fix io_destroy() regression by using call_rcu() (diff)
downloadlinux-282c4c0ecce9b9ac1b69acae32a4239441601405.tar.xz
linux-282c4c0ecce9b9ac1b69acae32a4239441601405.zip
drivers/misc/sgi-gru/grufile.c: fix info leak in gru_get_config_info()
The "info.fill" array isn't initialized so it can leak uninitialized stack information to user space. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Robin Holt <holt@sgi.com> Acked-by: Dimitri Sivanich <sivanich@sgi.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/misc')
-rw-r--r--drivers/misc/sgi-gru/grufile.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/misc/sgi-gru/grufile.c b/drivers/misc/sgi-gru/grufile.c
index 44d273c5e19d..0535d1e0bc78 100644
--- a/drivers/misc/sgi-gru/grufile.c
+++ b/drivers/misc/sgi-gru/grufile.c
@@ -172,6 +172,7 @@ static long gru_get_config_info(unsigned long arg)
nodesperblade = 2;
else
nodesperblade = 1;
+ memset(&info, 0, sizeof(info));
info.cpus = num_online_cpus();
info.nodes = num_online_nodes();
info.blades = info.nodes / nodesperblade;