Invia #1050817: antirez gguf-tools master Out-of-bounds readinformazioni

Titoloantirez gguf-tools master Out-of-bounds read
Descrizionegguf-tools' gguflib.c GGUF parsing library (also vendored by ml-explore/mlx in mlx/io/gguf.cpp and other downstream consumers) does not validate file-controlled tensor offsets or alignment values before using them. In gguf_get_tensor (gguflib.c), the parser computes a tensor data pointer directly from an unchecked file-controlled 64-bit offset: tensor->offset = ctx->data_off + *offset; tensor->weights_data = ctx->data + tensor->offset; with no bound check against the mapped file size ctx->size. A crafted .gguf file with an out-of-range tensor offset yields a non-NULL out-of-range pointer that consumers dereference (for example, gguf-tools tensor inspection or mx.load in Apple's MLX, which null-checks weights_data after CVE-2025-62609 but does not bound it against the mapping before calling memcpy), resulting in an out-of-bounds read and segmentation fault. In addition, gguf_get_alignment_padding (gguflib.c:217-218) computes (alignment - (offset % alignment)) % alignment from the file's general.alignment metadata key without checking for alignment == 0. Re-validated live on gguf-tools master and ml-explore/mlx HEAD via an AddressSanitizer control-vs-crafted reproduction. Fix PR https://github.com/antirez/gguf-tools/pull/33 bounds tensor->offset and bsize against ctx->size.
Fonte⚠️ https://github.com/antirez/gguf-tools/pull/33
Utente
 m00dy (UID 97162)
Sottomissione21/10/2026 23:12 (30 giorni fa)
Moderazione20/11/2026 08:08 (29 days later)
StatoAccettato
Voce VulDB441163 [antirez gguf-tools fino a fdfafbed766db0a1e9019b07994cd88f133d1aab GGUF Parser gguflib.c gguf_get_tensor offset/alignment rivelazione di informazioni]
Punti20

Do you know our Splunk app?

Download it now for free!