Skip to content

Commit

Permalink
[PATCH] wireless: More WE-21 potential overflows...
Browse files Browse the repository at this point in the history
After the Orinoco issue, I did an audit of other drivers for the same
issue.  Three drivers were NULL terminating the ESSID, which could cause an
overflow in WE-21 when the ESSID has maximum size.

Signed-off-by: Jean Tourrilhes <jt@hpl.hp.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Jean Tourrilhes authored and John W. Linville committed Oct 17, 2006
1 parent 683f8c9 commit 5307794
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 4 deletions.
1 change: 0 additions & 1 deletion drivers/net/wireless/airo.c
Original file line number Diff line number Diff line change
Expand Up @@ -5970,7 +5970,6 @@ static int airo_get_essid(struct net_device *dev,

/* Get the current SSID */
memcpy(extra, status_rid.SSID, status_rid.SSIDlen);
extra[status_rid.SSIDlen] = '\0';
/* If none, we may want to get the one that was set */

/* Push it out ! */
Expand Down
2 changes: 0 additions & 2 deletions drivers/net/wireless/atmel.c
Original file line number Diff line number Diff line change
Expand Up @@ -1678,11 +1678,9 @@ static int atmel_get_essid(struct net_device *dev,
/* Get the current SSID */
if (priv->new_SSID_size != 0) {
memcpy(extra, priv->new_SSID, priv->new_SSID_size);
extra[priv->new_SSID_size] = '\0';
dwrq->length = priv->new_SSID_size;
} else {
memcpy(extra, priv->SSID, priv->SSID_size);
extra[priv->SSID_size] = '\0';
dwrq->length = priv->SSID_size;
}

Expand Down
1 change: 0 additions & 1 deletion drivers/net/wireless/ray_cs.c
Original file line number Diff line number Diff line change
Expand Up @@ -1198,7 +1198,6 @@ static int ray_get_essid(struct net_device *dev,

/* Get the essid that was set */
memcpy(extra, local->sparm.b5.a_current_ess_id, IW_ESSID_MAX_SIZE);
extra[IW_ESSID_MAX_SIZE] = '\0';

/* Push it out ! */
dwrq->length = strlen(extra);
Expand Down

0 comments on commit 5307794

Please sign in to comment.