Staging: gdm72xx: underflow bug in gdm_wimax_ioctl_get_data()
authorDan Carpenter <dan.carpenter@oracle.com>
Mon, 22 Feb 2016 19:33:09 +0000 (22:33 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 5 Mar 2016 22:48:04 +0000 (14:48 -0800)
"size" here should be unsigned, otherwise we might end up trying to copy
negative bytes in gdm_wimax_ioctl_get_data() resulting in an information
leak.

Reported-by: Alan Cox <gnomes@lxorguk.ukuu.org.uk>
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/gdm72xx/wm_ioctl.h

index 631cb1d23c7e62e2b42b0eb5bb85e5ae028c2874..032cb073461ca754e46ecf49fabb0708a7b602f9 100644 (file)
@@ -74,12 +74,12 @@ struct fsm_s {
 };
 
 struct data_s {
-       int     size;
+       unsigned int size;
        void    *buf;
 };
 
 struct udata_s {
-       int             size;
+       unsigned int    size;
        void __user     *buf;
 };
 
This page took 0.024937 seconds and 5 git commands to generate.