summaryrefslogtreecommitdiffstats
path: root/meta-networking/recipes-support
diff options
context:
space:
mode:
authorArchana Polampalli <archana.polampalli@windriver.com>2025-10-08 16:18:29 +0530
committerGyorgy Sarvari <skandigraun@gmail.com>2025-10-17 10:51:26 +0200
commit0538af085a47b038e369db9872ffed8945b200c2 (patch)
tree6cf18c579a29b123af7cb09ee095e5dbb99787a7 /meta-networking/recipes-support
parentbf223a6c9a6ec21c6f1a790f1071492ab3019956 (diff)
downloadmeta-openembedded-0538af085a47b038e369db9872ffed8945b200c2.tar.gz
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>
Diffstat (limited to 'meta-networking/recipes-support')
-rw-r--r--meta-networking/recipes-support/tcpreplay/tcpreplay/CVE-2025-9157.patch44
-rw-r--r--meta-networking/recipes-support/tcpreplay/tcpreplay_4.4.4.bb3
2 files changed, 46 insertions, 1 deletions
diff --git a/meta-networking/recipes-support/tcpreplay/tcpreplay/CVE-2025-9157.patch b/meta-networking/recipes-support/tcpreplay/tcpreplay/CVE-2025-9157.patch
new file mode 100644
index 0000000000..e52ec0dffc
--- /dev/null
+++ b/meta-networking/recipes-support/tcpreplay/tcpreplay/CVE-2025-9157.patch
@@ -0,0 +1,44 @@
1From 73008f261f1cdf7a1087dc8759115242696d35da Mon Sep 17 00:00:00 2001
2From: Fred Klassen <fred.klassen@broadcom.com>
3Date: Mon, 18 Aug 2025 18:35:16 -0700
4Subject: [PATCH] Bug #970 tcprewrite: --fixlen: do not use realloc
5
6No need to realloc if buffer is already proven to be big enough.
7
8CVE: CVE-2025-9157
9
10Upstream-Status: Backport [https://github.com/appneta/tcpreplay/commit/73008f261f1cdf7a1087dc8759115242696d35da]
11
12Signed-off-by: Archana Polampalli <archana.polampalli@windriver.com>
13---
14 src/tcpedit/edit_packet.c | 1 -
15 src/tcprewrite.c | 2 ++
16 2 files changed, 2 insertions(+), 1 deletion(-)
17
18diff --git a/src/tcpedit/edit_packet.c b/src/tcpedit/edit_packet.c
19index 1025ff9..f9ade8f 100644
20--- a/src/tcpedit/edit_packet.c
21+++ b/src/tcpedit/edit_packet.c
22@@ -558,7 +558,6 @@ untrunc_packet(tcpedit_t *tcpedit,
23 * which seems like a corrupted pcap
24 */
25 if (pkthdr->len > pkthdr->caplen) {
26- packet = safe_realloc(packet, pkthdr->len + PACKET_HEADROOM);
27 memset(packet + pkthdr->caplen, '\0', pkthdr->len - pkthdr->caplen);
28 pkthdr->caplen = pkthdr->len;
29 } else if (pkthdr->len < pkthdr->caplen) {
30diff --git a/src/tcprewrite.c b/src/tcprewrite.c
31index c9aa52c..ee05a26 100644
32--- a/src/tcprewrite.c
33+++ b/src/tcprewrite.c
34@@ -270,6 +270,8 @@ rewrite_packets(tcpedit_t *tcpedit_ctx, pcap_t *pin, pcap_dumper_t *pout)
35
36 if (pkthdr.caplen > MAX_SNAPLEN)
37 errx(-1, "Frame too big, caplen %d exceeds %d", pkthdr.caplen, MAX_SNAPLEN);
38+ if (pkthdr.len > MAX_SNAPLEN)
39+ errx(-1, "Frame too big, len %d exceeds %d", pkthdr.len, MAX_SNAPLEN);
40 /*
41 * copy over the packet so we can pad it out if necessary and
42 * because pcap_next() returns a const ptr
43--
442.40.0
diff --git a/meta-networking/recipes-support/tcpreplay/tcpreplay_4.4.4.bb b/meta-networking/recipes-support/tcpreplay/tcpreplay_4.4.4.bb
index 064a60fccc..c2edd29524 100644
--- a/meta-networking/recipes-support/tcpreplay/tcpreplay_4.4.4.bb
+++ b/meta-networking/recipes-support/tcpreplay/tcpreplay_4.4.4.bb
@@ -8,11 +8,12 @@ LICENSE = "GPL-3.0-only"
8LIC_FILES_CHKSUM = "file://docs/LICENSE;md5=10f0474a2f0e5dccfca20f69d6598ad8" 8LIC_FILES_CHKSUM = "file://docs/LICENSE;md5=10f0474a2f0e5dccfca20f69d6598ad8"
9 9
10SRC_URI = "https://github.com/appneta/tcpreplay/releases/download/v${PV}/tcpreplay-${PV}.tar.gz \ 10SRC_URI = "https://github.com/appneta/tcpreplay/releases/download/v${PV}/tcpreplay-${PV}.tar.gz \
11 file://0001-configure.ac-do-not-run-conftest-in-case-of-cross-co.patch \
11 file://CVE-2023-4256.patch \ 12 file://CVE-2023-4256.patch \
12 file://CVE-2024-22654-0001.patch \ 13 file://CVE-2024-22654-0001.patch \
13 file://CVE-2024-22654-0002.patch \ 14 file://CVE-2024-22654-0002.patch \
14 file://CVE-2023-43279.patch \ 15 file://CVE-2023-43279.patch \
15 file://0001-configure.ac-do-not-run-conftest-in-case-of-cross-co.patch \ 16 file://CVE-2025-9157.patch \
16" 17"
17 18
18SRC_URI[sha256sum] = "44f18fb6d3470ecaf77a51b901a119dae16da5be4d4140ffbb2785e37ad6d4bf" 19SRC_URI[sha256sum] = "44f18fb6d3470ecaf77a51b901a119dae16da5be4d4140ffbb2785e37ad6d4bf"