mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-25 14:13:01 -04:00
qcacmn: Trim operation classes to max supported in tdls_extract_params
Operation classes supported can be controlled by user, which can be sent greater than the max supported operations. This results in stack overflow in change station command for TDLS sta. Add check to validate operations supported param given by user and if it exceeds max supported value, set it to max supported value. Change-Id: Idd3a35e38b091546a17d7ec6329f19429e5c289c CRs-Fixed: 2361464
This commit is contained in:
parent
d22ed62ec8
commit
ad2b2af274
1 changed files with 7 additions and 0 deletions
|
|
@ -334,6 +334,13 @@ wlan_cfg80211_tdls_extract_params(struct tdls_update_peer_params *req_info,
|
|||
if (params->supported_channels_len)
|
||||
tdls_calc_channels_from_staparams(req_info, params);
|
||||
|
||||
if (params->supported_oper_classes_len > WLAN_MAX_SUPP_OPER_CLASSES) {
|
||||
cfg80211_debug("received oper classes:%d, resetting it to max supported: %d",
|
||||
params->supported_oper_classes_len,
|
||||
WLAN_MAX_SUPP_OPER_CLASSES);
|
||||
params->supported_oper_classes_len = WLAN_MAX_SUPP_OPER_CLASSES;
|
||||
}
|
||||
|
||||
qdf_mem_copy(req_info->supported_oper_classes,
|
||||
params->supported_oper_classes,
|
||||
params->supported_oper_classes_len);
|
||||
|
|
|
|||
Loading…
Reference in a new issue