summaryrefslogtreecommitdiffstats
path: root/net/wireless/wext-compat.c
diff options
context:
space:
mode:
authorUjjal Roy <royujjal@gmail.com>2014-01-09 16:46:14 +0100
committerJohannes Berg <johannes.berg@intel.com>2014-01-09 17:05:28 +0100
commitf5aa0d21dd5ada040ff42b4d40357285e4ace441 (patch)
treec51ebb815d33aadf8f86df11ee8e1a42f3fb0abf /net/wireless/wext-compat.c
parentcfg80211: Add a function to get the number of supported channels (diff)
downloadlinux-f5aa0d21dd5ada040ff42b4d40357285e4ace441.tar.xz
linux-f5aa0d21dd5ada040ff42b4d40357285e4ace441.zip
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/wext-compat.c')
-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;