已关闭
【Bug】convolution_forward CheckDisContinuousStride 维度校验缺少 return,存在 vector 越界风险 #5705
zhoumin_创建于 22 天前关闭于 17 天前
22 天前 将 zhoumin_ 设为负责人
17 天前 关联了pull request:fix(conv): remove opInfo dependency in CheckDmaLimits and get dtypeSize from tensor; fix potential out-of-bounds in CheckDisContinuousStride
17 天前 关联了pull request:fix(conv): remove opInfo dependency in CheckDmaLimits and get dtypeSize from tensor; fix potential out-of-bounds in CheckDisContinuousStride
17 天前 issue状态由 进行中 改变为 已完成
17 天前 关闭了 issue
17 天前 添加了label:resolved
问题描述
conv/convolution_forward/op_host/op_api/convolution_util.cpp 中 CheckDisContinuousStride 函数:
if (dims > totalDims) { OP_LOGE(ACLNN_ERR_RUNTIME_ERROR, "Invalid dims"); } for (size_t i = 0; i < dims; i++) { if (viewStrides[i] != newStrides[i]) {修复方案
复现步骤
构造 viewStrides 维度数小于传入 dims 的输入(如广播/0维 view)触发该分支。