qcacmn: user_id check while accessing ppdu_info->rx_msdu_info

Add max user_id check while accessing ppdu_info->rx_msdu_info[]
to avoid out of bound array access

Change-Id: Ifcc298d1fd8bd00db5eb2d1777a7ff5af894afe6
CRs-fixed: 2477005
Esse commit está contido em:
Chaithanya Garrepalli
2019-06-27 14:35:48 +05:30
commit de Gerrit - the friendly Code Review server
commit 08b2c7a134

Ver arquivo

@@ -1281,8 +1281,10 @@ hal_rx_status_get_tlv_info_generic(void *rx_tlv_hdr, void *ppduinfo,
FCS_ERR);
return HAL_TLV_STATUS_MPDU_END;
case WIFIRX_MSDU_END_E:
ppdu_info->rx_msdu_info[user_id].cce_metadata =
HAL_RX_MSDU_END_CCE_METADATA_GET(rx_tlv);
if (user_id < HAL_MAX_UL_MU_USERS) {
ppdu_info->rx_msdu_info[user_id].cce_metadata =
HAL_RX_MSDU_END_CCE_METADATA_GET(rx_tlv);
}
return HAL_TLV_STATUS_MSDU_END;
case 0:
return HAL_TLV_STATUS_PPDU_DONE;