Bug 2514726

Summary: CVE-2026-43629 goose: llama.cpp: Arbitrary code execution via crafted KV cache state files [fedora-all]
Product: [Fedora] Fedora Reporter: Joel Chamberlain <jochambe>
Component: gooseAssignee: RHEL Lightspeed Maint <rhel-lightspeed>
Status: CLOSED NOTABUG QA Contact:
Severity: high Docs Contact:
Priority: high    
Version: rawhideCC: rhel-lightspeed, rodolfo.olivieri3, rolivier, rust-sig
Target Milestone: ---Keywords: Security, SecurityTracking
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: {"flaws": ["56fea2ec-fc57-4d76-b7d2-d1d158d1d091"]}
Fixed In Version: Doc Type: ---
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2026-09-02 17:40:20 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 2512255    

Description Joel Chamberlain 2026-08-12 14:49:39 UTC
Disclaimer: Community trackers are created by Red Hat Product Security team on a best effort basis. Package maintainers are required to ascertain if the flaw indeed affects their package, before starting the update process.

llama.cpp builds b4882 through b9058 contain a heap buffer overflow vulnerability in the KV cache state restore path where the state_read_data() function computes write size without overflow checking, allowing attackers with write access to the slot_save_path directory to corrupt heap memory. Attackers can craft malicious state files where cell_count multiplication overflows or exceeds tensor buffer allocation to write attacker-controlled bytes past buffer boundaries, potentially resulting in heap metadata corruption, model weight corruption, or arbitrary code execution via function pointer overwrite.

Comment 1 Rodolfo Olivieri 2026-09-02 17:40:20 UTC
llama.cpp is not being used in any goose builds, especially because it is extremely difficult to build. 


rolivier@rolivier-thinkpadp16vgen1 ~> rpm -qi goose
Name        : goose
Version     : 1.38.0
Release     : 1.fc44
Architecture: x86_64
Install Date: Tue 07 Jul 2026 08:21:02 AM -03
Group       : Unspecified
Size        : 208861309
License     : (0BSD OR Apache-2.0 OR MIT) AND Apache-2.0 AND (Apache-2.0 AND ISC) AND (Apache-2.0 OR Apache-2.0 WITH LLVM-exception OR CC0-1.0) AND (Apache-2.0 OR Apache-2.0 WITH LLVM-exception OR MIT) AND (Apache-2.0 OR BSD-1-Clause OR MIT) AND (Apache-2.0 OR BSD-2-Clause OR MIT) AND (Apache-2.0 OR BSD-3-Clause) AND (Apache-2.0 OR BSL-1.0) AND (Apache-2.0 OR CC0-1.0 OR MIT-0) AND (Apache-2.0 OR LGPL-2.1-or-later OR MIT) AND (Apache-2.0 OR MIT) AND (Apache-2.0 OR MIT OR Zlib) AND BSD-2-Clause AND BSD-3-Clause AND (BSD-3-Clause AND MIT) AND (BSD-3-Clause OR MIT) AND BSL-1.0 AND ISC AND LGPL-3.0-or-later AND MIT AND (MIT OR Unlicense) AND MIT-0 AND MPL-2.0 AND Unicode-3.0 AND Zlib AND bzip2-1.0.6
Signature   :
              RSA/SHA256, Fri 03 Jul 2026 04:26:14 PM -03, Key ID dbfcf71c6d9f90a6
Source RPM  : goose-1.38.0-1.fc44.src.rpm
Build Date  : Fri 03 Jul 2026 10:49:10 AM -03
Build Host  : buildvm-x86-10.rdu3.fedoraproject.org
Packager    : Fedora Project
Vendor      : Fedora Project
URL         : https://github.com/block/goose
Bug URL     : https://bugz.fedoraproject.org/goose
Summary     : Extensible AI agent client
Description :
Goose is your on-machine AI agent, capable of automating complex development
tasks from start to finish. More than just code suggestions, goose can build
entire projects from scratch, write and execute code, debug failures,
orchestrate workflows, and interact with external APIs - autonomously.

Whether you're prototyping an idea, refining existing code, or managing
intricate engineering pipelines, goose adapts to your workflow and executes
tasks with precision.

Designed for maximum flexibility, goose works with any LLM and supports
multi-model configuration to optimize performance and cost, seamlessly
integrates with MCP servers, and is available as both a desktop app as well as
CLI - making it the ultimate AI assistant for developers who want to move
faster and focus on innovation.

rolivier@rolivier-thinkpadp16vgen1 ~> strings /usr/bin/goose | grep llama.cpp

,'. Expected one of: ollama, local, llama.cpp
  "description": "Local proxy that hot-swaps llama.cpp (and other) inference backends on demand via an OpenAI-compatible API.",