mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
nl80211: fix null-ptr dereference on invalid mesh configuration
If TX rates are specified during mesh join, the channel must
also be specified. Check the channel pointer to avoid a null
pointer dereference if it isn't.
Reported-by: Jouni Malinen <[email protected]>
Fixes: 8564e38206 ("cfg80211: add checks for beacon rate, extend to mesh")
Signed-off-by: Johannes Berg <[email protected]>
This commit is contained in:
parent
e785fa0a16
commit
265698d7e6
1 changed files with 3 additions and 0 deletions
|
|
@ -9987,6 +9987,9 @@ static int nl80211_join_mesh(struct sk_buff *skb, struct genl_info *info)
|
|||
if (err)
|
||||
return err;
|
||||
|
||||
if (!setup.chandef.chan)
|
||||
return -EINVAL;
|
||||
|
||||
err = validate_beacon_tx_rate(rdev, setup.chandef.chan->band,
|
||||
&setup.beacon_rate);
|
||||
if (err)
|
||||
|
|
|
|||
Loading…
Reference in a new issue