qcacld-3.0: Fix possible OOB in wma_unified_radio_tx_mem_free()
In wma_unified_radio_tx_mem_free() function, results buffer array may be dereferenced with large index value, that may result OOB memory access. Fix the same by correcting incrementing pointer to results buffer. Change-Id: I57a26dba9db32758c7d7fd51b99d3364a8020a9d CRs-Fixed: 2308644
This commit is contained in:
@@ -1411,7 +1411,6 @@ int wma_unified_radio_tx_mem_free(void *handle)
|
||||
rs_results = (tSirWifiRadioStat *)
|
||||
&wma_handle->link_stats_results->results[0];
|
||||
for (i = 0; i < wma_handle->link_stats_results->num_radio; i++) {
|
||||
rs_results += i;
|
||||
if (rs_results->tx_time_per_power_level) {
|
||||
qdf_mem_free(rs_results->tx_time_per_power_level);
|
||||
rs_results->tx_time_per_power_level = NULL;
|
||||
@@ -1421,6 +1420,7 @@ int wma_unified_radio_tx_mem_free(void *handle)
|
||||
qdf_mem_free(rs_results->channels);
|
||||
rs_results->channels = NULL;
|
||||
}
|
||||
rs_results++;
|
||||
}
|
||||
|
||||
qdf_mem_free(wma_handle->link_stats_results);
|
||||
|
Reference in New Issue
Block a user