提出 #1050817: antirez gguf-tools master Out-of-bounds read情報

タイトルantirez gguf-tools master Out-of-bounds read
説明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.
ソース⚠️ https://github.com/antirez/gguf-tools/pull/33
ユーザー
 m00dy (UID 97162)
送信2026年10月21日 23:12 (30 日 ago)
モデレーション2026年11月20日 08:08 (29 days later)
ステータス承諾済み
VulDBエントリ441163 [antirez gguf-tools 迄 fdfafbed766db0a1e9019b07994cd88f133d1aab GGUF Parser gguflib.c gguf_get_tensor offset/alignment 情報漏えい]
ポイント20

Do you need the next level of professionalism?

Upgrade your account now!