| # CNTK v2 Integer Overflow PoC | |
| Proof-of-Concept demonstrating multiple integer overflow vulnerabilities in Microsoft CNTK v2 (Cognitive Toolkit) model loading. | |
| ## Vulnerabilities | |
| 1. **NDShape::TotalSize() Unsigned Integer Overflow** → Heap Buffer Overflow | |
| 2. **Signed Integer Overflow in ConvolveGeometry** → Undefined Behavior | |
| 3. **ONNX Import Path** → Same TotalSize() Overflow | |
| ## Files | |
| - `cntk-poc.cpp` — Standalone PoC demonstrating all three overflow vectors | |
| ## Build & Run | |
| ```bash | |
| clang++ -std=c++17 -fsanitize=undefined,address -O1 -o poc cntk-poc.cpp | |
| ./poc | |
| ``` | |
| ## Target | |
| - **Repository:** https://github.com/microsoft/CNTK | |
| - **Format:** CNTK v2 `.model` (protobuf-based) | |
| - **CVSS:** 7.8 (High) — AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H | |