Skip to content

Commit f5aa0d2

Browse files
royujjaljmberg-intel
authored andcommitted
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>
1 parent bdfbec2 commit f5aa0d2

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎net/wireless/wext-compat.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@ static int cfg80211_wext_siwretry(struct net_device *dev,
370370
u8 oshort = wdev->wiphy->retry_short;
371371
int err;
372372

373-
if (retry->disabled ||
373+
if (retry->disabled || retry->value < 1 || retry->value > 255 ||
374374
(retry->flags & IW_RETRY_TYPE) != IW_RETRY_LIMIT)
375375
return -EINVAL;
376376

0 commit comments

Comments
 (0)