tcpreplay Heap-Based Buffer Overflow Vulnerability in tcpprep Component

Vulnerability

A heap-based buffer overflow vulnerability has been identified in the tcpreplay utility, specifically in version 4.5.1. The issue arises in the tcpprep component within the 'mask_cidr6' function of 'cidr.c'. This vulnerability is triggered through the include option processing path, leading to an out-of-bounds read that can cause memory corruption and program crashes. The vulnerability can be exploited remotely, although the exploitation process is complex and difficult.

Impact

Exploitation of this vulnerability leads to a heap-based buffer overflow, causing memory corruption and a program crash. Such heap overflows can often be exploited to execute arbitrary code under certain conditions.

Reproduction

The vulnerability can be reproduced by compiling tcpreplay with AddressSanitizer enabled and then executing the tcpprep utility with a specific load options file that triggers the buffer overflow. This file must contain malformed IPv6 CIDR include rules that the 'mask_cidr6' function will process, causing the out-of-bounds read that characterizes the vulnerability. The program will crash with a heap-buffer-overflow error, which can be verified using the AddressSanitizer tool.

Remediation

Users are advised to update to tcpreplay version 4.5.2 or later, where this vulnerability has been fixed.

Added: Aug 15, 2025, 7:18 AM
Updated: Aug 15, 2025, 7:18 AM

Vulnerability Rating

Custom Algorithm
spread
4.2
impact
2.5
exploitability
5.8
remediation
7.7
relevance
0.3
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.