# CVE-2020-14364: Memory corruption in QEMU

> A guest user can trigger out-of-bounds access in QEMU's USB emulator to crash the host or execute arbitrary code with host privileges.

- **Severity:** Medium 5.0 (`CVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:C/C:L/I:L/A:L`)
- **Exploited in the wild:** Not known
- **Login needed:** An administrator
- **Attackable:** Local or same network only
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 31 Aug 2020
- **Updated:** 4 Aug 2024
- **Also known as:** ALPINE-CVE-2020-14364, DEBIAN-CVE-2020-14364, GHSA-fq9g-vccc-q7c7, RHSA-2020:4047, RHSA-2020:4048, RHSA-2020:4049, RHSA-2020:4050, RHSA-2020:4051, RHSA-2020:4052, RHSA-2020:4053, RHSA-2020:4054, RHSA-2020:4055, RHSA-2020:4056, RHSA-2020:4058, RHSA-2020:4078, RHSA-2020:4111, RHSA-2020:4162, RHSA-2020:4176, RHSA-2020:4291, UBUNTU-CVE-2020-14364, USN-4511-1

## What is CVE-2020-14364?

CVE-2020-14364 is a medium-severity memory corruption vulnerability in Canonical Ubuntu Linux, published on 31 Aug 2020. It can only be exploited from the same machine or local network, with no action from the victim.

### Official description

An out-of-bounds read/write access flaw was found in the USB emulator of the QEMU in versions before 5.2.0. This issue occurs while processing USB packets from a guest when USBDevice 'setup_len' exceeds its 'data_buf[4096]' in the do_token_in, do_token_out routines. This flaw allows a guest user to crash the QEMU process, resulting in a denial of service, or the potential execution of arbitrary code with the privileges of the QEMU process on the host.

Weakness: CWE-787 (Out-of-bounds Write), CWE-125 (Out-of-bounds Read)

## Which versions are affected by CVE-2020-14364?

It affects 7 products.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `SLOF` | Red Hat:advanced_virtualization:8.2::el8 | All versions | 0:20191022-3.git899d9883.module+el8.2.0+5449+efc036dd |
| `hivex` | Red Hat:advanced_virtualization:8.2::el8 | All versions | 0:1.3.18-20.module+el8.2.0+5588+63a201c3 |
| `hivex-debuginfo` | Red Hat:advanced_virtualization:8.2::el8 | All versions | 0:1.3.18-20.module+el8.2.0+5588+63a201c3 |
| `hivex-debugsource` | Red Hat:advanced_virtualization:8.2::el8 | All versions | 0:1.3.18-20.module+el8.2.0+5588+63a201c3 |
| `hivex-devel` | Red Hat:advanced_virtualization:8.2::el8 | All versions | 0:1.3.18-20.module+el8.2.0+5588+63a201c3 |
| `libguestfs` | Red Hat:advanced_virtualization:8.2::el8 | All versions | 1:1.40.2-24.module+el8.2.1+7154+47ffd890 |
| `libguestfs-bash-completion` | Red Hat:advanced_virtualization:8.2::el8 | All versions | 1:1.40.2-24.module+el8.2.1+7154+47ffd890 |
| `libguestfs-benchmarking` | Red Hat:advanced_virtualization:8.2::el8 | All versions | 1:1.40.2-24.module+el8.2.1+7154+47ffd890 |
| `libguestfs-benchmarking-debuginfo` | Red Hat:advanced_virtualization:8.2::el8 | All versions | 1:1.40.2-24.module+el8.2.1+7154+47ffd890 |
| `libguestfs-debuginfo` | Red Hat:advanced_virtualization:8.2::el8 | All versions | 1:1.40.2-24.module+el8.2.1+7154+47ffd890 |
| `libguestfs-debugsource` | Red Hat:advanced_virtualization:8.2::el8 | All versions | 1:1.40.2-24.module+el8.2.1+7154+47ffd890 |
| `libguestfs-devel` | Red Hat:advanced_virtualization:8.2::el8 | All versions | 1:1.40.2-24.module+el8.2.1+7154+47ffd890 |
| `libguestfs-gfs2` | Red Hat:advanced_virtualization:8.2::el8 | All versions | 1:1.40.2-24.module+el8.2.1+7154+47ffd890 |
| `libguestfs-gobject` | Red Hat:advanced_virtualization:8.2::el8 | All versions | 1:1.40.2-24.module+el8.2.1+7154+47ffd890 |
| `libguestfs-gobject-debuginfo` | Red Hat:advanced_virtualization:8.2::el8 | All versions | 1:1.40.2-24.module+el8.2.1+7154+47ffd890 |
| `libguestfs-gobject-devel` | Red Hat:advanced_virtualization:8.2::el8 | All versions | 1:1.40.2-24.module+el8.2.1+7154+47ffd890 |
| `libguestfs-inspect-icons` | Red Hat:advanced_virtualization:8.2::el8 | All versions | 1:1.40.2-24.module+el8.2.1+7154+47ffd890 |
| `libguestfs-java` | Red Hat:advanced_virtualization:8.2::el8 | All versions | 1:1.40.2-24.module+el8.2.1+7154+47ffd890 |
| `libguestfs-java-debuginfo` | Red Hat:advanced_virtualization:8.2::el8 | All versions | 1:1.40.2-24.module+el8.2.1+7154+47ffd890 |
| `libguestfs-java-devel` | Red Hat:advanced_virtualization:8.2::el8 | All versions | 1:1.40.2-24.module+el8.2.1+7154+47ffd890 |
| `libguestfs-javadoc` | Red Hat:advanced_virtualization:8.2::el8 | All versions | 1:1.40.2-24.module+el8.2.1+7154+47ffd890 |
| `libguestfs-man-pages-ja` | Red Hat:advanced_virtualization:8.2::el8 | All versions | 1:1.40.2-24.module+el8.2.1+7154+47ffd890 |
| `libguestfs-man-pages-uk` | Red Hat:advanced_virtualization:8.2::el8 | All versions | 1:1.40.2-24.module+el8.2.1+7154+47ffd890 |
| `libguestfs-rescue` | Red Hat:advanced_virtualization:8.2::el8 | All versions | 1:1.40.2-24.module+el8.2.1+7154+47ffd890 |
| `libguestfs-rsync` | Red Hat:advanced_virtualization:8.2::el8 | All versions | 1:1.40.2-24.module+el8.2.1+7154+47ffd890 |
| `libguestfs-tools` | Red Hat:advanced_virtualization:8.2::el8 | All versions | 1:1.40.2-24.module+el8.2.1+7154+47ffd890 |
| `libguestfs-tools-c` | Red Hat:advanced_virtualization:8.2::el8 | All versions | 1:1.40.2-24.module+el8.2.1+7154+47ffd890 |
| `libguestfs-tools-c-debuginfo` | Red Hat:advanced_virtualization:8.2::el8 | All versions | 1:1.40.2-24.module+el8.2.1+7154+47ffd890 |
| `libguestfs-winsupport` | Red Hat:advanced_virtualization:8.2::el8 | All versions | 0:8.2-1.module+el8.2.0+5590+82cd80df |
| `libguestfs-xfs` | Red Hat:advanced_virtualization:8.2::el8 | All versions | 1:1.40.2-24.module+el8.2.1+7154+47ffd890 |
| `libiscsi` | Red Hat:advanced_virtualization:8.2::el8 | All versions | 0:1.18.0-8.module+el8.2.0+4793+b09dd2fb |
| `libiscsi-debuginfo` | Red Hat:advanced_virtualization:8.2::el8 | All versions | 0:1.18.0-8.module+el8.2.0+4793+b09dd2fb |
| `libiscsi-debugsource` | Red Hat:advanced_virtualization:8.2::el8 | All versions | 0:1.18.0-8.module+el8.2.0+4793+b09dd2fb |
| `libiscsi-devel` | Red Hat:advanced_virtualization:8.2::el8 | All versions | 0:1.18.0-8.module+el8.2.0+4793+b09dd2fb |
| `libiscsi-utils` | Red Hat:advanced_virtualization:8.2::el8 | All versions | 0:1.18.0-8.module+el8.2.0+4793+b09dd2fb |
| `libiscsi-utils-debuginfo` | Red Hat:advanced_virtualization:8.2::el8 | All versions | 0:1.18.0-8.module+el8.2.0+4793+b09dd2fb |
| `libnbd` | Red Hat:advanced_virtualization:8.2::el8 | All versions | 0:1.2.2-1.module+el8.2.0+5644+32ac38d4 |
| `libnbd-debuginfo` | Red Hat:advanced_virtualization:8.2::el8 | All versions | 0:1.2.2-1.module+el8.2.0+5644+32ac38d4 |
| `libnbd-debugsource` | Red Hat:advanced_virtualization:8.2::el8 | All versions | 0:1.2.2-1.module+el8.2.0+5644+32ac38d4 |
| `libnbd-devel` | Red Hat:advanced_virtualization:8.2::el8 | All versions | 0:1.2.2-1.module+el8.2.0+5644+32ac38d4 |

Products: Canonical Ubuntu Linux, Debian Debian Linux, Fedoraproject Fedora, Opensuse Leap, Qemu Qemu, Redhat Enterprise Linux, Redhat Openstack.

## How do I fix CVE-2020-14364?

Upgrade to a fixed version.

## Is CVE-2020-14364 being exploited?

There is no known exploitation of CVE-2020-14364 in the wild and no public exploit code.

Public exploit code:

- https://github.com/gejian-iscas/CVE-2020-14364 (github_poc): https://github.com/gejian-iscas/CVE-2020-14364
- https://github.com/y-f00l/CVE-2020-14364 (github_poc): https://github.com/y-f00l/CVE-2020-14364

## Other vulnerabilities in Canonical Ubuntu Linux

- [CVE-2020-11651](https://insights.sbomify.com/CVE-2020-11651/): SaltStack Salt Authentication Bypass (critical 9.8, exploited in the wild)
- [CVE-2020-7247](https://insights.sbomify.com/CVE-2020-7247/): OpenSMTPD Remote Code Execution (critical 9.8, exploited in the wild)
- [CVE-2019-16928](https://insights.sbomify.com/CVE-2019-16928/): Exim Out-of-bounds Write (critical 9.8, exploited in the wild)
- [CVE-2018-6789](https://insights.sbomify.com/CVE-2018-6789/): Exim Buffer Overflow (critical 9.8, exploited in the wild)
- [CVE-2015-2590](https://insights.sbomify.com/CVE-2015-2590/): Oracle Java SE and Java SE Embedded Remote Code Execution (critical 9.8, exploited in the wild)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2020-14364 and fix it if it is affected.

What it is: CVE-2020-14364 is a medium-severity memory corruption vulnerability in Canonical Ubuntu Linux, published on 31 Aug 2020. It can only be exploited from the same machine or local network, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2020-14364 in the wild and no public exploit code.

Affected product: Canonical Ubuntu Linux. No package-level version data is available, so check the vendor advisory linked from the reference page.

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2020-14364/ (Markdown: https://insights.sbomify.com/CVE-2020-14364/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2020-14364
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2020-14364
- OSV: https://osv.dev/vulnerability/CVE-2020-14364

---
From sbomify Insights: https://insights.sbomify.com/CVE-2020-14364/
Summaries are generated and may contain mistakes; the official description above is the record.
