qcacld-2.0: Process DO_ACS vendor command only in SAP/P2P_GO mode
propagation from qcacld-3.0 to qcacld-2.0 While processing DO_ACS vendor command session context, which is of type union holds either station's or SAP's session, is updated without checking adapter's mode. This may lead to corrupt station's session context if DO_ACS is invoked with station adapter. Validate adapter mode and process DO_ACS vendor commands only if the mode is SAP/P2P_GO Change-Id: Id882acd5514274a092807995f8eb58c4b5ff7fee CRs-Fixed: 2295622 Bug: 73173201 Signed-off-by: Andrew LeCain <alecain@google.com>
This commit is contained in:
parent
0e4954aaa5
commit
18c1357aff
|
@ -7830,6 +7830,14 @@ static int __wlan_hdd_cfg80211_do_acs(struct wiphy *wiphy,
|
|||
hddLog(LOGE, FL("HDD context is not valid"));
|
||||
return status;
|
||||
}
|
||||
|
||||
if (!((adapter->device_mode == WLAN_HDD_SOFTAP) ||
|
||||
(adapter->device_mode == WLAN_HDD_P2P_GO))) {
|
||||
hddLog(VOS_TRACE_LEVEL_ERROR, FL("Invalid device mode %d"),
|
||||
adapter->device_mode);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
sap_config = &adapter->sessionCtx.ap.sapConfig;
|
||||
vos_mem_zero(&sap_config->acs_cfg, sizeof(struct sap_acs_cfg));
|
||||
|
||||
|
|
Loading…
Reference in New Issue