Memory Management Flaw in LLaMA-Android JNI Wrapper Affects llama.cpp Builds
CVE-2026-43622
8.5HIGH
What is CVE-2026-43622?
A memory management issue exists in llama.cpp builds b1886 to b7445 involving the LLaMA-Android JNI wrapper. This flaw occurs when the function new_1batch() utilizes malloc() for memory allocation while free_1batch() applies the C++ delete operator for deallocation, leading to potential heap metadata corruption. Exploitation of this vulnerability can result in denial of service characterized by unexpected process crashes, and under certain conditions, attackers may gain the capability for arbitrary code execution by manipulating the allocator's state.
Affected Version(s)
llama.cpp b1886
llama.cpp 0.9.0 <= 0.17.1
llama.cpp 5c0d18881e0e9794c96b2602736b758bac9d9388
References
CVSS V4
Score:
8.5
Severity:
HIGH
Confidentiality:
High
Integrity:
High
Availability:
High
Attack Vector:
Local
Attack Complexity:
Low
Attack Required:
None
Privileges Required:
Undefined
User Interaction:
Unknown
Timeline
Vulnerability published
Vulnerability Reserved
Credit
Vladimir Tokarev (@G1ND1L4) - Vulnerability Research Tech Lead, Cyera
Ofek Itach (@ofekitach) - Security Research Team Lead, Cyera
