Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2024-3024 Overview
CVE-2024-3024 is a heap-based buffer overflow in Broadcom Tcpreplay through version 4.4.4. The flaw resides in the get_layer4_v6 function in /tcpreplay/src/common/get.c and is triggered when the tool parses malformed IPv6 packet data. A local attacker with low privileges can supply a crafted packet capture to corrupt heap memory, potentially leading to arbitrary code execution in the context of the user running Tcpreplay. The weakness is tracked under CWE-122 (Heap-based Buffer Overflow) and CWE-787 (Out-of-Bounds Write). The exploit details have been publicly disclosed, and the vendor did not respond to the researcher's early disclosure attempt.
Critical Impact
A local attacker providing a malicious pcap file to Tcpreplay can trigger heap corruption, enabling potential code execution, data tampering, or process crash.
Affected Products
- Broadcom Tcpreplay versions up to and including 4.4.4
- tcpreplay/src/common/get.c — get_layer4_v6 function
- Downstream tools and distributions that bundle vulnerable Tcpreplay builds
Discovery Timeline
- 2024-03-28 - CVE-2024-3024 published to the National Vulnerability Database (NVD)
- 2026-06-17 - Last updated in the NVD database
Technical Details for CVE-2024-3024
Vulnerability Analysis
Tcpreplay is a suite of utilities used to edit and replay previously captured network traffic. The get_layer4_v6 routine walks the IPv6 extension header chain to locate the layer-4 payload. When processing a crafted IPv6 packet, the function fails to properly validate the length fields and extension header boundaries before performing pointer arithmetic on the heap-allocated packet buffer. The result is an out-of-bounds write into adjacent heap memory.
Because Tcpreplay operates on untrusted packet data supplied through pcap files or injected traffic, an attacker who can place a malicious capture on a target system can trigger the overflow when a local user runs the tool. The corrupted heap region may be used to overwrite function pointers or heap metadata, enabling code execution with the privileges of the invoking user.
Root Cause
The root cause is insufficient bounds checking in get_layer4_v6 while traversing IPv6 extension headers. Malformed next-header or length fields cause the parser to read and write past the end of the allocated packet buffer, violating heap integrity.
Attack Vector
Exploitation requires local access and low privileges. The attacker crafts a malicious pcap file containing an IPv6 packet with abnormal extension header values and persuades a legitimate user, script, or service to process it through Tcpreplay utilities such as tcpreplay, tcprewrite, or tcpprep. No user interaction beyond invoking the tool against attacker-controlled data is required.
No verified public proof-of-concept code is referenced in authoritative sources. Technical notes referenced from the NVD entry are available via the VulDB entry VDB-258333.
Detection Methods for CVE-2024-3024
Indicators of Compromise
- Unexpected crashes, SIGSEGV, or abort signals from tcpreplay, tcprewrite, tcpprep, or related binaries
- Presence of untrusted pcap files in user home directories, /tmp, or shared capture directories
- Shell or child processes spawned by Tcpreplay utilities, which is anomalous for packet-replay tooling
Detection Strategies
- Monitor process execution of Tcpreplay binaries and correlate with the command-line arguments and input file paths
- Deploy AddressSanitizer or similar instrumentation in test environments to catch heap overflows during pcap ingestion
- Alert on Tcpreplay process terminations with abnormal exit codes or core dumps written to disk
Monitoring Recommendations
- Capture endpoint telemetry for execution of Tcpreplay binaries and parent-child process relationships
- Audit file-write events for pcap files landing in paths that are later consumed by Tcpreplay
- Centralize crash dumps and glibc heap-corruption messages for investigation
How to Mitigate CVE-2024-3024
Immediate Actions Required
- Inventory all systems and container images that ship Tcpreplay 4.4.4 or earlier
- Restrict execution of Tcpreplay utilities to trusted administrative users
- Treat all pcap files from untrusted or external sources as potentially malicious and quarantine them before analysis
Patch Information
At the time of publication, no vendor-released patch is referenced in the NVD entry, and the vendor did not respond to the researcher's disclosure. Monitor the Broadcom Tcpreplay project for upstream fixes to get_layer4_v6 in src/common/get.c and rebuild from source once a corrected release is available. Track updates through VulDB CTI entry #258333.
Workarounds
- Run Tcpreplay inside an isolated, non-privileged sandbox or container with no access to sensitive data
- Validate pcap files with a hardened parser before passing them to Tcpreplay for replay or rewriting
- Disable or uninstall Tcpreplay on hosts where it is not required for network testing workflows
# Example: restrict tcpreplay to a sandboxed, unprivileged user and read-only input
sudo useradd -r -s /usr/sbin/nologin tcpreplay-sbx
sudo install -o tcpreplay-sbx -g tcpreplay-sbx -m 0750 -d /var/lib/tcpreplay-sbx
sudo chmod 0750 $(command -v tcpreplay) $(command -v tcprewrite) $(command -v tcpprep)
sudo -u tcpreplay-sbx tcpreplay --preload-pcap -i lo /var/lib/tcpreplay-sbx/trusted.pcap
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

