cbcvebase.
CVE-2012-0217
published 2012-06-12

CVE-2012-0217: 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…

PriorityP352high7.2CVSS 2.0
AVLACLAuNCCICAC
EXPLOIT
EPSS
37.21%
98.4th percentile
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.

Affected

28 ranges· showing 25
VendorProductVersion rangeFixed in
citrixcitrix_adm
citrixcitrix_hypervisor
citrixcitrix_virtual_apps_and_desktops
citrixendpoint_management
citrixnetscaler_adc
citrixnetscaler_gateway
citrixxenserver<= 6.0.2
citrixxenserver
citrixxenserver
debianxen< xen 4.1.3~rc1+hg-20120614.a9c0a89c08f2-1 (bookworm)xen 4.1.3~rc1+hg-20120614.a9c0a89c08f2-1 (bookworm)
freebsdfreebsd<= 9.0
illumosillumos<= r13723
joyentsmartos<= 20120614
microsoftwindows_server_2008
netbsdnetbsd<= 6.0
sunsunos<= 5.11
xenxen<= 4.1.2
xenxen
xenxen
xenxen
xenxen
xenxen
xenxen
xenxen
xenxen>= 0 < 4.1.3~rc1+hg-20120614.a9c0a89c08f2-14.1.3~rc1+hg-20120614.a9c0a89c08f2-1

Detection & IOCsextracted from sources · hover to see the quote

urlhttps://gitlab.com/exploit-database/exploitdb-bin-sploits/-/raw/main/bin-sploits/20861.rar
urlhttps://github.com/iZsh/exploits/blob/master/stash/CVE-2012-0217-sysret/CVE-2012-0217-sysret_FreeBSD.c
pathdata/exploits/cve-2012-0217/sysret.c
commandswapgs; sysretq;
bytes
\xb8\x18\x00\x00\x00\x48\x89\xe3\x48\xbc\xef\xbe\xad\xde\xef\xbe\xad\xde\x0f\x05
bytes
\x0f\x01\xf8\x48\x89\xdc\x48\xb8\xef\xbe\xad\xde\xef\xbe\xad\xde\xff\xe0
  • Exploit maps memory at the top of user-accessible virtual address space: (1ULL << 47) - pagesize, placing shellcode at the last page before the non-canonical boundary to trigger the SYSRET GPF in privileged mode.
  • Exploit uses kldsym()/KLDSYM_LOOKUP to resolve kernel IDT handler symbols (Xdiv, Xdbg, Xprot, Xpage, etc.) from userland; alert on unprivileged processes calling kldsym() on FreeBSD.
  • Metasploit module drops a randomly named hidden executable (dot-prefixed alphanumeric filename) compiled from sysret.c into a writable directory (default /tmp), then executes it; monitor for gcc compilation of C files followed by execution of dot-prefixed binaries in /tmp.
  • The Windows PoC (MS12-042) shellcode disables code signing and grants NT SYSTEM privileges; on Windows, monitor for kernel-mode code-signing policy modifications following SYSRET-path exploitation.
  • On Xen/Linux, vulnerable guests are 64-bit para-virtualized guests running on a 64-bit Intel host; Red Hat notes that Linux kernels with a guard page (CVE-2005-1764 fix) between user-mode VA space and non-canonical area are not affected — absence of this guard page is the exploitable condition.
  • ·Exploit only works on 64-bit Intel CPUs; AMD CPUs are not affected by this specific SYSRET flaw (a separate AMD erratum, CVE-2012-2934, causes a different DoS).
  • ·Red Hat Enterprise Linux 5/6 and MRG kernels are NOT vulnerable to the Linux kernel variant because they have a guard page (CVE-2005-1764 fix) and hardened syscall handler (CVE-2006-0744 fix); only the kernel-xen package on RHEL 5 is affected.
  • ·Metasploit module targets only FreeBSD 8.3-RELEASE and 9.0-RELEASE (amd64); other versions return CheckCode::Safe and will not be exploited unless ForceExploit is set.

CVSS provenance

nvdv2.07.2HIGHAV:L/AC:L/Au:N/C:C/I:C/A:C
osv7.2HIGH
vendor_debian7.2HIGH
vendor_redhat2.1LOW
CVEs like this are exactly what “Exploited This Week” covers.

Every Monday: what got weaponized or added to CISA KEV in the last seven days — each CVE cross-linked to its PoC, Nuclei template, and detection rule. Free, one email a week, unsubscribe in one click.