In XZ Utils 5.8.2 and older, if lzma_index_decoder() was used to decode an Index that contained no Records, the resulting lzma_index was left in a state where where a subsequent lzma_index_append() would allocate too little memory, and a buffer overflow would occur (CVE-2026-34743).
The lzma_index functions are rarely used by applications directly. In the few applications that do use these functions, the combination of function calls required to trigger this bug are unlikely to exist, because there typically is no reason to append Records to a decoded lzma_index. Thus, it’s likely that this bug cannot be triggered in any real-world application.
The bug was fixed in XZ Utils 5.8.3.
The fix is also in the Git repository branches
master, v5.8, v5.6, v5.4, and v5.2.
Credits
The bug was reported and discovered by Cantina using their AppSec agent, Apex.
Thanks to Sam James for general help.