CVE-2017-5601: libarchive out-of-bounds read in lha_read_file_header_1

CVE-2017-5601 · Severity: high · CVSS 7.5 · Published 2017-01-27

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.

Technologies: Libarchive. Vendors: Libarchive.

Quick answers

Is CVE-2017-5601 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2017-5601 being exploited in the wild.
How severe is CVE-2017-5601?
High severity, with a CVSS score of 7.5, published 27 January 2017.
Which products and versions are affected?
libarchive libarchive 3.2.2.
Is there a fix for CVE-2017-5601?
A patch was published on 2018-11-29: Debian LTS security update released Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2017-5601 attacked?
It is attacked over the network, in a software library.
Am I affected by CVE-2017-5601?
Check whether you run Libarchive. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

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

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.