AISpot

llama.cpp 修復特殊 token 轉義導致的 server 崩潰

llama.cpp releases版本更新開源地端推論開發工具政策與安全

llama.cpp 修復了 llama-server 在轉義特殊 token 時會被單個請求打崩的棧溢位問題。此前 d1-omni 與 kev 兩個 prompt 用 std::regex_replace 處理請求文字里的 "<|name|>",libstdc++ 會按名字的每個字元遞迴,輸入 "<|" 加 30000 個字母即可撐爆 HTTP 執行緒棧,程序以 SIGSEGV 退出。

官方修復了可被單個請求觸發的 SIGSEGV:3 萬個字母的輸入就能讓 llama-server 崩潰,自建本地推理服務的部署者應儘快升級到 b11608。

原標題:b11608
閱讀原文

評分48 / 58(平均 53,門檻 60)
狀態未入選

原文

server : escape the special tokens without std::regex ( #30243 ) The d1-omni and kev prompts escape "<|name|>" in the request text with std::regex_replace. libstdc++ recurses for each char of the name, so a state of "<|" and 30000 letters overflows the stack of the HTTP thread and llama-server dies with SIGSEGV. server_decision_escape_special_tokens() writes the same text with a loop. test-server-component compares it with the regex on every string of up to 6 chars of "<|>a-". Website: https://llama.app Attestations: https://github.com/ggml-org/llama.cpp/attestations/55643841 macOS/iOS: macOS Apple Silicon (arm64) macOS Apple Silicon (arm64, KleidiAI enabled) DISABLED macOS Intel (x64) iOS XCFramework Linux: Ubuntu x64 (CPU) Ubuntu arm64 (CPU) Ubuntu s390x (CPU) Ubuntu x64 (Vulkan) Ubuntu arm64 (Vulkan) Ubuntu x64 (CUDA 12) - CUDA 12.8 libraries Ubuntu x64 (CUDA 13) - CUDA 13.4 libraries Ubuntu arm64 (CUDA 13) - CUDA 13.4 libraries Ubuntu x64 (ROCm 10.0) Ubuntu x64 (OpenVINO) Ubuntu x64 (SYCL FP32) Ubuntu x64 (SYCL FP16) Linux arm64 (Snapdragon: CPU, Adreno GPU, Hexagon NPU) - setup guide Android: Android arm64 (CPU) Android arm64 (Snapdragon: CPU, Adreno GPU, Hexagon NPU) - setup guide Windows: Windows x64 (CPU) Windows arm64 (CPU) Windows arm64 (OpenCL Adreno) Windows x64 (CUDA 12) - CUDA 12.4 DLLs Windows x64 (CUDA 13) - CUDA 13.4 DLLs Windows arm64 (CUDA 13) - CUDA 13.4 DLLs Windows x64 (Vulkan) Windows arm64 (Vulkan) Windows x64 (OpenVINO) Windows x64 (SYCL) Windows x64 (ROCm 10.0) openEuler: DISABLED openEuler x86 (310p) openEuler x86 (910b, ACL Graph) openEuler aarch64 (310p) openEuler aarch64 (910b, ACL Graph) UI: UI

相關報導

llama.cpp releasesAI 評分20

llama.cpp 修復 server 因 n_batch 超限導致的 abort

llama.cpp 合併 PR #29903,通過將 n_batch 限制為不超過 n_ubatch 來修復 server 崩潰問題,對應 issue #29902。該修復由 Claude 輔助完成,並移除了相關測試與 embeddings 條件。新版本已覆蓋 macOS、Linux、Windows、Android 等平台,包括 Apple Silicon、CUDA、ROCm、Vulkan 等後端。

llama.cpp releasesAI 評分45

llama.cpp server 拒絕部分媒體截斷

llama.cpp 發布 b11415,其 server 端現在會拒絕部分媒體截斷(partial media truncation)的請求。此次提交只保留 keep_first 修復,去掉了 mtmd 測試輔助改動——clip_image_f32_batch 改為按值儲存條目後該改動已無法編譯;同時刪除視覺測試,因為沒有測試夾具能在複用快取的情況下切到兩個相鄰媒體塊之間,該測試與修復本身無關。

llama.cpp releasesAI 評分18

llama.cpp 修復 Windows 下 mtmd 的 strdup 棄用警告

llama.cpp 合併提交 #29863,修復 mtmd 在 Windows 上使用已棄用 strdup 函式產生的編譯警告,由 Hugging Face 的 Adrien Gallouët 提交。該提交隨新版本發布,覆蓋 macOS、Linux、Windows、Android 及 openEuler 等多個平台建置,其中 macOS Apple Silicon 的 KleidiAI 啟用版與 openEuler 部分建置被標記為 DISABLED。