llama.cpp
8ae38670 - ggml: fix OOB write in ggml_acc with negative offset (#30135)

Commit
48 days ago
ggml: fix OOB write in ggml_acc with negative offset (#30135) ggml_acc_impl narrowed a size_t offset to int32_t without checking that it fits, so a large offset could truncate to a negative int32_t. The forward then sign-extended it to a huge size_t and the bounds assertion wrapped, allowing an OOB write below the dst buffer. Check the offset before the narrowing, matching the existing check in ggml_set_impl.
Author
Parents
Loading