USB: serial/mos*: prevent reading uninitialized stack memory
commitf2ba1916d33431e42f4ef440c903aeb5dbac62fb
authorDan Rosenberg <drosenberg@vsecurity.com>
Wed, 15 Sep 2010 21:44:16 +0000 (15 17:44 -0400)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 27 Sep 2010 00:21:14 +0000 (26 17:21 -0700)
treef5a52eaadc120f53e1bd0cac60ef465c00b99930
parenteaa1ace05aaf4503589a3111a6f5401e85716d51
USB: serial/mos*: prevent reading uninitialized stack memory

commit a0846f1868b11cd827bdfeaf4527d8b1b1c0b098 upstream.

The TIOCGICOUNT device ioctl in both mos7720.c and mos7840.c allows
unprivileged users to read uninitialized stack memory, because the
"reserved" member of the serial_icounter_struct struct declared on the
stack is not altered or zeroed before being copied back to the user.
This patch takes care of it.

Signed-off-by: Dan Rosenberg <dan.j.rosenberg@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/serial/mos7720.c
drivers/usb/serial/mos7840.c