GGML PoC: whisper.cpp stack OOB write via unbounded n_dims
This repo contains a tiny crafted legacy GGML-container model file (malicious.ggml.bin) designed to reach the weights parsing loop in whisper.cpp v1.4.2 and trigger a stack out-of-bounds write by setting n_dims = 5.
Relevant code (whisper.cpp v1.4.2):
whisper_model_load() weights loop uses int32_t ne[4] but writes ne[i] for i < n_dims.
Proof-of-concept file:
malicious.ggml.bin (92 bytes)
Expected behavior:
- On ASAN / hardened builds: immediate crash / stack-buffer-overflow report during model load.
Reference: