-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Closed
Labels
core runtimeissues related to core runtimeissues related to core runtime
Description
Describe the issue
A crash occurs when creating an ONNX Runtime inference session with the ORT_ENABLE_BASIC graph optimization level. The issue causes a memory access violation (segmentation fault) during session initialization, resulting in the process exiting with code -1073741819 (0xC0000005). This crash is linked to improper handling of graph optimizations in ONNX Runtime. It may disrupt systems relying on ONNX for model inference, leading to potential denial of service. This vulnerability is triggered specifically by the use of the ORT_ENABLE_BASIC optimization level.
Callstack
Process finished with exit code -1073741819 (0xC0000005)
To reproduce
- Install ONNXRuntime using pip.
pip install onnxruntime==1.19.2
- Download the ONNX model via this link model:
Execute the following Python script:
import onnxruntime as rt
sess_options = rt.SessionOptions()
sess_options.graph_optimization_level = rt.GraphOptimizationLevel.ORT_ENABLE_BASIC # Only enabling the optimization can lead to this vulnerability
session = rt.InferenceSession("transpose_opt.onnx", sess_options) # crash here
### Urgency
_No response_
### Platform
Linux
### OS Version
Ubuntu 20.04
### ONNX Runtime Installation
Released Package
### ONNX Runtime Version or Commit ID
1.19.2
### ONNX Runtime API
Python
### Architecture
X64
### Execution Provider
Default CPU
### Execution Provider Library Version
_No response_
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
core runtimeissues related to core runtimeissues related to core runtime