mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 11:26:02 +09:00
nl80211: fix null-ptr dereference on invalid mesh configuration
commit265698d7e6upstream. 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 <j@w1.fi> Fixes:8564e38206("cfg80211: add checks for beacon rate, extend to mesh") Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Amit Pundir <amit.pundir@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
07a6134db0
commit
4fa029fc35
@@ -9481,6 +9481,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)
|
||||
|
||||
Reference in New Issue
Block a user