Executive brief
A vulnerability in libarchive, a widely used library for reading and writing various archive formats, could allow an attacker to crash applications that process compressed files. By providing a specially crafted LHA archive, an attacker can trigger a memory error that leads to a denial-of-service. This affects any software relying on libarchive to handle file extractions, potentially disrupting automated workflows or server operations.
Technical details
An out-of-bounds read vulnerability exists in the lha_read_file_header_1() function within archive_read_support_format_lha.c of libarchive 3.2.2. The issue stems from improper validation of the compressed size (compsize) field in LHA headers; specifically, the code fails to account for cases where the calculated compressed size becomes negative after subtracting extended header sizes. An attacker can exploit this by providing a malformed LHA archive, leading to an out-of-bounds memory access and a subsequent heap buffer overflow or crash. A patch was released to ensure the compressed size is validated as non-negative before proceeding.
Affected products
- libarchive libarchive 3.2.2
Timeline
- 2017-01-27: advisory: NVD publication date
- 2017-01-27: disclosed: Initial public disclosure
- 2018-11-29: patched: Debian LTS security update released