Libarchive Integer Overflow Vulnerability Leading to Double-Free Condition in RAR Format Handling

Vulnerability

A vulnerability exists in the libarchive library, specifically in versions prior to 3.8.0, within the 'archive_read_format_rar_seek_data()' function. This vulnerability involves an integer overflow that can result in a double-free condition. Exploiting this double-free vulnerability can cause memory corruption, allowing an attacker to execute arbitrary code or create a denial-of-service condition.

Impact

The vulnerability can be exploited to cause a double-free condition, leading to memory corruption. This type of vulnerability can often be exploited to execute arbitrary code or cause a denial-of-service condition.

Reproduction

The vulnerability can be reproduced by creating a RAR file that includes over 4 billion nodes. When this file is processed by libarchive using the 'bsdtar' command, the integer overflow occurs, causing the double-free condition. A Python script can be used to automate this process by writing a crafted RAR file that triggers the vulnerability.

Remediation

Users can upgrade to libarchive version 3.8.0 or later, where this vulnerability has been fixed.

Added: Jun 9, 2025, 8:20 PM
Updated: Jun 9, 2025, 8:20 PM

Vulnerability Rating

Custom Algorithm
spread
6.6
impact
7.5
exploitability
5.2
remediation
7.7
relevance
0.2
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.