summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAkash Hadke <akash.hadke@kpit.com>2022-03-03 09:01:01 +0530
committerArmin Kuster <akuster808@gmail.com>2022-03-27 08:18:20 -0700
commita09ddd737e9846192bdcd61585d539604dc55c15 (patch)
tree76ec48d04bd60fd8b658f33a337f638db15defbd
parent9aaa0318934fa866389e4109cb0bfa3009ca357f (diff)
downloadmeta-openembedded-a09ddd737e9846192bdcd61585d539604dc55c15.tar.gz
tcpreplay: Add fix for CVE-2020-24265 and CVE-2020-24266
Add below patch to fix CVE-2020-24265 and CVE-2020-24266 CVE-2020-24265-and-CVE-2020-24266.patch Link: https://github.com/appneta/tcpreplay/commit/d3110859064b15408dbca1294dc7e31c2208504d Signed-off-by: Akash Hadke <akash.hadke@kpit.com> Signed-off-by: Akash Hadke <hadkeakash4@gmail.com> Signed-off-by: Armin Kuster <akuster808@gmail.com>
-rw-r--r--meta-networking/recipes-support/tcpreplay/files/CVE-2020-24265-and-CVE-2020-24266.patch37
-rw-r--r--meta-networking/recipes-support/tcpreplay/tcpreplay_4.3.3.bb3
2 files changed, 39 insertions, 1 deletions
diff --git a/meta-networking/recipes-support/tcpreplay/files/CVE-2020-24265-and-CVE-2020-24266.patch b/meta-networking/recipes-support/tcpreplay/files/CVE-2020-24265-and-CVE-2020-24266.patch
new file mode 100644
index 0000000000..3ca9a831f4
--- /dev/null
+++ b/meta-networking/recipes-support/tcpreplay/files/CVE-2020-24265-and-CVE-2020-24266.patch
@@ -0,0 +1,37 @@
1From d3110859064b15408dbca1294dc7e31c2208504d Mon Sep 17 00:00:00 2001
2From: Gabriel Ganne <gabriel.ganne@gmail.com>
3Date: Mon, 3 Aug 2020 08:26:38 +0200
4Subject: [PATCH] fix heap-buffer-overflow when DLT_JUNIPER_ETHER
5
6The test logic on datalen was inverted.
7
8Processing truncated packats should now raise a warning like the
9following:
10 Warning: <pcap> was captured using a snaplen of 4 bytes. This may mean you have truncated packets.
11
12Fixes #616 #617
13
14CVE: CVE-2020-24265
15CVE: CVE-2020-24266
16Upstream-Status: Backport [https://github.com/appneta/tcpreplay/commit/d3110859064b15408dbca1294dc7e31c2208504d]
17
18Signed-off-by: Gabriel Ganne <gabriel.ganne@gmail.com>
19Signed-off-by: Akash Hadke <akash.hadke@kpit.com>
20Signed-off-by: Akash Hadke <hadkeakash4@gmail.com>
21---
22 src/common/get.c | 2 +-
23 1 file changed, 1 insertion(+), 1 deletion(-)
24
25diff --git a/src/common/get.c b/src/common/get.c
26index f9ee92d3..0517bf0a 100644
27--- a/src/common/get.c
28+++ b/src/common/get.c
29@@ -178,7 +178,7 @@ get_l2len(const u_char *pktdata, const int datalen, const int datalink)
30 break;
31
32 case DLT_JUNIPER_ETHER:
33- if (datalen >= 5) {
34+ if (datalen < 5) {
35 l2_len = -1;
36 break;
37 }
diff --git a/meta-networking/recipes-support/tcpreplay/tcpreplay_4.3.3.bb b/meta-networking/recipes-support/tcpreplay/tcpreplay_4.3.3.bb
index 39be950ad4..557d323311 100644
--- a/meta-networking/recipes-support/tcpreplay/tcpreplay_4.3.3.bb
+++ b/meta-networking/recipes-support/tcpreplay/tcpreplay_4.3.3.bb
@@ -6,7 +6,8 @@ SECTION = "net"
6LICENSE = "GPLv3" 6LICENSE = "GPLv3"
7LIC_FILES_CHKSUM = "file://docs/LICENSE;md5=890b830b22fd632e9ffd996df20338f8" 7LIC_FILES_CHKSUM = "file://docs/LICENSE;md5=890b830b22fd632e9ffd996df20338f8"
8 8
9SRC_URI = "https://github.com/appneta/tcpreplay/releases/download/v${PV}/tcpreplay-${PV}.tar.gz" 9SRC_URI = "https://github.com/appneta/tcpreplay/releases/download/v${PV}/tcpreplay-${PV}.tar.gz \
10 file://CVE-2020-24265-and-CVE-2020-24266.patch"
10 11
11SRC_URI[md5sum] = "53b52bf64f0b6b9443428e657b37bc6b" 12SRC_URI[md5sum] = "53b52bf64f0b6b9443428e657b37bc6b"
12SRC_URI[sha256sum] = "ed2402caa9434ff5c74b2e7b31178c73e7c7c5c4ea1e1d0e2e39a7dc46958fde" 13SRC_URI[sha256sum] = "ed2402caa9434ff5c74b2e7b31178c73e7c7c5c4ea1e1d0e2e39a7dc46958fde"