diff options
author | Yi Zhao <yi.zhao@windriver.com> | 2022-12-14 17:34:40 +0800 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2022-12-14 08:22:04 -0800 |
commit | f9024bf768d112c158ab527b2e5d2e612d0a9aa3 (patch) | |
tree | 264dc97c1443255c29364f0ffbed8a22d274f19a /meta-networking/recipes-protocols | |
parent | 1f69de300fd3b772830432eedeb2b055396494a6 (diff) | |
download | meta-openembedded-f9024bf768d112c158ab527b2e5d2e612d0a9aa3.tar.gz |
frr: upgrade 8.3.1 -> 8.4.1
Drop backport patches.
ChangeLog:
https://github.com/FRRouting/frr/releases/tag/frr-8.4.1
Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-networking/recipes-protocols')
6 files changed, 9 insertions, 282 deletions
diff --git a/meta-networking/recipes-protocols/frr/frr/0001-bgpd-Make-sure-hdr-length-is-at-a-minimum-of-what-is.patch b/meta-networking/recipes-protocols/frr/frr/0001-bgpd-Make-sure-hdr-length-is-at-a-minimum-of-what-is.patch deleted file mode 100644 index 52b39c1e86..0000000000 --- a/meta-networking/recipes-protocols/frr/frr/0001-bgpd-Make-sure-hdr-length-is-at-a-minimum-of-what-is.patch +++ /dev/null | |||
@@ -1,43 +0,0 @@ | |||
1 | From 066770ac1c69ee5b484bb82581b22ad0423b004d Mon Sep 17 00:00:00 2001 | ||
2 | From: Donald Sharp <sharpd@nvidia.com> | ||
3 | Date: Thu, 21 Jul 2022 08:11:58 -0400 | ||
4 | Subject: [PATCH] bgpd: Make sure hdr length is at a minimum of what is | ||
5 | expected | ||
6 | |||
7 | Ensure that if the capability length specified is enough data. | ||
8 | |||
9 | Signed-off-by: Donald Sharp <sharpd@nvidia.com> | ||
10 | (cherry picked from commit ff6db1027f8f36df657ff2e5ea167773752537ed) | ||
11 | |||
12 | CVE: CVE-2022-37032 | ||
13 | |||
14 | Upstream-Status: Backport | ||
15 | [https://github.com/FRRouting/frr/commit/066770ac1c69ee5b484bb82581b22ad0423b004d] | ||
16 | |||
17 | Signed-off-by: Yi Zhao <yi.zhao@windriver.com> | ||
18 | --- | ||
19 | bgpd/bgp_packet.c | 8 ++++++++ | ||
20 | 1 file changed, 8 insertions(+) | ||
21 | |||
22 | diff --git a/bgpd/bgp_packet.c b/bgpd/bgp_packet.c | ||
23 | index 7613ccc7d..a5f065a15 100644 | ||
24 | --- a/bgpd/bgp_packet.c | ||
25 | +++ b/bgpd/bgp_packet.c | ||
26 | @@ -2621,6 +2621,14 @@ static int bgp_capability_msg_parse(struct peer *peer, uint8_t *pnt, | ||
27 | "%s CAPABILITY has action: %d, code: %u, length %u", | ||
28 | peer->host, action, hdr->code, hdr->length); | ||
29 | |||
30 | + if (hdr->length < sizeof(struct capability_mp_data)) { | ||
31 | + zlog_info( | ||
32 | + "%pBP Capability structure is not properly filled out, expected at least %zu bytes but header length specified is %d", | ||
33 | + peer, sizeof(struct capability_mp_data), | ||
34 | + hdr->length); | ||
35 | + return BGP_Stop; | ||
36 | + } | ||
37 | + | ||
38 | /* Capability length check. */ | ||
39 | if ((pnt + hdr->length + 3) > end) { | ||
40 | zlog_info("%s Capability length error", peer->host); | ||
41 | -- | ||
42 | 2.25.1 | ||
43 | |||
diff --git a/meta-networking/recipes-protocols/frr/frr/0001-bgpd-avoid-notify-race-between-io-and-main-pthreads.patch b/meta-networking/recipes-protocols/frr/frr/0001-bgpd-avoid-notify-race-between-io-and-main-pthreads.patch deleted file mode 100644 index 40284d6f4f..0000000000 --- a/meta-networking/recipes-protocols/frr/frr/0001-bgpd-avoid-notify-race-between-io-and-main-pthreads.patch +++ /dev/null | |||
@@ -1,151 +0,0 @@ | |||
1 | From 71ca5b09bc71e8cbe38177cf41e83fe164e52eee Mon Sep 17 00:00:00 2001 | ||
2 | From: Mark Stapp <mstapp@nvidia.com> | ||
3 | Date: Thu, 8 Sep 2022 16:14:36 -0400 | ||
4 | Subject: [PATCH] bgpd: avoid notify race between io and main pthreads | ||
5 | |||
6 | The "bgp_notify_" apis in bgp_packet.c generate a notification | ||
7 | to a peer, usually during error handling. The io pthread wants | ||
8 | to send notifications in a couple of cases during early | ||
9 | received-packet validation - but the existing api interacts | ||
10 | with the peer struct itself, and that's not safe. | ||
11 | |||
12 | Add a new api for use by the io pthread, and adjust the main | ||
13 | notify api so that it can avoid touching the peer struct. | ||
14 | |||
15 | Signed-off-by: Mark Stapp <mstapp@nvidia.com> | ||
16 | |||
17 | CVE: CVE-2022-37035 | ||
18 | |||
19 | Upstream-Status: Backport | ||
20 | [https://github.com/FRRouting/frr/commit/71ca5b09bc71e8cbe38177cf41e83fe164e52eee] | ||
21 | |||
22 | Signed-off-by: Yi Zhao <yi.zhao@windriver.com> | ||
23 | --- | ||
24 | bgpd/bgp_io.c | 17 ++++++++--------- | ||
25 | bgpd/bgp_packet.c | 32 ++++++++++++++++++++++++++++---- | ||
26 | bgpd/bgp_packet.h | 2 ++ | ||
27 | 3 files changed, 38 insertions(+), 13 deletions(-) | ||
28 | |||
29 | diff --git a/bgpd/bgp_io.c b/bgpd/bgp_io.c | ||
30 | index 7af1fae28..f9bb8d518 100644 | ||
31 | --- a/bgpd/bgp_io.c | ||
32 | +++ b/bgpd/bgp_io.c | ||
33 | @@ -37,7 +37,7 @@ | ||
34 | #include "bgpd/bgp_debug.h" // for bgp_debug_neighbor_events, bgp_type_str | ||
35 | #include "bgpd/bgp_errors.h" // for expanded error reference information | ||
36 | #include "bgpd/bgp_fsm.h" // for BGP_EVENT_ADD, bgp_event | ||
37 | -#include "bgpd/bgp_packet.h" // for bgp_notify_send_with_data, bgp_notify... | ||
38 | +#include "bgpd/bgp_packet.h" // for bgp_notify_io_invalid... | ||
39 | #include "bgpd/bgp_trace.h" // for frrtraces | ||
40 | #include "bgpd/bgpd.h" // for peer, BGP_MARKER_SIZE, bgp_master, bm | ||
41 | /* clang-format on */ | ||
42 | @@ -526,8 +526,8 @@ static bool validate_header(struct peer *peer) | ||
43 | return false; | ||
44 | |||
45 | if (memcmp(m_correct, m_rx, BGP_MARKER_SIZE) != 0) { | ||
46 | - bgp_notify_send(peer, BGP_NOTIFY_HEADER_ERR, | ||
47 | - BGP_NOTIFY_HEADER_NOT_SYNC); | ||
48 | + bgp_notify_io_invalid(peer, BGP_NOTIFY_HEADER_ERR, | ||
49 | + BGP_NOTIFY_HEADER_NOT_SYNC, NULL, 0); | ||
50 | return false; | ||
51 | } | ||
52 | |||
53 | @@ -547,9 +547,8 @@ static bool validate_header(struct peer *peer) | ||
54 | zlog_debug("%s unknown message type 0x%02x", peer->host, | ||
55 | type); | ||
56 | |||
57 | - bgp_notify_send_with_data(peer, BGP_NOTIFY_HEADER_ERR, | ||
58 | - BGP_NOTIFY_HEADER_BAD_MESTYPE, &type, | ||
59 | - 1); | ||
60 | + bgp_notify_io_invalid(peer, BGP_NOTIFY_HEADER_ERR, | ||
61 | + BGP_NOTIFY_HEADER_BAD_MESTYPE, &type, 1); | ||
62 | return false; | ||
63 | } | ||
64 | |||
65 | @@ -574,9 +573,9 @@ static bool validate_header(struct peer *peer) | ||
66 | |||
67 | uint16_t nsize = htons(size); | ||
68 | |||
69 | - bgp_notify_send_with_data(peer, BGP_NOTIFY_HEADER_ERR, | ||
70 | - BGP_NOTIFY_HEADER_BAD_MESLEN, | ||
71 | - (unsigned char *)&nsize, 2); | ||
72 | + bgp_notify_io_invalid(peer, BGP_NOTIFY_HEADER_ERR, | ||
73 | + BGP_NOTIFY_HEADER_BAD_MESLEN, | ||
74 | + (unsigned char *)&nsize, 2); | ||
75 | return false; | ||
76 | } | ||
77 | |||
78 | diff --git a/bgpd/bgp_packet.c b/bgpd/bgp_packet.c | ||
79 | index 7daac4494..90695219a 100644 | ||
80 | --- a/bgpd/bgp_packet.c | ||
81 | +++ b/bgpd/bgp_packet.c | ||
82 | @@ -871,8 +871,9 @@ bool bgp_notify_received_hard_reset(struct peer *peer, uint8_t code, | ||
83 | * @param data Data portion | ||
84 | * @param datalen length of data portion | ||
85 | */ | ||
86 | -void bgp_notify_send_with_data(struct peer *peer, uint8_t code, | ||
87 | - uint8_t sub_code, uint8_t *data, size_t datalen) | ||
88 | +static void bgp_notify_send_internal(struct peer *peer, uint8_t code, | ||
89 | + uint8_t sub_code, uint8_t *data, | ||
90 | + size_t datalen, bool use_curr) | ||
91 | { | ||
92 | struct stream *s; | ||
93 | bool hard_reset = bgp_notify_send_hard_reset(peer, code, sub_code); | ||
94 | @@ -917,8 +918,11 @@ void bgp_notify_send_with_data(struct peer *peer, uint8_t code, | ||
95 | * If possible, store last packet for debugging purposes. This check is | ||
96 | * in place because we are sometimes called with a doppelganger peer, | ||
97 | * who tends to have a plethora of fields nulled out. | ||
98 | + * | ||
99 | + * Some callers should not attempt this - the io pthread for example | ||
100 | + * should not touch internals of the peer struct. | ||
101 | */ | ||
102 | - if (peer->curr) { | ||
103 | + if (use_curr && peer->curr) { | ||
104 | size_t packetsize = stream_get_endp(peer->curr); | ||
105 | assert(packetsize <= peer->max_packet_size); | ||
106 | memcpy(peer->last_reset_cause, peer->curr->data, packetsize); | ||
107 | @@ -1001,7 +1005,27 @@ void bgp_notify_send_with_data(struct peer *peer, uint8_t code, | ||
108 | */ | ||
109 | void bgp_notify_send(struct peer *peer, uint8_t code, uint8_t sub_code) | ||
110 | { | ||
111 | - bgp_notify_send_with_data(peer, code, sub_code, NULL, 0); | ||
112 | + bgp_notify_send_internal(peer, code, sub_code, NULL, 0, true); | ||
113 | +} | ||
114 | + | ||
115 | +/* | ||
116 | + * Enqueue notification; called from the main pthread, peer object access is ok. | ||
117 | + */ | ||
118 | +void bgp_notify_send_with_data(struct peer *peer, uint8_t code, | ||
119 | + uint8_t sub_code, uint8_t *data, size_t datalen) | ||
120 | +{ | ||
121 | + bgp_notify_send_internal(peer, code, sub_code, data, datalen, true); | ||
122 | +} | ||
123 | + | ||
124 | +/* | ||
125 | + * For use by the io pthread, queueing a notification but avoiding access to | ||
126 | + * the peer object. | ||
127 | + */ | ||
128 | +void bgp_notify_io_invalid(struct peer *peer, uint8_t code, uint8_t sub_code, | ||
129 | + uint8_t *data, size_t datalen) | ||
130 | +{ | ||
131 | + /* Avoid touching the peer object */ | ||
132 | + bgp_notify_send_internal(peer, code, sub_code, data, datalen, false); | ||
133 | } | ||
134 | |||
135 | /* | ||
136 | diff --git a/bgpd/bgp_packet.h b/bgpd/bgp_packet.h | ||
137 | index a0eb579db..9f6d772bc 100644 | ||
138 | --- a/bgpd/bgp_packet.h | ||
139 | +++ b/bgpd/bgp_packet.h | ||
140 | @@ -62,6 +62,8 @@ extern void bgp_open_send(struct peer *); | ||
141 | extern void bgp_notify_send(struct peer *, uint8_t, uint8_t); | ||
142 | extern void bgp_notify_send_with_data(struct peer *, uint8_t, uint8_t, | ||
143 | uint8_t *, size_t); | ||
144 | +void bgp_notify_io_invalid(struct peer *peer, uint8_t code, uint8_t sub_code, | ||
145 | + uint8_t *data, size_t datalen); | ||
146 | extern void bgp_route_refresh_send(struct peer *peer, afi_t afi, safi_t safi, | ||
147 | uint8_t orf_type, uint8_t when_to_refresh, | ||
148 | int remove, uint8_t subtype); | ||
149 | -- | ||
150 | 2.25.1 | ||
151 | |||
diff --git a/meta-networking/recipes-protocols/frr/frr/0001-configure-Check-for-readline-function-instead-of-mai.patch b/meta-networking/recipes-protocols/frr/frr/0001-configure-Check-for-readline-function-instead-of-mai.patch deleted file mode 100644 index 20e8472233..0000000000 --- a/meta-networking/recipes-protocols/frr/frr/0001-configure-Check-for-readline-function-instead-of-mai.patch +++ /dev/null | |||
@@ -1,32 +0,0 @@ | |||
1 | From 9399d58c13257849179d3c2b3698a2b43bc1b2a0 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Thu, 1 Sep 2022 10:39:23 -0700 | ||
4 | Subject: [PATCH] configure: Check for readline() function instead of main | ||
5 | |||
6 | main is not a function found in libreadline, its better to check for a | ||
7 | function thats provided by it. | ||
8 | |||
9 | Upstream-Status: Backport | ||
10 | [https://github.com/FRRouting/frr/commit/9399d58c13257849179d3c2b3698a2b43bc1b2a0] | ||
11 | |||
12 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
13 | --- | ||
14 | configure.ac | 2 +- | ||
15 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
16 | |||
17 | diff --git a/configure.ac b/configure.ac | ||
18 | index b7e17d356..8c1fab0ea 100644 | ||
19 | --- a/configure.ac | ||
20 | +++ b/configure.ac | ||
21 | @@ -1372,7 +1372,7 @@ case "${enable_vtysh}" in | ||
22 | AC_DEFINE([VTYSH], [1], [VTY shell]) | ||
23 | |||
24 | prev_libs="$LIBS" | ||
25 | - AC_CHECK_LIB([readline], [main], [ | ||
26 | + AC_CHECK_LIB([readline], [readline], [ | ||
27 | LIBREADLINE="-lreadline" | ||
28 | ], [ | ||
29 | dnl readline failed - it might be incorrectly linked and missing its | ||
30 | -- | ||
31 | 2.37.3 | ||
32 | |||
diff --git a/meta-networking/recipes-protocols/frr/frr/0001-m4-ax_python.m4-check-for-python-x.y-emded.pc-not-py.patch b/meta-networking/recipes-protocols/frr/frr/0001-m4-ax_python.m4-check-for-python-x.y-emded.pc-not-py.patch index 9e5cfd8f55..872a67c784 100644 --- a/meta-networking/recipes-protocols/frr/frr/0001-m4-ax_python.m4-check-for-python-x.y-emded.pc-not-py.patch +++ b/meta-networking/recipes-protocols/frr/frr/0001-m4-ax_python.m4-check-for-python-x.y-emded.pc-not-py.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From 6a2984718d7c47612b07be46d663e7b5e5b7c57d Mon Sep 17 00:00:00 2001 | 1 | From a82d704b1ec6ece47b01d12e0e067d4b62b10894 Mon Sep 17 00:00:00 2001 |
2 | From: Alexander Kanavin <alex@linutronix.de> | 2 | From: Alexander Kanavin <alex@linutronix.de> |
3 | Date: Wed, 9 Nov 2022 20:24:45 +0100 | 3 | Date: Wed, 9 Nov 2022 20:24:45 +0100 |
4 | Subject: [PATCH] m4/ax_python.m4: check for python-x.y-emded.pc, not | 4 | Subject: [PATCH] m4/ax_python.m4: check for python-x.y-emded.pc, not |
@@ -7,7 +7,9 @@ Subject: [PATCH] m4/ax_python.m4: check for python-x.y-emded.pc, not | |||
7 | Only the embed version includes necessary linker flags to link | 7 | Only the embed version includes necessary linker flags to link |
8 | with libpython. | 8 | with libpython. |
9 | 9 | ||
10 | Upstream-Status: Submitted [https://github.com/FRRouting/frr/pull/12298] | 10 | Upstream-Status: Backport |
11 | [https://github.com/FRRouting/frr/commit/a82d704b1ec6ece47b01d12e0e067d4b62b10894] | ||
12 | |||
11 | Signed-off-by: Alexander Kanavin <alex@linutronix.de> | 13 | Signed-off-by: Alexander Kanavin <alex@linutronix.de> |
12 | --- | 14 | --- |
13 | m4/ax_python.m4 | 2 +- | 15 | m4/ax_python.m4 | 2 +- |
@@ -26,3 +28,6 @@ index 91d12b99b..f5e603b96 100644 | |||
26 | pkg="${pkg%-}" | 28 | pkg="${pkg%-}" |
27 | _PKG_CONFIG([PYTHON_CFLAGS], [cflags], [${pkg}]) | 29 | _PKG_CONFIG([PYTHON_CFLAGS], [cflags], [${pkg}]) |
28 | _PKG_CONFIG([PYTHON_LIBS], [libs], [${pkg}]) | 30 | _PKG_CONFIG([PYTHON_LIBS], [libs], [${pkg}]) |
31 | -- | ||
32 | 2.25.1 | ||
33 | |||
diff --git a/meta-networking/recipes-protocols/frr/frr/0001-ospfd-Adding-SUPPORT_OSPF_API-define-in-ospf_spf.c.patch b/meta-networking/recipes-protocols/frr/frr/0001-ospfd-Adding-SUPPORT_OSPF_API-define-in-ospf_spf.c.patch deleted file mode 100644 index 09988946b6..0000000000 --- a/meta-networking/recipes-protocols/frr/frr/0001-ospfd-Adding-SUPPORT_OSPF_API-define-in-ospf_spf.c.patch +++ /dev/null | |||
@@ -1,48 +0,0 @@ | |||
1 | From ec3bb054c331f9d928ac21a1747e0f921b51dfbc Mon Sep 17 00:00:00 2001 | ||
2 | From: Michal Ruprich <michalruprich@gmail.com> | ||
3 | Date: Tue, 6 Sep 2022 12:25:01 +0200 | ||
4 | Subject: [PATCH] ospfd: Adding SUPPORT_OSPF_API define in ospf_spf.c | ||
5 | |||
6 | It is not possible to build ospf_spf.c file with --disable-ospfapi because | ||
7 | ospf_apiserver.c has SUPPORT_OSPF_API around all function definitions and | ||
8 | that results in an undefined reference to the ospf_apiserver_notify_reachable | ||
9 | function error while building. | ||
10 | |||
11 | Signed-off-by: Michal Ruprich <mruprich@redhat.com> | ||
12 | |||
13 | Upstream-Status: Backport | ||
14 | [https://github.com/FRRouting/frr/commit/ec3bb054c331f9d928ac21a1747e0f921b51dfbc] | ||
15 | |||
16 | Signed-off-by: Yi Zhao <yi.zhao@windriver.com> | ||
17 | --- | ||
18 | ospfd/ospf_spf.c | 5 +++++ | ||
19 | 1 file changed, 5 insertions(+) | ||
20 | |||
21 | diff --git a/ospfd/ospf_spf.c b/ospfd/ospf_spf.c | ||
22 | index 46492ff6b..4edc1de81 100644 | ||
23 | --- a/ospfd/ospf_spf.c | ||
24 | +++ b/ospfd/ospf_spf.c | ||
25 | @@ -48,7 +48,10 @@ | ||
26 | #include "ospfd/ospf_sr.h" | ||
27 | #include "ospfd/ospf_ti_lfa.h" | ||
28 | #include "ospfd/ospf_errors.h" | ||
29 | + | ||
30 | +#ifdef SUPPORT_OSPF_API | ||
31 | #include "ospfd/ospf_apiserver.h" | ||
32 | +#endif | ||
33 | |||
34 | /* Variables to ensure a SPF scheduled log message is printed only once */ | ||
35 | |||
36 | @@ -1895,7 +1898,9 @@ static void ospf_spf_calculate_schedule_worker(struct thread *thread) | ||
37 | /* Update all routers routing table */ | ||
38 | ospf->oall_rtrs = ospf->all_rtrs; | ||
39 | ospf->all_rtrs = all_rtrs; | ||
40 | +#ifdef SUPPORT_OSPF_API | ||
41 | ospf_apiserver_notify_reachable(ospf->oall_rtrs, ospf->all_rtrs); | ||
42 | +#endif | ||
43 | |||
44 | /* Free old ABR/ASBR routing table */ | ||
45 | if (ospf->old_rtrs) | ||
46 | -- | ||
47 | 2.25.1 | ||
48 | |||
diff --git a/meta-networking/recipes-protocols/frr/frr_8.3.1.bb b/meta-networking/recipes-protocols/frr/frr_8.4.1.bb index 67d50e3edc..d3c86e7d75 100644 --- a/meta-networking/recipes-protocols/frr/frr_8.3.1.bb +++ b/meta-networking/recipes-protocols/frr/frr_8.4.1.bb | |||
@@ -9,16 +9,12 @@ LICENSE = "GPL-2.0-only & LGPL-2.1-only" | |||
9 | LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ | 9 | LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ |
10 | file://COPYING-LGPLv2.1;md5=4fbd65380cdd255951079008b364516c" | 10 | file://COPYING-LGPLv2.1;md5=4fbd65380cdd255951079008b364516c" |
11 | 11 | ||
12 | SRC_URI = "git://github.com/FRRouting/frr.git;protocol=https;branch=stable/8.3 \ | 12 | SRC_URI = "git://github.com/FRRouting/frr.git;protocol=https;branch=stable/8.4 \ |
13 | file://0001-configure-Check-for-readline-function-instead-of-mai.patch \ | ||
14 | file://0001-ospfd-Adding-SUPPORT_OSPF_API-define-in-ospf_spf.c.patch \ | ||
15 | file://0001-bgpd-avoid-notify-race-between-io-and-main-pthreads.patch \ | ||
16 | file://0001-bgpd-Make-sure-hdr-length-is-at-a-minimum-of-what-is.patch \ | ||
17 | file://frr.pam \ | 13 | file://frr.pam \ |
18 | file://0001-m4-ax_python.m4-check-for-python-x.y-emded.pc-not-py.patch \ | 14 | file://0001-m4-ax_python.m4-check-for-python-x.y-emded.pc-not-py.patch \ |
19 | " | 15 | " |
20 | 16 | ||
21 | SRCREV = "a74f7a9ad9623e6f9654fe4a7177e5da0b194828" | 17 | SRCREV = "70151e264bbb697a10fed711aa8c937d4f0009b1" |
22 | 18 | ||
23 | S = "${WORKDIR}/git" | 19 | S = "${WORKDIR}/git" |
24 | 20 | ||