aboutsummaryrefslogtreecommitdiff
path: root/net/wireless
diff options
context:
space:
mode:
authorUjjal Roy2014-01-09 21:16:14 +0530
committerJohannes Berg2014-01-09 17:05:28 +0100
commitf5aa0d21dd5ada040ff42b4d40357285e4ace441 (patch)
treec51ebb815d33aadf8f86df11ee8e1a42f3fb0abf /net/wireless
parentbdfbec2d2d240e9c528caae9c743801629b60166 (diff)
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. Signed-off-by: Ujjal Roy <royujjal@gmail.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/wireless')
-rw-r--r--net/wireless/wext-compat.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/wireless/wext-compat.c b/net/wireless/wext-compat.c
index 051d961d4e28..5661a54ac7ee 100644
--- a/net/wireless/wext-compat.c
+++ b/net/wireless/wext-compat.c
@@ -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;