GHSA-5qpq-xqfv-j9pg
CVE Information
In XZ Utils 5.8.3 and older, an invalid memory write can occur in decoders that are initialized using the following functions:
lzma_alone_decoder(decodes .lzma files)lzma_lzip_decoder(decodes .lz files)lzma_auto_decoder(when decoding .lzma or .lz files)lzma_microlzma_decoder(decodes MicroLZMA format)Required steps: 1. A
lzma_streamis initialized using one of the above functions. 2. A file is decoded at least partially. 3. The samelzma_streamis reinitialized using the same function. 4. Another file is decoded but memory allocation fails withLZMA_MEM_ERROR. (LZMA_MEMLIMIT_ERRORdoesn't cause this.) 5. The samelzma_streamis reinitialized again using the same function. 6. A file is decoded. It must specify the same dictionary size as the file in step 2.Decoders for the .xz format and raw streams aren't affected.
The issue has been fixed in XZ Utils 5.8.4 and in the Git repository branch v5.8. The fix is also in the Git repository branches v5.6, v5.4, and v5.2, but no new releases will be made from these old branches.
The bug was reported and discovered by Cantina using their AppSec agent, Apex.