# CVE-2022-49959: openvswitch: fix memory leak at failed datapath creation

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** MEDIUM 5.5
- **CVSS:** 5.5 (v3.1, NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: None; Integrity impact: None; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.27% (percentile 13, 2026-11-26)
- **CWE:** CWE-401
- **Published:** 2025-06-18T11:00:20.749Z
- **Modified:** 2026-06-17T05:19:37.580Z

## Who should check

- Anyone running Linux \>= b83d23a2a38b1770da0491257ae81d52307f7816, \< ca54b2bfaab385778e55a9fd33f6c31e7f743b48; \>= b83d23a2a38b1770da0491257ae81d52307f7816, \< c0c1c0241917459644326a1a3102207c871ae159; \>= b83d23a2a38b1770da0491257ae81d52307f7816, \< a87406f4adee9c53b311d8a1ba2849c69e29a6d0
- Anyone running Linux 5.15

## Description

In the Linux kernel, the following vulnerability has been resolved:

openvswitch: fix memory leak at failed datapath creation

ovs\_dp\_cmd\_new()-\>ovs\_dp\_change()-\>ovs\_dp\_set\_upcall\_portids()
allocates array via kmalloc.
If for some reason new\_vport() fails during ovs\_dp\_cmd\_new()
dp-\>upcall\_portids must be freed.
Add missing kfree.

Kmemleak example:
unreferenced object 0xffff88800c382500 (size 64):
  comm "dump\_state", pid 323, jiffies 4294955418 (age 104.347s)
  hex dump (first 32 bytes):
    5e c2 79 e4 1f 7a 38 c7 09 21 38 0c 80 88 ff ff  ^.y..z8..!8.....
    03 00 00 00 0a 00 00 00 14 00 00 00 28 00 00 00  ............(...
  backtrace:
    \[\<0000000071bebc9f\>\] ovs\_dp\_set\_upcall\_portids+0x38/0xa0
    \[\<000000000187d8bd\>\] ovs\_dp\_change+0x63/0xe0
    \[\<000000002397e446\>\] ovs\_dp\_cmd\_new+0x1f0/0x380
    \[\<00000000aa06f36e\>\] genl\_family\_rcv\_msg\_doit+0xea/0x150
    \[\<000000008f583bc4\>\] genl\_rcv\_msg+0xdc/0x1e0
    \[\<00000000fa10e377\>\] netlink\_rcv\_skb+0x50/0x100
    \[\<000000004959cece\>\] genl\_rcv+0x24/0x40
    \[\<000000004699ac7f\>\] netlink\_unicast+0x23e/0x360
    \[\<00000000c153573e\>\] netlink\_sendmsg+0x24e/0x4b0
    \[\<000000006f4aa380\>\] sock\_sendmsg+0x62/0x70
    \[\<00000000d0068654\>\] \_\_\_\_sys\_sendmsg+0x230/0x270
    \[\<0000000012dacf7d\>\] \_\_\_sys\_sendmsg+0x88/0xd0
    \[\<0000000011776020\>\] \_\_sys\_sendmsg+0x59/0xa0
    \[\<000000002e8f2dc1\>\] do\_syscall\_64+0x3b/0x90
    \[\<000000003243e7cb\>\] entry\_SYSCALL\_64\_after\_hwframe+0x63/0xcd

## Affected and fixed versions

- Linux: \>= b83d23a2a38b1770da0491257ae81d52307f7816, \< ca54b2bfaab385778e55a9fd33f6c31e7f743b48; \>= b83d23a2a38b1770da0491257ae81d52307f7816, \< c0c1c0241917459644326a1a3102207c871ae159; \>= b83d23a2a38b1770da0491257ae81d52307f7816, \< a87406f4adee9c53b311d8a1ba2849c69e29a6d0 (cvelist)
- Linux: 5.15 (cvelist)

## Mitigation

- No fix listed yet: follow the vendor advisory.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2022-49959. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2022-49959.md
Affected: Linux >= b83d23a2a38b1770da0491257ae81d52307f7816, < ca54b2bfaab385778e55a9fd33f6c31e7f743b48; >= b83d23a2a38b1770da0491257ae81d52307f7816, < c0c1c0241917459644326a1a3102207c871ae159; >= b83d23a2a38b1770da0491257ae81d52307f7816, < a87406f4adee9c53b311d8a1ba2849c69e29a6d0; Linux 5.15
Fixed in: no fixed version listed yet

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2022-49959 being exploited?

There is no confirmed exploitation: CVE-2022-49959 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.27% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2022-49959?

Medium: CVSS 5.5 (v3.1, scored by NVD). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2022-49959?

Linux \>= b83d23a2a38b1770da0491257ae81d52307f7816, \< ca54b2bfaab385778e55a9fd33f6c31e7f743b48; \>= b83d23a2a38b1770da0491257ae81d52307f7816, \< c0c1c0241917459644326a1a3102207c871ae159; \>= b83d23a2a38b1770da0491257ae81d52307f7816, \< a87406f4adee9c53b311d8a1ba2849c69e29a6d0; Linux 5.15.

### Is there a fix for CVE-2022-49959?

No fixed version is listed in the sources yet. No fix listed yet: follow the vendor advisory.

### How do I check if I'm affected by CVE-2022-49959?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <https://git.kernel.org/stable/c/ca54b2bfaab385778e55a9fd33f6c31e7f743b48>
- patch: <https://git.kernel.org/stable/c/c0c1c0241917459644326a1a3102207c871ae159>
- patch: <https://git.kernel.org/stable/c/a87406f4adee9c53b311d8a1ba2849c69e29a6d0>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2022-49959>

HTML: <https://flawdb.com/CVE-2022-49959> · JSON: <https://flawdb.com/api/v1/entries/CVE-2022-49959>
