Gửi #1050817: antirez gguf-tools master Out-of-bounds readthông tin

tiêu đềantirez gguf-tools master Out-of-bounds read
Mô tảgguf-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.
Nguồn⚠️ https://github.com/antirez/gguf-tools/pull/33
Người dùng
 m00dy (UID 97162)
Đệ trình21/10/2026 23:12 (cách đây 1 tháng)
Kiểm duyệt20/11/2026 08:08 (29 days later)
Trạng tháiđược chấp nhận
Mục VulDB441163 [antirez gguf-tools đến fdfafbed766db0a1e9019b07994cd88f133d1aab GGUF Parser gguflib.c gguf_get_tensor offset/alignment tiết lộ thông tin]
điểm20

Do you need the next level of professionalism?

Upgrade your account now!