lkml.org 
[lkml]   [2002]   [May]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
Subject[PATCH 2.5.15] : Wireless ctitical fix
From
	Jeff,

The following patch fix a off-by-one error that can result in
a crash (plus other cosmetic changes). Tested on 2.5.15. Would you
mind forwarding that to Linus ?
Thanks...

Jean

------------------------------------------------------

diff -u -p linux/net/core/wireless.v3.c linux/net/core/wireless.c
--- linux/net/core/wireless.v3.c Fri May 10 15:45:56 2002
+++ linux/net/core/wireless.c Fri May 10 15:48:42 2002
@@ -28,11 +28,13 @@
*
* v3 - 19.12.01 - Jean II
* o Make sure we don't go out of standard_ioctl[] in ioctl_standard_call
- * o Fix /proc/net/wireless to handle __u8 to __s8 change in iwqual
* o Add event dispatcher function
* o Add event description
* o Propagate events as rtnetlink IFLA_WIRELESS option
* o Generate event on selected SET requests
+ *
+ * v4 - 18.04.01 - Jean II
+ * o Fix stupid off by one in iw_ioctl_description : IW_ESSID_MAX_SIZE + 1
*/

/***************************** INCLUDES *****************************/
@@ -122,13 +124,13 @@ static const struct iw_ioctl_description
/* SIOCGIWSCAN */
{ IW_HEADER_TYPE_POINT, 0, 1, 0, IW_SCAN_MAX_DATA, 0},
/* SIOCSIWESSID */
- { IW_HEADER_TYPE_POINT, 0, 1, 0, IW_ESSID_MAX_SIZE, IW_DESCR_FLAG_EVENT},
+ { IW_HEADER_TYPE_POINT, 0, 1, 0, IW_ESSID_MAX_SIZE + 1, IW_DESCR_FLAG_EVENT},
/* SIOCGIWESSID */
- { IW_HEADER_TYPE_POINT, 0, 1, 0, IW_ESSID_MAX_SIZE, IW_DESCR_FLAG_DUMP},
+ { IW_HEADER_TYPE_POINT, 0, 1, 0, IW_ESSID_MAX_SIZE + 1, IW_DESCR_FLAG_DUMP},
/* SIOCSIWNICKN */
- { IW_HEADER_TYPE_POINT, 0, 1, 0, IW_ESSID_MAX_SIZE, 0},
+ { IW_HEADER_TYPE_POINT, 0, 1, 0, IW_ESSID_MAX_SIZE + 1, 0},
/* SIOCGIWNICKN */
- { IW_HEADER_TYPE_POINT, 0, 1, 0, IW_ESSID_MAX_SIZE, 0},
+ { IW_HEADER_TYPE_POINT, 0, 1, 0, IW_ESSID_MAX_SIZE + 1, 0},
/* -- hole -- */
{ IW_HEADER_TYPE_NULL, 0, 0, 0, 0, 0},
/* -- hole -- */
diff -u -p linux/include/net/iw_handler.v3.h linux/include/net/iw_handler.h
--- linux/include/net/iw_handler.v3.h Fri May 10 15:46:51 2002
+++ linux/include/net/iw_handler.h Fri May 10 15:48:06 2002
@@ -245,7 +245,8 @@
/* Wrapper level flags */
#define IW_DESCR_FLAG_DUMP 0x0001 /* Not part of the dump command */
#define IW_DESCR_FLAG_EVENT 0x0002 /* Generate an event on SET */
-#define IW_DESCR_FLAG_RESTRICT 0x0004 /* GET request is ROOT only */
+#define IW_DESCR_FLAG_RESTRICT 0x0004 /* GET : request is ROOT only */
+ /* SET : Omit payload from generated iwevent */
/* Driver level flags */
#define IW_DESCR_FLAG_WAIT 0x0100 /* Wait for driver event */

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2005-03-22 13:26    [W:0.020 / U:0.592 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site