summaryrefslogtreecommitdiffstats
path: root/meta-networking/recipes-protocols
diff options
context:
space:
mode:
authorArmin Kuster <akuster808@gmail.com>2023-09-23 13:37:33 -0400
committerArmin Kuster <akuster808@gmail.com>2023-09-23 13:38:49 -0400
commit799e0847cc4d1170151149cb896beec7e9ce5ef1 (patch)
treed612db5dc4a084c93b37b09a05d3511850f1b696 /meta-networking/recipes-protocols
parentdd5003603b47bff937123c85f27e03e0eb34a15c (diff)
downloadmeta-openembedded-799e0847cc4d1170151149cb896beec7e9ce5ef1.tar.gz
frr: Fix CVE-2023-41909
An issue was discovered in FRRouting FRR through 9.0. bgp_nlri_parse_flowspec in bgpd/bgp_flowspec.c processes malformed requests with no attributes, leading to a NULL pointer dereference. References: https://nvd.nist.gov/vuln/detail/CVE-2023-41909 https://security-tracker.debian.org/tracker/CVE-2023-41909 Signed-off-by: Narpat Mali <narpat.mali@windriver.com> [Minor fixup ] Signed-off-by: Armin Kuster <akuster808@gmail.com>
Diffstat (limited to 'meta-networking/recipes-protocols')
-rw-r--r--meta-networking/recipes-protocols/frr/frr/CVE-2023-41909.patch42
-rw-r--r--meta-networking/recipes-protocols/frr/frr_8.2.2.bb1
2 files changed, 43 insertions, 0 deletions
diff --git a/meta-networking/recipes-protocols/frr/frr/CVE-2023-41909.patch b/meta-networking/recipes-protocols/frr/frr/CVE-2023-41909.patch
new file mode 100644
index 0000000000..b27d7af166
--- /dev/null
+++ b/meta-networking/recipes-protocols/frr/frr/CVE-2023-41909.patch
@@ -0,0 +1,42 @@
1From 5966b6a1fc72d3698d08199922cc4f42ea7fc9eb Mon Sep 17 00:00:00 2001
2From: Donald Sharp <sharpd@nvidia.com>
3Date: Fri, 8 Sep 2023 11:46:12 +0000
4Subject: [PATCH] bgpd: Limit flowspec to no attribute means a implicit
5 withdrawal
6
7All other parsing functions done from bgp_nlri_parse() assume
8no attributes == an implicit withdrawal. Let's move
9bgp_nlri_parse_flowspec() into the same alignment.
10
11Reported-by: Matteo Memelli <mmemelli@amazon.it>
12Signed-off-by: Donald Sharp <sharpd@nvidia.com>
13
14CVE: CVE-2023-41909
15
16Upstream-Status: Backport [https://github.com/FRRouting/frr/commit/cfd04dcb3e689754a72507d086ba3b9709fc5ed8]
17
18Signed-off-by: Narpat Mali <narpat.mali@windriver.com>
19---
20 bgpd/bgp_flowspec.c | 7 +++++++
21 1 file changed, 7 insertions(+)
22
23diff --git a/bgpd/bgp_flowspec.c b/bgpd/bgp_flowspec.c
24index 341cfe9d0..3e2b1ac49 100644
25--- a/bgpd/bgp_flowspec.c
26+++ b/bgpd/bgp_flowspec.c
27@@ -112,6 +112,13 @@ int bgp_nlri_parse_flowspec(struct peer *peer, struct attr *attr,
28 afi = packet->afi;
29 safi = packet->safi;
30
31+ /*
32+ * All other AFI/SAFI's treat no attribute as a implicit
33+ * withdraw. Flowspec should as well.
34+ */
35+ if (!attr)
36+ withdraw = 1;
37+
38 if (packet->length >= FLOWSPEC_NLRI_SIZELIMIT_EXTENDED) {
39 flog_err(EC_BGP_FLOWSPEC_PACKET,
40 "BGP flowspec nlri length maximum reached (%u)",
41--
422.40.0
diff --git a/meta-networking/recipes-protocols/frr/frr_8.2.2.bb b/meta-networking/recipes-protocols/frr/frr_8.2.2.bb
index 7af584835f..58754b8256 100644
--- a/meta-networking/recipes-protocols/frr/frr_8.2.2.bb
+++ b/meta-networking/recipes-protocols/frr/frr_8.2.2.bb
@@ -20,6 +20,7 @@ SRC_URI = "git://github.com/FRRouting/frr.git;protocol=https;branch=stable/8.2 \
20 file://CVE-2023-31490.patch \ 20 file://CVE-2023-31490.patch \
21 file://CVE-2023-38802.patch \ 21 file://CVE-2023-38802.patch \
22 file://CVE-2023-41358.patch \ 22 file://CVE-2023-41358.patch \
23 file://CVE-2023-41909.patch \
23 file://frr.pam \ 24 file://frr.pam \
24 " 25 "
25 26