]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
drivers/misc/sgi-gru/grufile.c: fix info leak in gru_get_config_info()
authorDan Carpenter <dan.carpenter@oracle.com>
Wed, 12 Jun 2013 21:05:00 +0000 (14:05 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 12 Jun 2013 23:29:46 +0000 (16:29 -0700)
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>
drivers/misc/sgi-gru/grufile.c

index 44d273c5e19d7befc7161f566b42f7e3e544ad18..0535d1e0bc78790a73c2f19c2877c9d2e078acfd 100644 (file)
@@ -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;