Staging: sb105x: info leak in mp_get_count()
authorDan Carpenter <dan.carpenter@oracle.com>
Tue, 29 Oct 2013 20:01:43 +0000 (23:01 +0300)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 30 Oct 2013 19:24:50 +0000 (12:24 -0700)
The icount.reserved[] array isn't initialized so it leaks stack
information to userspace.

Reported-by: Nico Golde <nico@ngolde.de>
Reported-by: Fabian Yamaguchi <fabs@goesec.de>
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Cc: stable@kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/staging/sb105x/sb_pci_mp.c

index 23db32f07fd533ac4803b9a0a56815a5a7606eea..a10cdb17038bf9717bbb20f979fb104dda9ccb27 100644 (file)
@@ -1063,7 +1063,7 @@ static int mp_wait_modem_status(struct sb_uart_state *state, unsigned long arg)
 
 static int mp_get_count(struct sb_uart_state *state, struct serial_icounter_struct *icnt)
 {
-       struct serial_icounter_struct icount;
+       struct serial_icounter_struct icount = {};
        struct sb_uart_icount cnow;
        struct sb_uart_port *port = state->port;