ソースを参照

qcacmn: Fix null pointer dereference in NAN event processing

In function extract_nan_event_rsp_tlv processing WMI_NAN_EVENTID,
fix a potential null pointer dereference of NAN event info data
structure.

Change-Id: I2180d3ce75d89a698d34c56d2abc7687a5fdd485
CRs-fixed: 2381237
Manikandan Mohan 6 年 前
コミット
3c572b3e19
1 ファイル変更4 行追加0 行削除
  1. 4 0
      wmi/src/wmi_unified_nan_tlv.c

+ 4 - 0
wmi/src/wmi_unified_nan_tlv.c

@@ -83,6 +83,10 @@ extract_nan_event_rsp_tlv(wmi_unified_t wmi_handle, void *evt_buf,
 	switch (nan_msg_hdr->msg_id) {
 	case NAN_MSG_ID_ENABLE_RSP:
 		nan_evt_info = event->event_info;
+		if (!nan_evt_info) {
+			WMI_LOGE(FL("Fail: NAN enable rsp event info Null"));
+			return QDF_STATUS_E_INVAL;
+		}
 		evt_params->evt_type = nan_event_id_enable_rsp;
 		evt_params->mac_id = nan_evt_info->mac_id;
 		evt_params->is_nan_enable_success = (nan_evt_info->status == 0);