Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

frr: fix latest CVEs #688

Closed

Conversation

KanjiMonster
Copy link
Contributor

Add/backport patches for the latest round of CVEs:

First two taken from stable/8.2, last one cherry-picked from master.

Reference:
https://cyberriskleaders.com/new-vulnerabilities-disclosed-in-frrouting-software/

Add a security fix from the stable/8.2 branch for two CVEs for the same
vulneratiblity:

CVE-2022-36440:
A reachable assertion was found in Frrouting frr-bgpd 8.3.0 in the
peek_for_as4_capability function. Attackers can maliciously construct
BGP open packets and send them to BGP peers running frr-bgpd, resulting
in DoS.

CVE-2022-40302:
An issue was discovered in bgpd in FRRouting (FRR) through 8.4. By
crafting a BGP OPEN message with an option of type 0xff (Extended Length
from RFC 9072), attackers may cause a denial of service (assertion
failure and daemon restart, or out-of-bounds read). This is possible
because of inconsistent boundary checks that do not account for reading
3 bytes (instead of 2) in this 0xff case.

Reference:
https://nvd.nist.gov/vuln/detail/CVE-2022-36440
https://nvd.nist.gov/vuln/detail/CVE-2022-40302
https://cyberriskleaders.com/new-vulnerabilities-disclosed-in-frrouting-software/
FRRouting/frr#13202

Patch from:
FRRouting/frr@02a0e45

Signed-off-by: Jonas Gorski <[email protected]>
Add a security fix from the stable/8.2 branch:

CVE-2022-40318:
An issue was discovered in bgpd in FRRouting (FRR) through 8.4. By
crafting a BGP OPEN message with an option of type 0xff (Extended Length
from RFC 9072), attackers may cause a denial of service (assertion
failure and daemon restart, or out-of-bounds read). This is possible
because of inconsistent boundary checks that do not account for reading
3 bytes (instead of 2) in this 0xff case. NOTE: this behavior occurs in
bgp_open_option_parse in the bgp_open.c file, a different location (with
a different attack vector) relative to CVE-2022-40302.

Reference:
https://nvd.nist.gov/vuln/detail/CVE-2022-40318
https://cyberriskleaders.com/new-vulnerabilities-disclosed-in-frrouting-software/

Patch from:
FRRouting/frr@72088b0

Signed-off-by: Jonas Gorski <[email protected]>
Add a security fix cherry-picked from master:

CVE-2022-40318:
An out-of-bounds read exists in the BGP daemon of FRRouting FRR through
8.4. When sending a malformed BGP OPEN message that ends with the option
length octet (or the option length word, in case of an extended OPEN
message), the FRR code reads of out of the bounds of the packet,
throwing a SIGABRT signal and exiting. This results in a bgpd daemon
restart, causing a Denial-of-Service condition.

Reference:
https://nvd.nist.gov/vuln/detail/CVE-2022-43681
https://cyberriskleaders.com/new-vulnerabilities-disclosed-in-frrouting-software/

Patch from:
FRRouting/frr@766eec1

Signed-off-by: Jonas Gorski <[email protected]>
@KanjiMonster
Copy link
Contributor Author

Update for langdale is #689, master and mickledore are unaffected as these issues were already fixed in the original 8.4 release.

@KanjiMonster
Copy link
Contributor Author

Is there anything I can do to help getting this applied? Both PRs were build tested and shortly runtested via a simple bgp setup across 4 machines.

@akuster
Copy link
Contributor

akuster commented May 24, 2023

I grabbed these this morning.

@KanjiMonster
Copy link
Contributor Author

Great, thanks for the update!

KanjiMonster added a commit to bisdn/meta-bisdn-linux that referenced this pull request Jun 2, 2023
Fix frr CVEs CVE-2022-36440, CVE-2022-40318, CVE-2022-43681 locally
until the fixes get merged at OE upstream.

Reference: openembedded/meta-openembedded#688

Signed-off-by: Jonas Gorski <[email protected]>
jklare pushed a commit to bisdn/meta-bisdn-linux that referenced this pull request Jun 2, 2023
Fix frr CVEs CVE-2022-36440, CVE-2022-40318, CVE-2022-43681 locally
until the fixes get merged at OE upstream.

Reference: openembedded/meta-openembedded#688

Signed-off-by: Jonas Gorski <[email protected]>
@kraj
Copy link
Contributor

kraj commented Jul 3, 2023

applied as of 3670781 on kirkstone

@kraj kraj closed this Jul 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants