UAF问题:在673行对asr_handle内存进行释放(HAL_Free),在674行又对asr_handle进行调用,造成Memory Use After Free安全问题。
void *IOT_Asr_Init(const char *product_id, const char *device_name, void *pTemplate_client, OnAsrFileManageEventUsrCallback usr_cb)
{
...
exit:
if (rc != QCLOUD_RET_SUCCESS) {
if (asr_handle) {
HAL_Free(asr_handle); //!!! asr_handle memory is released
if (asr_handle->file_manage_handle) { //!!! Use of memory asr_handle after it is freed
IOT_FileManage_Destroy(asr_handle->file_manage_handle);
}
if (asr_handle->mutex) {
HAL_MutexDestroy(asr_handle->mutex);
}
if (asr_handle->asr_req_list) {
list_destroy(asr_handle->asr_req_list);
}
}
asr_handle = NULL;
}
return asr_handle;
}
UAF问题:在第295行已经释放了version内存,然而在299行又调用了action_value内存,此时释放后的action_value内存值是不确定的,会出现非预期行为,存在Use After Free安全问题。
UAF问题:在673行对asr_handle内存进行释放(HAL_Free),在674行又对asr_handle进行调用,造成Memory Use After Free安全问题。