27 Commits

Author SHA1 Message Date
Archana Polampalli
0a2ce1c4dd
tcpreplay: fix CVE-2025-51006
Within tcpreplay's tcprewrite, a double free vulnerability has been identified
in the dlt_linuxsll2_cleanup() function in plugins/dlt_linuxsll2/linuxsll2.c.
This vulnerability is triggered when tcpedit_dlt_cleanup() indirectly invokes
the cleanup routine multiple times on the same memory region. By supplying a
specifically crafted pcap file to the tcprewrite binary, a local attacker can
exploit this flaw to cause a Denial of Service (DoS) via memory corruption.

Signed-off-by: Archana Polampalli <archana.polampalli@windriver.com>
Signed-off-by: Anuj Mittal <anuj.mittal@oss.qualcomm.com>
2026-01-26 10:13:56 +05:30
Jackson
600a42c435
tcpreplay 4.4.4: Fix CVE-2025-9384
There is a NULL Pointer Dereference in ports2PORT when the user passes ill-formatted
portmap string to tcprewrite with option -r or --portmap

Upstream Repository: https://github.com/appneta/tcpreplay.git

Bug Details: https://nvd.nist.gov/vuln/detail/CVE-2025-9384
CVE: CVE-2025-9384

Signed-off-by: Jackson <jacksonj2@kpit.com>
Signed-off-by: Anuj Mittal <anuj.mittal@oss.qualcomm.com>
2026-01-19 12:15:44 +05:30
Archana Polampalli
c42bfd596e
tcpreplay: fix CVE-2025-9157
A vulnerability was determined in appneta tcpreplay up to 4.5.2-beta2.
The impacted element is the function untrunc_packet of the file
src/tcpedit/edit_packet.c of the component tcprewrite. Executing
manipulation can lead to use after free. It is possible to launch
the attack on the local host. The exploit has been publicly disclosed
and may be utilized. This patch is called 73008f261f1cdf7a1087dc8759115242696d35da.
Applying a patch is advised to resolve this issue.

Signed-off-by: Archana Polampalli <archana.polampalli@windriver.com>
Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com>
(cherry picked from commit 0538af085a47b038e369db9872ffed8945b200c2)
Signed-off-by: Ankur Tyagi <ankur.tyagi85@gmail.com>
Signed-off-by: Anuj Mittal <anuj.mittal@oss.qualcomm.com>
2025-12-17 11:45:23 +05:30
Archana Polampalli
4a58c21334 tcpreplay: fix CVE-2024-22654
tcpreplay v4.4.4 was discovered to contain an infinite loop via the tcprewrite function at get.c.

Signed-off-by: Archana Polampalli <archana.polampalli@windriver.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2025-07-10 20:13:26 -04:00
Jiaying Song
ea99328a06 tcpreplay: fix CVE-2023-43279
Null Pointer Dereference in mask_cidr6 component at cidr.c in Tcpreplay
4.4.4 allows attackers to crash the application via crafted tcprewrite
command.

References:
https://nvd.nist.gov/vuln/detail/CVE-2023-43279

Upstream patches:
963842ceca

Signed-off-by: Jiaying Song <jiaying.song.cn@windriver.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2024-11-09 14:41:32 -05:00
Poonam Jadhav
4d7c91ee53 tcpreplay: Fix CVE-2023-4256
Add patch to fix tcpreplay CVE-2023-4256
dlt_jnpr_ether_cleanup: check config before cleanup
Links:
https://github.com/appneta/tcpreplay/pull/851
https://github.com/appneta/tcpreplay/issues/813#issuecomment-2245557093

Signed-off-by: Poonam Jadhav <poonam.jadhav@kpit.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2024-08-03 11:55:57 -04:00
Chen Qi
8cf55e279f
tcprelay: fix a minor cross compilation do_configure issue
We're seeing errors like below in log.do_configure:

  ./conftest: cannot execute binary file: Exec format error

The tcprelay's configure have two places to execute ./conftest.
And the result happens to be correct even with the error above.

Instead of leaving the errors as they are, we explicitly skip
running ./conftest in case of cross compiling. The build will
continue to succeed and result will remain the same.

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2024-03-08 10:07:29 -08:00
Martin Jansa
b74b10e316 tcpreplay: fix pcap detection with /usr/lib32 multilib
* use BPN, BP where useful
* use prefix instead of hardcoding /usr
* add patch to search also in lib32 subdir of --with-libpcap value
  to fix:
  checking for libpcap... configure: error: "Unable to find matching library for header file in TOPDIR/BUILD/work/raspberrypi4_64-oemllib32-linux-gnueabi/lib32-tcpreplay/4.4.4-r0/lib32-recipe-sysroot/usr"

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2023-09-03 09:04:57 -07:00
Archana Polampalli
f504625983 tcpreplay: upgrade 4.4.3 -> 4.4.4
This release contains bug fixes only.
The following CVEs have been addressed:

CVE-2023-27783
CVE-2023-27784
CVE-2023-27785
CVE-2023-27786
CVE-2023-27787
CVE-2023-27788
CVE-2023-27789

Changelog:
=========
dlt_jnpr_ether_cleanup: check subctx before cleanup by @Marsman1996 in #781
Bug #780 assert tcpedit dlt cleanup by @fklassen in #800
Fix bugs caused by strtok_r by @Marsman1996 in #783
Bug #782 #784 #785 #786 #787 #788 strtok r isuses by @fklassen in #801
Update en10mb.c by @david-guti in #793
PR #793 ip6 unicast flood by @fklassen in #802
Bug #719 fix overflow check for parse_mpls() by @fklassen in #804
PR #793 - update tests for corrected IPv6 MAC by @fklassen in #805
PR #793 - update tests for vlandel by @fklassen in #806
Feature #773 gh actions ci by @fklassen in #807

Signed-off-by: Archana Polampalli <archana.polampalli@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2023-06-26 05:12:55 -07:00
Yi Zhao
7473b1ebf2 tcpreplay: 4.4.2 -> 4.4.3
ChangeLog:
https://github.com/appneta/tcpreplay/releases/tag/v4.4.3

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2023-03-23 15:03:43 -07:00
Yi Zhao
ea62a6b30a tcpreplay: fix buildpaths issue
POSIX_SHELL is specified a host tool path as it searches path on build
host using `which` when configure. Set it to a fixed path '/bin/sh'.

Fixes:
QA Issue: File /usr/bin/tcpbridge in package tcpreplay contains reference to TMPDIR
File /usr/bin/tcpliveplay in package tcpreplay contains reference to TMPDIR
File /usr/bin/tcprewrite in package tcpreplay contains reference to TMPDIR
File /usr/bin/tcpcapinfo in package tcpreplay contains reference to TMPDIR
File /usr/bin/tcpreplay in package tcpreplay contains reference to TMPDIR
File /usr/bin/tcpprep in package tcpreplay contains reference to TMPDIR
File /usr/bin/tcpreplay-edit in package tcpreplay contains reference to TMPDIR [buildpaths]
QA Issue: File /usr/src/debug/tcpreplay/4.4.2-r0/src/defines.h in package tcpreplay-src contains reference to TMPDIR [buildpaths]

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2022-08-30 15:27:08 -07:00
Wang Mingyu
69fb572481 tcpreplay: upgrade 4.4.1 -> 4.4.2
Signed-off-by: Wang Mingyu <wangmy@fujitsu.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2022-08-29 08:44:19 -07:00
Khem Raj
7d8a0e840d recipes: Update LICENSE variable to use SPDX license identifiers
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2022-03-04 17:41:45 -08:00
Wang Mingyu
26c9503b64 tcpreplay: upgrade 4.4.0 -> 4.4.1
Changelog:
=========
Bug #708 fix support for feeding PCAP files from STDIN
Bug #705 fix Debian/kfreebsd build
Bug #704 fix typos
Bug #703 safeguard against corrupt packet lengths in checksum functions
Bug #702 fix double free in Juniper DLT

Signed-off-by: Wang Mingyu <wangmy@fujitsu.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2022-02-24 08:35:24 -08:00
Yi Zhao
e452e268e4 tcpreplay: update HOMEPAGE
The official site was moved to https://tcpreplay.appneta.com/.

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2022-02-09 22:31:52 -08:00
wangmy
07c274c222 tcpreplay: upgrade 4.3.4 -> 4.4.0
Changelog:
=========
Update strlcpy.c and strlcat.c
PR #636
Apply #616 fix to flows.c, fix #665
Bug #670: update Travis CI to focal
Bug #669: LINUX installed netmap auto detection
Feature #626 - Support for Q-in-Q VLAN tags
Bug #677 skipbroadcast
Bug #689: add security policy document
Directories of pcaps as arguments
PR #682
Bug #679 fix PPS calc for long-running sessions
Bug #668 Improve SDK selection
Bug #696 fix directory include feature
Bug #695 mac os tests fail
Bug #674 - Revert "send_packet: Avoid clock drift by using time since first packet"
Feature #563 mac update on multicast

Signed-off-by: Wang Mingyu <wangmy@fujitsu.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2022-02-08 08:59:08 -08:00
zangrc
556fbae2ee tcpreplay: upgrade 4.3.3 -> 4.3.4
-License-Update: URL changed from HTTP to HTTPS.

Signed-off-by: Zang Ruochen <zangrc.fnst@fujitsu.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2021-05-14 07:26:46 -07:00
Andreas Müller
822963c6cb tcpreplay: upgrade 4.3.2 -> 4.3.3
>From [1]

* Increase cache buffers size to accomodate VLAN edits (#594)
* Correct L2 header length to correct IP header offset (#583)
* Fix warnings from gcc version 10 (#580)
* Heap Buffer Overflow in randomize_iparp (#579)
* Use after free in get_ipv6_next (#578)
* Heap Buffer Overflow in git_ipv6_next (#576)
* Call pcap_freecode() on pcap_compile() (#572)
* Increase max snaplen to 262144 (#571)
* Fix divide by zero in fuzzing (#570)
* Unique IP repeats at very high iteration counts (#566)
* Fails to compile on FreeBSD amd64 13.0 (#558)
* Heap Buffer Overflow in do_checksum (#556) (#577)
* Attempt to correct corrupt pcap files, if possible (#557)
* Fix GCC v10 warnings (#555)
* Remove some duplicated SOURCES entries (#551)
* Expand /dev/bpfX hard limit to fix macOS Mojave (#550)
* Implement --loopdelay-ms when using --loop=0 (#546)
* Heap overflow packet2tree and get_l2len (#530)

[1] https://github.com/appneta/tcpreplay/releases

Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2020-06-20 16:44:45 -07:00
Pierre-Jean Texier
3341fc97d6 tcpreplay: fix upstream check URL
Fixes:

$: devtool check-upgrade-status tcpreplay
<...>

INFO: tcpreplay                 4.3.2           UNKNOWN_BROKEN  None

Signed-off-by: Pierre-Jean Texier <pjtexier@koncepto.io>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2020-06-08 22:00:37 -07:00
Slater, Joseph
e907138347 tcpreplay: update to version 4.3.2
Includes fixes for CVE-20198376, -8377, and -8381.

Signed-off-by: Joe Slater <joe.slater@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2019-04-06 08:22:22 -07:00
dengke.du@windriver.com
80ab79da53 tcpreplay: upgrade to 4.2.6
Signed-off-by: Dengke Du <dengke.du@windriver.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2017-09-12 10:55:06 -04:00
Oleksandr Kravchuk
c0ff097fae tcpreplay: upgrade to 4.1.2
Signed-off-by: Oleksandr Kravchuk <oleksandr.kravchuk@pelagicore.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
2017-01-19 09:26:14 +01:00
Mingli Yu
098d32e57c tcpreplay: upgrade to 4.1.1
* Upgrade tcpreplay from 3.4.4 to 4.1.1
* Update the LICENSE file checksum as the LICENSE
  updated to implement GPLv3 license
* Remove the backport and unapplicable patches
  - tcpreplay-3.4.4-cross-compile.patch
  - tcpreplay-3.4.4-no-bfp-support.patch
  - tcpreplay-3.4.4-fix-unable-to-link-libpcap-issue.patch
  - tcpreplay-3.4.4-improve-search-for-libpcap.patch are

Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2016-09-14 14:02:44 -04:00
Joe MacDonald
8980f0d2a2 meta-networking: standardize SECTION values
SECTION has been used inconsistently throughout the recipes in this layer.
Convert them to all use the same convention.

Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2015-06-05 20:42:25 -04:00
Joe Slater
2a1cbf5ca9 tcpreplay: improve search for libpcap
Add a test to find libpcap if testdir/.. is a sysroot.

Upstream-Status: Pending

Signed-off-by: Joe Slater <jslater@windriver.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
2014-12-19 20:10:55 +01:00
Robert Yang
e3e7c6b850 tcpreplay: inherit autotools-brokensep
It needs autotools-brokensep, otherwise do_compile error:

src/defines.h:5:18: fatal error: tcpr.h: No such file or directory

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2014-06-15 23:21:56 -04:00
Zongchun Yu
0501fa0f0b tcpreplay: add recipe
tcpreplay - a suite of GPLv3 licensed tools for UNIX operating systems
which gives you the ability to use previously captured traffic in libpcap
format to test a variety of network devices.

Signed-off-by: Zongchun Yu <Zongchun.Yu@freescale.com>
Signed-off-by: Joe MacDonald <joe@deserted.net>
2013-11-28 10:35:00 -05:00