| Version | Supported |
|---|---|
| 1.0.x | ✅ |
CastForge is designed to safely process untrusted model artifacts (.mlir, .safetensors,
.gguf, .onnx.json, and .json):
- Checked Dimension & Byte-Offset Arithmetic: Tensor element counts and byte offsets are
validated using checked integer arithmetic (
checked_mul/checked_add) with a hard cap ofTensorType::MAX_TENSOR_ELEMENTS(1,000,000,000elements) and a 100 MiB header limit on.safetensorsmetadata. - Bounded Region Recursion Depth: The MLIR parser enforces
MAX_REGION_NESTING_DEPTH(64) to prevent call-stack exhaustion on deeply nested regions. - Panic-Safe C FFI Boundary: All
extern "C"entry points insrc/ffi.rswrap execution instd::panic::catch_unwindto guarantee that panics never cross FFI boundaries.
If you discover a security vulnerability (such as an out-of-bounds read, integer overflow, or unbounded allocation triggered by malformed input), please report it privately via GitHub Security Advisories on the repository rather than opening a public issue.