{"id":"UBUNTU-CVE-2026-43629","details":"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.","modified":"2026-08-13T00:06:43Z","published":"2026-08-06T22:17:00Z","upstream":["CVE-2026-43629"],"references":[{"type":"REPORT","url":"https://ubuntu.com/security/CVE-2026-43629"},{"type":"REPORT","url":"https://www.cve.org/CVERecord?id=CVE-2026-43629"},{"type":"REPORT","url":"https://github.com/Vladimir-tokarev-cyera/llama-cpp-security-patches"}],"affected":[{"package":{"name":"llama.cpp","ecosystem":"Ubuntu:26.04:LTS","purl":"pkg:deb/ubuntu/llama.cpp?arch=source&distro=resolute"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["5882+dfsg-2","8064+dfsg-1ubuntu1","8681+dfsg-1"],"ecosystem_specific":{"binaries":[{"binary_version":"8681+dfsg-1","binary_name":"libllama0"},{"binary_name":"llama.cpp","binary_version":"8681+dfsg-1"},{"binary_version":"8681+dfsg-1","binary_name":"llama.cpp-examples"},{"binary_version":"8681+dfsg-1","binary_name":"llama.cpp-tests"},{"binary_name":"llama.cpp-tools","binary_version":"8681+dfsg-1"},{"binary_name":"llama.cpp-tools-extra","binary_version":"8681+dfsg-1"},{"binary_name":"python3-gguf","binary_version":"8681+dfsg-1"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-43629.json"}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H"},{"type":"CVSS_V4","score":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N"},{"type":"Ubuntu","score":"medium"}]}