qcacmn: Add user id range check to prevent out of range access

A random crash may be caused by out of range access. Add MU
user id check to prevent out of range access.

Change-Id: I531d6c03024c4a6af4e0db97ea00d0874aaef387
Este commit está contenido en:
Kai Chen
2019-06-07 13:10:49 -07:00
cometido por nshrivas
padre 034a01be32
commit e0dd94dd4c
Se han modificado 2 ficheros con 12 adiciones y 10 borrados

Ver fichero

@@ -71,7 +71,7 @@
#define HAL_TLV_STATUS_MSDU_START 7
#define HAL_TLV_STATUS_MSDU_END 8
#define HAL_MAX_UL_MU_USERS 8
#define HAL_MAX_UL_MU_USERS 37
#define HAL_RX_PKT_TYPE_11A 0
#define HAL_RX_PKT_TYPE_11B 1

Ver fichero

@@ -449,17 +449,19 @@ hal_rx_status_get_tlv_info_generic(void *rx_tlv_hdr, void *ppduinfo,
default:
break;
}
if (user_id < HAL_MAX_UL_MU_USERS) {
mon_rx_user_status =
&ppdu_info->rx_user_status[user_id];
mon_rx_user_status = &ppdu_info->rx_user_status[user_id];
mon_rx_user_status->mcs =
HAL_RX_GET(rx_tlv, RX_PPDU_END_USER_STATS_1,
MCS);
mon_rx_user_status->nss =
HAL_RX_GET(rx_tlv, RX_PPDU_END_USER_STATS_1,
NSS);
mon_rx_user_status->mcs =
HAL_RX_GET(rx_tlv, RX_PPDU_END_USER_STATS_1,
MCS);
mon_rx_user_status->nss =
HAL_RX_GET(rx_tlv, RX_PPDU_END_USER_STATS_1,
NSS);
hal_rx_handle_ofdma_info(rx_tlv, mon_rx_user_status);
hal_rx_handle_ofdma_info(rx_tlv, mon_rx_user_status);
}
ppdu_info->com_info.mpdu_cnt_fcs_ok =
HAL_RX_GET(rx_tlv, RX_PPDU_END_USER_STATS_3,