mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-08 21:22:09 -04:00
qcacld-3.0: Check channel_count in DCC_GET_STATS command
Invalid channel_count may be sent to driver with QCA_NL80211_VENDOR_SUBCMD_DCC_GET_STATS vendor command, and may also pass the sanity check with get_stats_param->request_array_len as integer overflow, in send_dcc_get_stats_cmd_tlv(). Then it will finally lead to heap overflow when initializing TLV header for each channel. Change-Id: I1d81b5fc4de80829433f2a0ab41c964c41f750c3 CRs-Fixed: 2300516
This commit is contained in:
parent
8dae2e74ee
commit
ad80a20204
1 changed files with 6 additions and 0 deletions
|
|
@ -1655,6 +1655,12 @@ static int __wlan_hdd_cfg80211_dcc_get_stats(struct wiphy *wiphy,
|
|||
request_array = nla_data(
|
||||
tb[QCA_WLAN_VENDOR_ATTR_DCC_GET_STATS_REQUEST_ARRAY]);
|
||||
|
||||
/* Check channel count. Per 11p spec, max 2 channels allowed */
|
||||
if (!channel_count || channel_count > CFG_TGT_NUM_OCB_CHANNELS) {
|
||||
hdd_err("Invalid channel_count %d", channel_count);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
request = osif_request_alloc(¶ms);
|
||||
if (!request) {
|
||||
hdd_err("Request allocation failure");
|
||||
|
|
|
|||
Loading…
Reference in a new issue