diff options
author | Yi Zhao <yi.zhao@windriver.com> | 2022-10-13 10:12:18 +0800 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2022-10-12 19:19:27 -0700 |
commit | 9628ca83c20c0fce6b20461785f4324fc42ef274 (patch) | |
tree | 1da16c3cb6712ea55349bf6c41e834be80abdd35 /meta-networking | |
parent | 6e2cfa4113766f703e55d711bf59ed3c8f17d5a2 (diff) | |
download | meta-openembedded-9628ca83c20c0fce6b20461785f4324fc42ef274.tar.gz |
frr: Security fix CVE-2022-37032
CVE-2022-37032:
An out-of-bounds read in the BGP daemon of FRRouting FRR before 8.4 may
lead to a segmentation fault and denial of service. This occurs in
bgp_capability_msg_parse in bgpd/bgp_packet.c.
Reference:
https://nvd.nist.gov/vuln/detail/CVE-2022-37032
Patch from:
https://github.com/FRRouting/frr/commit/066770ac1c69ee5b484bb82581b22ad0423b004d
Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-networking')
-rw-r--r-- | meta-networking/recipes-protocols/frr/frr/0001-bgpd-Make-sure-hdr-length-is-at-a-minimum-of-what-is.patch | 43 | ||||
-rw-r--r-- | meta-networking/recipes-protocols/frr/frr_8.3.1.bb | 1 |
2 files changed, 44 insertions, 0 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 new file mode 100644 index 000000000..52b39c1e8 --- /dev/null +++ b/meta-networking/recipes-protocols/frr/frr/0001-bgpd-Make-sure-hdr-length-is-at-a-minimum-of-what-is.patch | |||
@@ -0,0 +1,43 @@ | |||
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_8.3.1.bb b/meta-networking/recipes-protocols/frr/frr_8.3.1.bb index c69720e6f..1abea6345 100644 --- a/meta-networking/recipes-protocols/frr/frr_8.3.1.bb +++ b/meta-networking/recipes-protocols/frr/frr_8.3.1.bb | |||
@@ -13,6 +13,7 @@ SRC_URI = "git://github.com/FRRouting/frr.git;protocol=https;branch=stable/8.3 \ | |||
13 | file://0001-configure-Check-for-readline-function-instead-of-mai.patch \ | 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 \ | 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 \ | 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 \ | ||
16 | file://frr.pam \ | 17 | file://frr.pam \ |
17 | " | 18 | " |
18 | 19 | ||