Every CVE Search/ Get API key

CVE-2022-40318

An issue was discovered in bgpd in FRRouting (FRR) through 8.4. By crafting a BGP OPEN message...

6.5 MediumFix available

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.

Attack profile

How easy it is to exploit

Attack vector
Network
Complexity
Low
Privileges needed
Low
User interaction
None

What an attacker can affect

Confidentiality
None
Integrity
None
Availability
High

Exploit likelihood

1.98%Up 1.9 points since May 4, 2023
90%50%10%1%

What each source reports

NVD Score used 6.5

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.

Record
CVE-2022-40318
CVSS 3.1
6.5 MediumCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
Weakness
CWE-125
Updated
2026-11-02
CVE List No score

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.

Record
CVE-2022-40318
Updated
2026-11-02
EUVDEUVD-2022-43609 No score

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.

Record
EUVD-2022-43609
Updated
2026-11-03
GitHub AdvisoriesGHSA-9rqq-99cf-35g5 7.5

An issue was discovered in bgpd in FRRouting (FRR) through 8.4. By crafting a BGP OPEN message...

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.

Record
GHSA-9rqq-99cf-35g5
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Weakness
CWE-125
Updated
2026-11-02
OSVDEBIAN-CVE-2022-40318 6.5

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.

Record
DEBIAN-CVE-2022-40318
CVSS 3.1
6.5 MediumCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
Updated
2026-11-03
OSVRHSA-2023:6434 7.5

Red Hat Security Advisory: frr security and bug fix update

Record
RHSA-2023:6434
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Updated
2026-11-02
Show 4 moreShow less
OSVUBUNTU-CVE-2022-40318 6.5

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.

Record
UBUNTU-CVE-2022-40318
CVSS 3.1
6.5 MediumCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
Updated
2026-11-02
OSVALSA-2023:6434 No score

Moderate: frr security and bug fix update

FRRouting is free software that manages TCP/IP based routing protocols. It supports BGP4, OSPFv2, OSPFv3, ISIS, RIP, RIPng, PIM, NHRP, PBR, EIGRP and BFD.

Security Fix(es):

  • frr: Reachable assertion in peek_for_as4_capability function (CVE-2022-36440)
  • frr: denial of service by crafting a BGP OPEN message with an option of type 0xff (CVE-2022-40302)
  • frr: denial of service by crafting a BGP OPEN message with an option of type in bgp_open_option_parse in the bgp_open.c 0xff (CVE-2022-40318)
  • frr: out-of-bounds read exists in the BGP daemon of FRRouting (CVE-2022-43681)

For more details about the security issue(s), including the impact, a CVSS score, acknowledgments, and other related information, refer to the CVE page(s) listed in the References section.

Additional Changes:

For detailed information on changes in this release, see the AlmaLinux Release Notes linked from the References section.

Record
ALSA-2023:6434
Updated
2026-11-02
OSVCLSA-2026-1778238289 No score

frr: Fix of 4 CVEs

  • CVE-2022-43681: fix bgpd crash on malformed BGP OPEN messages with insufficient data
  • CVE-2022-40318: fix out-of-bounds read in bgp_open_option_parse with extended option params
  • CVE-2023-31489: fix out-of-bounds read in BGP Long-lived Graceful-Restart capability parsing
  • CVE-2023-46752: fix bgpd crash on malformed MP_REACH_NLRI packets
Record
CLSA-2026-1778238289
Updated
2026-11-02
OSV No score

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.

Record
CVE-2022-40318
Updated
2026-11-02

Affected products

Affected packages

Affected packages
PackageAffectedFixed
frr
AlmaLinux:9
before 8.3.1-11.el9_3.alma.1
8.3.1-11.el9_3.alma.1
frr-selinux
AlmaLinux:9
before 8.3.1-11.el9_3.alma.1
8.3.1-11.el9_3.alma.1
frr
TuxCare:AlmaLinux:9.2
before 8.3.1-5.el9_2.2.alma.tuxcare.els4
8.3.1-5.el9_2.2.alma.tuxcare.els4
frr-selinux
TuxCare:AlmaLinux:9.2
before 8.3.1-5.el9_2.2.alma.tuxcare.els4
8.3.1-5.el9_2.2.alma.tuxcare.els4
frr
Debian:12
before 8.4.1-1
8.4.1-1
frr
Debian:13
before 8.4.1-1
8.4.1-1
frr
Debian:14
before 8.4.1-1
8.4.1-1
frr
Debian:10
before 7.5.1-1.1+deb10u1, plus listed versions
6.0.2-26.0.2-2+deb10u16.0.2-2+deb10u27.2-17.2.1-1
Show 7 moreShow less
7.3.1-17.4-17.4-1.17.4-27.5-17.5.1-17.5.1-1.1
7.5.1-1.1+deb10u1
frr
Red Hat:enterprise_linux:9::appstream
before 0:8.3.1-11.el9_3
0:8.3.1-11.el9_3
frr-debuginfo
Red Hat:enterprise_linux:9::appstream
before 0:8.3.1-11.el9_3
0:8.3.1-11.el9_3
frr-debugsource
Red Hat:enterprise_linux:9::appstream
before 0:8.3.1-11.el9_3
0:8.3.1-11.el9_3
frr-selinux
Red Hat:enterprise_linux:9::appstream
before 0:8.3.1-11.el9_3
0:8.3.1-11.el9_3

History

History
RecordedChangedSources
affected
aliasesEUVD
first indexedCVE List, GitHub Advisories, NVD, OSV

Dates are when Every CVE recorded each change. Upstream dates may differ.

In short

CVE-2022-40318 is a medium vulnerability (CVSS 6.5) in Frrouting, published May 3, 2023. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 1.98%, the 80th percentile. Fixed in frr 8.3.1-11.el9_3.alma.1.

References

Show 29 moreShow less
MoveEnter Open