Back to feed

b8908

Apr 23, 2026
Meta/llama.cppCLIvb8908

server: fix heap-buffer-overflow from negative n_discard (CVE-2026-21869) (#22267)

  • server: clamp n_discard to non-negative at JSON parse boundary (CVE-2026-21869)

A negative n_discard from client JSON causes heap-buffer-overflow in update_slots() context-shift loop (CWE-787, CVSS 8.8). Clamp to 0 at ingress; n_discard=0 already triggers auto-discard (n_left/2).

Ref: GHSA-8947-pfff-2f3c

  • cont : cleaner

  • cont : cleanerer

  • cont : cleanest


Co-authored-by: Georgi Gerganov ggerganov@gmail.com

macOS/iOS:

Linux:

Android:

Windows:

openEuler: