REDHAT-BUG-2532805: Buffer Overflow
libarchive 3.8.x before 3.8.2 has a strcpy heap-based buffer overflow in the gzip writer via the original-filename field to archivecompressorgzipopen in archivewriteaddfiltergzip.c, aka GHSA-92wx-p669-8gr9. This relates to bsdtar. Exploitation envisions a marginally plausible scenario in which original-filename is obtained from an untrusted party. (original-filename is not derived from the input data.)
Affected Software
Event History
Frequently Asked Questions
Who is realistically exposed to this issue?
The issue is relevant to applications using the libarchive gzip writer, including bsdtar-related workflows, when they supply an original-filename value obtained from an untrusted party. The original-filename is not derived from archive input data.
What does an attacker need to control to exploit it?
An attacker would need influence over the original-filename field passed to archive_compressor_gzip_open. The described exploitation scenario is considered only marginally plausible because that value must be obtained from an untrusted source.
What can be done if updating is not immediately possible?
Do not pass untrusted values as the gzip writer original-filename field. Restrict this field to trusted, bounded values until libarchive is updated.