# CVE-2012-0217: Privilege escalation in n/a

> Local attackers can gain privileges via a crafted application exploiting incorrect sysret path handling in the kernel on Intel processors.

- **Severity:** High 7.2 (`AV:L/AC:L/Au:N/C:C/I:C/A:C`)
- **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:** 12 Jun 2012
- **Updated:** 6 Aug 2024
- **Also known as:** DEBIAN-CVE-2012-0217, DSA-2508-1, GHSA-q644-363q-jfmm

## What is CVE-2012-0217?

CVE-2012-0217 is a high-severity vulnerability in Citrix Xenserver, published on 12 Jun 2012. It can only be exploited from the same machine or local network, with no action from the victim.

### Official description

The x86-64 kernel system-call functionality in Xen 4.1.2 and earlier, as used in Citrix XenServer 6.0.2 and earlier and other products; Oracle Solaris 11 and earlier; illumos before r13724; Joyent SmartOS before 20120614T184600Z; FreeBSD before 9.0-RELEASE-p3; NetBSD 6.0 Beta and earlier; Microsoft Windows Server 2008 R2 and R2 SP1 and Windows 7 Gold and SP1; and possibly other operating systems, when running on an Intel processor, incorrectly uses the sysret path in cases where a certain address is not a canonical address, which allows local users to gain privileges via a crafted application.  NOTE: because this issue is due to incorrect use of the Intel specification, it should have been split into separate identifiers; however, there was some value in preserving the original mapping of the multi-codebase coordinated-disclosure effort to a single identifier.

Weakness: CWE-119 (Improper Restriction of Operations within the Bounds of a Memory Buffer)

## Which versions are affected by CVE-2012-0217?

It affects 11 products.


Products: Citrix Xenserver, Freebsd Freebsd, Illumos Illumos, Joyent Smartos, Microsoft Windows 7, Microsoft Windows Server 2003, Microsoft Windows Server 2008, Microsoft Windows Xp, Netbsd Netbsd, Sun Sunos, Xen Xen.

## How do I fix CVE-2012-0217?

Apply the vendor's patch.

## Is CVE-2012-0217 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2012-0217 exists.

Public exploit code:

- FreeBSD Intel SYSRET Privilege Escalation (metasploit)
- Microsoft Windows Kernel - Intel x64 SYSRET (MS12-042) (exploitdb)
- FreeBSD 9.0 - Intel SYSRET Kernel Privilege Escalation (exploitdb)
- FreeBSD - Intel SYSRET Privilege Escalation (Metasploit) (exploitdb)
- FreeBSD - Intel SYSRET Privilege Escalation (Metasploit) (exploitdb)

## 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-2012-0217 and fix it if it is affected.

What it is: CVE-2012-0217 is a high-severity vulnerability in Citrix Xenserver, published on 12 Jun 2012. It can only be exploited from the same machine or local network, with no action from the victim.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2012-0217 exists.

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-2012-0217/ (Markdown: https://insights.sbomify.com/CVE-2012-0217/index.md)
```

## Sources

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

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