---
title: "CVE-2022-40318\n    | Ubuntu"
description: Ubuntu is an open source software operating system that runs from the
  desktop, to the cloud, to all your internet connected things.
url: https://ubuntu.com/security/CVE-2022-40318?format=md
keywords: index, follow
---

# CVE-2022-40318

Publication date 3 May 2023

Last updated 25 August 2025

---

Ubuntu priority

**Medium**

[Why this priority?](https://ubuntu.com/security/cves/about#priority )

## Cvss 3 Severity Score

**6.5 · Medium**

[Score breakdown](https://ubuntu.com/security/CVE-2022-40318?format=md#impact-score)

Toggle side navigation

## Description

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.

[Read the notes from the security team](https://ubuntu.com/security/CVE-2022-40318?format=md#notes)

## Status

Show unmaintained releases

| Package | Ubuntu Release | Status |
| --- | --- | --- |
| frr | 23.04 lunar | Not affected |
| 22.10 kinetic | Not affected |
| 22.04 LTS jammy | Not affected |
| 20.04 LTS focal | Not affected |
| 18.04 LTS bionic | Not in release |
| 16.04 LTS xenial | Not in release |
| 14.04 LTS trusty | Not in release |

---

* [How can I get the fixes?](https://ubuntu.com/security/cves/about#security)
* [What do statuses mean?](https://ubuntu.com/security/cves/about#statuses)
* [Patch details](https://ubuntu.com/security/CVE-2022-40318?format=md#patch-details)

## Notes

---

### [mdeslaur](https://launchpad.net/~mdeslaur)

Commits below fix CVE-2022-40302, CVE-2022-40318, CVE-2022-43681
Introduced by https://github.com/FRRouting/frr/commit/d08c0c8077fbb3e100ed2e87927edec1a09d224b

### Patch details

For informational purposes only. We recommend not to cherry-pick updates. [How can I get the fixes?](https://ubuntu.com/security/cves/about#security)

| Package | Patch details |
| --- | --- |
| frr | * Upstream:   [1117bac](https://github.com/FRRouting/frr/commit/1117baca3c592877a4d8a13ed6a1d9bd83977487) * Upstream:   [3e46b43](https://github.com/FRRouting/frr/commit/3e46b43e3788f0f87bae56a86b54d412b4710286) * Upstream:   [766eec1](https://github.com/FRRouting/frr/commit/766eec1b7accffe2c04a5c9ebb14e9f487bb9f78) |

## Severity score breakdown

CVSS version:
CVSS v3.0

**Base score**

6.5 · Medium

* Base metrics

  | Parameter | Value |
  | --- | --- |
  | Attack vector | Network |
  | Attack complexity | Low |
  | Privileges required | Low |
  | User interaction | None |
  | Scope | Unchanged |
  | Confidentiality impact | None |
  | Integrity impact | None |
  | Availability impact | High |
* Scores

  | Parameter | Value |
  | --- | --- |
  | Base score | 6.5 · Medium |
  | Exploitability score | - |
  | Impact score | - |

**Vector:** CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H

## References

* [MITRE](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-40318)
* [NVD](https://nvd.nist.gov/vuln/detail/CVE-2022-40318)
* [Launchpad](https://launchpad.net/bugs/cve/CVE-2022-40318)
* [Debian](https://security-tracker.debian.org/tracker/CVE-2022-40318)

### Other references

* <https://www.cve.org/CVERecord?id=CVE-2022-40318>
