# CVE-2016-9603: Memory corruption in Qemu:

> A heap buffer overflow in QEMU's Cirrus VGA emulator allows guest users to crash the host or execute arbitrary code.

- **Severity:** Medium 5.5 (`CVSS:3.0/AV:A/AC:H/PR:L/UI:N/S:C/C:L/I:L/A:L`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Local or same network only
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 27 Jul 2018
- **Updated:** 6 Aug 2024
- **Also known as:** ALPINE-CVE-2016-9603, DEBIAN-CVE-2016-9603, GHSA-49mx-v59p-m55m, RHSA-2017:0985, RHSA-2017:0987, UBUNTU-CVE-2016-9603

## What is CVE-2016-9603?

CVE-2016-9603 is a medium-severity memory corruption vulnerability in Citrix Xenserver, published on 27 Jul 2018. It can only be exploited from the same machine or local network, with no action from the victim.

### Official description

A heap buffer overflow flaw was found in QEMU's Cirrus CLGD 54xx VGA emulator's VNC display driver support before 2.9; the issue could occur when a VNC client attempted to update its display after a VGA operation is performed by a guest. A privileged user/process inside a guest could use this flaw to crash the QEMU process or, potentially, execute arbitrary code on the host with privileges of the QEMU process.

Weakness: CWE-119 (Improper Restriction of Operations within the Bounds of a Memory Buffer), CWE-122 (Heap-based Buffer Overflow)

## Which versions are affected by CVE-2016-9603?

It affects 9 products.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `qemu-img` | Red Hat:enterprise_linux:7::client | All versions | 10:1.5.3-126.el7_3.6 |
| `qemu-kvm` | Red Hat:enterprise_linux:7::client | All versions | 10:1.5.3-126.el7_3.6 |
| `qemu-kvm-common` | Red Hat:enterprise_linux:7::client | All versions | 10:1.5.3-126.el7_3.6 |
| `qemu-kvm-debuginfo` | Red Hat:enterprise_linux:7::client | All versions | 10:1.5.3-126.el7_3.6 |
| `qemu-kvm-tools` | Red Hat:enterprise_linux:7::client | All versions | 10:1.5.3-126.el7_3.6 |
| `qemu-img` | Red Hat:enterprise_linux:7::computenode | All versions | 10:1.5.3-126.el7_3.6 |
| `qemu-kvm` | Red Hat:enterprise_linux:7::computenode | All versions | 10:1.5.3-126.el7_3.6 |
| `qemu-kvm-common` | Red Hat:enterprise_linux:7::computenode | All versions | 10:1.5.3-126.el7_3.6 |
| `qemu-kvm-debuginfo` | Red Hat:enterprise_linux:7::computenode | All versions | 10:1.5.3-126.el7_3.6 |
| `qemu-kvm-tools` | Red Hat:enterprise_linux:7::computenode | All versions | 10:1.5.3-126.el7_3.6 |
| `qemu-img-rhev` | Red Hat:enterprise_linux:7::hypervisor | All versions | 10:2.6.0-28.el7_3.9 |
| `qemu-kvm-common-rhev` | Red Hat:enterprise_linux:7::hypervisor | All versions | 10:2.6.0-28.el7_3.9 |
| `qemu-kvm-rhev` | Red Hat:enterprise_linux:7::hypervisor | All versions | 10:2.6.0-28.el7_3.9 |
| `qemu-kvm-rhev-debuginfo` | Red Hat:enterprise_linux:7::hypervisor | All versions | 10:2.6.0-28.el7_3.9 |
| `qemu-kvm-tools-rhev` | Red Hat:enterprise_linux:7::hypervisor | All versions | 10:2.6.0-28.el7_3.9 |
| `qemu-img` | Red Hat:enterprise_linux:7::server | All versions | 10:1.5.3-126.el7_3.6 |
| `qemu-kvm` | Red Hat:enterprise_linux:7::server | All versions | 10:1.5.3-126.el7_3.6 |
| `qemu-kvm-common` | Red Hat:enterprise_linux:7::server | All versions | 10:1.5.3-126.el7_3.6 |
| `qemu-kvm-debuginfo` | Red Hat:enterprise_linux:7::server | All versions | 10:1.5.3-126.el7_3.6 |
| `qemu-kvm-tools` | Red Hat:enterprise_linux:7::server | All versions | 10:1.5.3-126.el7_3.6 |
| `qemu-img` | Red Hat:enterprise_linux:7::workstation | All versions | 10:1.5.3-126.el7_3.6 |
| `qemu-kvm` | Red Hat:enterprise_linux:7::workstation | All versions | 10:1.5.3-126.el7_3.6 |
| `qemu-kvm-common` | Red Hat:enterprise_linux:7::workstation | All versions | 10:1.5.3-126.el7_3.6 |
| `qemu-kvm-debuginfo` | Red Hat:enterprise_linux:7::workstation | All versions | 10:1.5.3-126.el7_3.6 |
| `qemu-kvm-tools` | Red Hat:enterprise_linux:7::workstation | All versions | 10:1.5.3-126.el7_3.6 |

Products: Citrix Xenserver, Debian Debian Linux, Qemu Qemu, Redhat Enterprise Linux Desktop, Redhat Enterprise Linux Server, Redhat Enterprise Linux Server Aus, Redhat Enterprise Linux Server Eus, Redhat Enterprise Linux Workstation, Redhat Openstack.

## How do I fix CVE-2016-9603?

Upgrade to a fixed version.

## Is CVE-2016-9603 being exploited?

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

## Other vulnerabilities in Citrix Xenserver

- [CVE-2014-4947](https://insights.sbomify.com/CVE-2014-4947/): Memory corruption in n/a (critical 10.0)
- [CVE-2018-14007](https://insights.sbomify.com/CVE-2018-14007/): Path traversal in n/a (critical 9.8)
- [CVE-2015-7705](https://insights.sbomify.com/CVE-2015-7705/): Denial of service in n/a (critical 9.8)
- [CVE-2016-5302](https://insights.sbomify.com/CVE-2016-5302/): Auth bypass in n/a (critical 9.8)
- [CVE-2017-12134](https://insights.sbomify.com/CVE-2017-12134/): Memory corruption in n/a (high 8.8)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2016-9603 and fix it if it is affected.

What it is: CVE-2016-9603 is a medium-severity memory corruption vulnerability in Citrix Xenserver, published on 27 Jul 2018. 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-2016-9603 in the wild and no public exploit code.

Affected product: Citrix Xenserver. 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-2016-9603/ (Markdown: https://insights.sbomify.com/CVE-2016-9603/index.md)
```

## Sources

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

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