65-byte Malicious File Crashes llama.cpp: Open-source Library 'modelvet' Hardens Model Parsing
tetsuoai · x · 2026-08-04
A developer released modelvet (pip install modelvet), a standalone C11 library that verifies the structural safety of GGUF or safetensors files before a loader touches the bytes.
- Vulnerability Reproduction: A mere 65-byte malformed GGUF file triggers a divide-by-zero exception (SIGFPE) and crashes the real llama.cpp loader on x86-64. modelvet successfully rejects the same malicious input.
- Widespread Risks: The author notes that llama.cpp, ollama, and MLX all ship similar integer overflow flaws. Even after previous CVE patches fixed single additions, the combined totals can still bypass validations.
- Defensive Design: modelvet is paranoid by construction: no malloc, no recursion. Every integer derived from file bytes goes through checked arithmetic, and loop bounds are capped by named compile-time constants. It passes strict CI tests (ASan, UBSan, etc.) and perfectly handles a corpus of 18 historical CVE samples.
More from Infra
- Runware launches modular AI inference pods with 10x lower cost — aziz4ai · 2026-08-04
- Running DeepSeek-V4 1M Context on a Single RTX 5090 with vLLM — BlackBeardAI · 2026-08-04
- MiniMax H3 Acceleration Benchmark: TE-Speed Delivers up to 1.785x Speedup — Commercial_Board9219 · 2026-08-04
- Cloudflare Launches CI SDK with AI Self-Healing Code Fixes — dinasaur_404 · 2026-08-04
- Gavin Baker Reveals SSI to Launch Model in August, Discusses AI Infra & GPU Prices — zephyr_z9 · 2026-08-04
- AI Trade Enters Stock-Picker Phase as Compute Supply Defies Narrative — tengyanAI · 2026-08-04