summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta-networking/recipes-protocols/frr/frr/CVE-2023-31489.patch52
-rw-r--r--meta-networking/recipes-protocols/frr/frr_8.2.2.bb1
2 files changed, 53 insertions, 0 deletions
diff --git a/meta-networking/recipes-protocols/frr/frr/CVE-2023-31489.patch b/meta-networking/recipes-protocols/frr/frr/CVE-2023-31489.patch
new file mode 100644
index 0000000000..6fd6792087
--- /dev/null
+++ b/meta-networking/recipes-protocols/frr/frr/CVE-2023-31489.patch
@@ -0,0 +1,52 @@
1From 4e1fc50394df0b69f32a9cf8ba8e1dcee2c67563 Mon Sep 17 00:00:00 2001
2From: Narpat Mali <narpat.mali@windriver.com>
3Date: Tue, 20 Jun 2023 14:01:46 +0000
4Subject: [PATCH] bgpd: Check 7 bytes for Long-lived Graceful-Restart
5 capability
6
7It's not 4 bytes, it was assuming the same as Graceful-Restart tuples.
8LLGR has more 3 bytes (Long-lived Stale Time).
9
10Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
11
12CVE: CVE-2023-31489
13
14Upstream-Status: Backport [https://github.com/FRRouting/frr/commit/b1d33ec293e8e36fbb8766252f3b016d268e31ce]
15
16Signed-off-by: Narpat Mali <narpat.mali@windriver.com>
17---
18 bgpd/bgp_open.c | 14 +++++++++++++-
19 1 file changed, 13 insertions(+), 1 deletion(-)
20
21diff --git a/bgpd/bgp_open.c b/bgpd/bgp_open.c
22index 6bdefd0e9..ad56149f6 100644
23--- a/bgpd/bgp_open.c
24+++ b/bgpd/bgp_open.c
25@@ -578,12 +578,24 @@ static int bgp_capability_restart(struct peer *peer,
26 static int bgp_capability_llgr(struct peer *peer,
27 struct capability_header *caphdr)
28 {
29+/*
30+ * +--------------------------------------------------+
31+ * | Address Family Identifier (16 bits) |
32+ * +--------------------------------------------------+
33+ * | Subsequent Address Family Identifier (8 bits) |
34+ * +--------------------------------------------------+
35+ * | Flags for Address Family (8 bits) |
36+ * +--------------------------------------------------+
37+ * | Long-lived Stale Time (24 bits) |
38+ * +--------------------------------------------------+
39+ */
40+#define BGP_CAP_LLGR_MIN_PACKET_LEN 7
41 struct stream *s = BGP_INPUT(peer);
42 size_t end = stream_get_getp(s) + caphdr->length;
43
44 SET_FLAG(peer->cap, PEER_CAP_LLGR_RCV);
45
46- while (stream_get_getp(s) + 4 <= end) {
47+ while (stream_get_getp(s) + BGP_CAP_LLGR_MIN_PACKET_LEN <= end) {
48 afi_t afi;
49 safi_t safi;
50 iana_afi_t pkt_afi = stream_getw(s);
51--
522.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 92aca8ecdd..c98607a0dc 100644
--- a/meta-networking/recipes-protocols/frr/frr_8.2.2.bb
+++ b/meta-networking/recipes-protocols/frr/frr_8.2.2.bb
@@ -16,6 +16,7 @@ SRC_URI = "git://github.com/FRRouting/frr.git;protocol=https;branch=stable/8.2 \
16 file://CVE-2022-36440.patch \ 16 file://CVE-2022-36440.patch \
17 file://CVE-2022-40318.patch \ 17 file://CVE-2022-40318.patch \
18 file://CVE-2022-43681.patch \ 18 file://CVE-2022-43681.patch \
19 file://CVE-2023-31489.patch \
19 file://frr.pam \ 20 file://frr.pam \
20 " 21 "
21 22