ソースを参照

qcacld-3.0: Process DO_ACS vendor command only in SAP/P2P_GO mode

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: Id99ba126fcfa1f06f68b89d4627c029948a201c5
CRs-Fixed: 2237661
Hanumanth Reddy Pothula 6 年 前
コミット
89b0dce2fb
1 ファイル変更2 行追加1 行削除
  1. 2 1
      core/hdd/src/wlan_hdd_cfg80211.c

+ 2 - 1
core/hdd/src/wlan_hdd_cfg80211.c

@@ -2373,7 +2373,8 @@ static int __wlan_hdd_cfg80211_do_acs(struct wiphy *wiphy,
 	if (ret)
 		return ret;
 
-	if (adapter->device_mode != QDF_SAP_MODE) {
+	if (!((adapter->device_mode == QDF_SAP_MODE) ||
+	      (adapter->device_mode == QDF_P2P_GO_MODE))) {
 		hdd_err("Invalid device mode %d", adapter->device_mode);
 		return -EINVAL;
 	}