Enviar #1050817: antirez gguf-tools master Out-of-bounds readinformación

Títuloantirez gguf-tools master Out-of-bounds read
Descripcióngguf-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.
Fuente⚠️ https://github.com/antirez/gguf-tools/pull/33
Usuario
 m00dy (UID 97162)
Sumisión2026-10-21 23:12 (hace 30 días)
Moderación2026-11-20 08:08 (29 days later)
EstadoAceptado
Entrada de VulDB441163 [antirez gguf-tools hasta fdfafbed766db0a1e9019b07994cd88f133d1aab GGUF Parser gguflib.c gguf_get_tensor offset/alignment divulgación de información]
Puntos20

Are you interested in using VulDB?

Download the whitepaper to learn more about our service!