Skip to contentSkip to conversation

cfg80211: add sanity check for retry limit in wext-compat

PATCH In review Ujjal Roy 2 participants 3 messages Jan 9, 2014 – Jan 21, 2014 802.11 (including cfg80211/NL80211)

lore
Share & tools
lore

Ujjal Roy

author
#0 lore raw

PATCH 1/1 cfg80211: add sanity check for retry limit in wext-compat

Block setting the wrong values through iwconfig retry command. Add sanity checking before sending the retry limit to the driver.

---
 net/wireless/wext-compat.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/wireless/wext-compat.c +1 -1
index 051d961..5661a54 100644
@@ -370,7 +370,7 @@ static int cfg80211_wext_siwretry(struct net_device *dev,
 	u8 oshort = wdev->wiphy->retry_short;
 	int err;
 
-	if (retry->disabled ||
+	if (retry->disabled || retry->value < 1 || retry->value > 255 ||
 	    (retry->flags & IW_RETRY_TYPE) != IW_RETRY_LIMIT)
 		return -EINVAL;
 
Signature · 1 line
1.8.1.4
maintainer
#1 lore raw
Quoted 3 lines · Ujjal Roy

Block setting the wrong values through iwconfig retry command. Add sanity checking before sending the retry limit to the driver.

Sure, applied. You'd probably be better off just turning off wext though :)

johannes

author
#2 lore raw
Quoted 3 lines · Johannes Berg

Sure, applied. You'd probably be better off just turning off wext though :)

Sorry!