libarchive and bsdtar Buffer Overflow Vulnerability Leading to Denial-of-Service

Vulnerability

A buffer overflow vulnerability has been identified in libarchive versions through 3.7.7, specifically within the bsdtar utility. The issue arises in the tar/util.c file, where the 'list_item_verbose' function fails to properly validate the return value of 'strftime'. This oversight can be exploited by a crafted TAR archive, particularly when read with a verbose flag of 2, potentially causing a denial-of-service or unspecified additional impacts. For instance, a 100-byte buffer may be inadequate for certain custom locales.

Impact

Exploitation of this vulnerability can lead to a buffer overflow, allowing for arbitrary code execution.

Reproduction

The vulnerability can be reproduced by using bsdtar to extract a crafted TAR archive with the '-vv' option, which enables verbose output. The crafted archive should be designed to exploit the 'list_item_verbose' function by including elements that trigger the improper 'strftime' return value handling, such as locale-specific data that exceeds the 100-byte buffer limit.

Added: Jun 9, 2025, 7:46 PM
Updated: Jun 9, 2025, 7:46 PM

Vulnerability Rating

Custom Algorithm
spread
6.6
impact
2.5
exploitability
6.0
remediation
0.0
relevance
0.0
threat
6.4
urgency
2.9
incentive
1.7

Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.