Oneflow-Inc / oneflow

OneFlow is a deep learning framework designed to be user-friendly, scalable and efficient.
http://www.oneflow.org
Apache License 2.0
5.87k stars 667 forks source link

Aborted (core dumped) in flow.QatConv3d #10510

Open x0w3n opened 5 months ago

x0w3n commented 5 months ago

Summary

When I pass a negative value to the flow.QatConv3d 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.QatConv3d(-16, 33, 3, stride=2, quantization_formula="google", quantization_bit=8, quantization_scheme="symmetric")
output = m(input)

image

System Information