Open
Description
Summary
When I pass a negative value to the flow.QatConv2d parameter, it crashes. and tries to allocate a huge memory size. We believe this is a very serious bug that tries to allocate a large amount of memory and could lead to a memory overflow vulnerability.
Code to reproduce bug
import oneflow as flow
import numpy as np
arr = np.random.randn(20, 16, 50)
input = flow.Tensor(arr)
m = flow.nn.QatConv2d(-16, 33, 3, stride=2, quantization_formula="google", quantization_bit=8, quantization_scheme="symmetric")
output = m(input)
System Information
- What is your OneFlow installation (pip, source, dockerhub): source
- OS: Ubuntu 22.04.3 LTS
- OneFlow version (run
python3 -m oneflow --doctor
):
path: ['*/temp/oneflow-1.0.0/python/oneflow']
version: 0.9.1+cpu.git.f97cd07
git_commit: f97cd07
cmake_build_type: Release
rdma: False
mlir: False
- Python version: 3.10.0
- CUDA driver version: 12.2
- GPU models: NVIDIA GeForce RTX 3090
- Other info: None