• Bug#1109124: llama.cpp: CVE-2025-53630

    From Christian Kastner@21:1/5 to Salvatore Bonaccorso on Sat Jul 12 00:10:01 2025
    On 2025-07-11 21:19, Salvatore Bonaccorso wrote:
    The following vulnerability was published for llama.cpp.

    CVE-2025-53630[0]:
    | llama.cpp is an inference of several LLM models in C/C++. Integer
    | Overflow in the gguf_init_from_file_impl function in
    | ggml/src/gguf.cpp can lead to Heap Out-of-Bounds Read/Write.

    This is a bit of an interesting situation as the fix went into the ggml embedded into llama.cpp, but it hasn't been synced up to main ggml yet.
    And because there is also an ABI break, the newest llama.cpp doesn't
    build with the old ggml.

    I'll ask upstream for a sync, and to automatically do so in future if a
    CVE gets reported.

    Nevertheless, I really need to figure out a better way to deal with
    llama.cpp, whisper.cpp, and ggml triad. Re-embedding isn't an option as
    the ggml build is already pretty complicated by itself, adding another
    layer would be a pain.

    Best,
    Christian

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Christian Kastner@21:1/5 to Salvatore Bonaccorso on Sun Jul 13 08:50:01 2025
    Hi Salvatore,

    On 2025-07-13 07:49, Salvatore Bonaccorso wrote:
    On Sat, Jul 12, 2025 at 12:04:34AM +0200, Christian Kastner wrote:
    Nevertheless, I really need to figure out a better way to deal with
    llama.cpp, whisper.cpp, and ggml triad. Re-embedding isn't an option as
    the ggml build is already pretty complicated by itself, adding another
    layer would be a pain.

    Thanks. The gguf.cpp as emmbedded in llama.cpp is compiled and used,
    is that correct? Do we use the external ggml in the system?

    That's how llama.cpp is primarily developed distributed, but for Debian
    we ignore the embedded version and build a standalone src:ggml.

    This is mainly because the ggml build is already quite complex (multiple
    CPU and GPU backends), and redundant between llama.cpp and whisper.cpp
    (still in NEW).

    llama.cpp and whisper.cpp should eventually +ds clean their embedded
    copies, I just want to wait a bit more to see if a standalone src:ggml
    remains viable.

    Best,
    Christian

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)