Red Hat Bugzilla – Full Text Bug Listing
|Summary:||CVE-2012-0217 kernel: x86-64: avoid sysret to non-canonical address|
|Product:||[Other] Security Response||Reporter:||Petr Matousek <pmatouse>|
|Component:||vulnerability||Assignee:||Red Hat Product Security <security-response-team>|
|Status:||CLOSED ERRATA||QA Contact:|
|Version:||unspecified||CC:||agordeev, bressers, ddugger, dev, dhoward, drjones, herrold, imammedo, jlieskov, knoel, leiwang, lersek, lwang, mjc, mrezanin, nobody, pbonzini, plougher, qwan, security-response-team, sforsber, tburke, xen-maint|
|Fixed In Version:||Doc Type:||Bug Fix|
It was found that the Xen hypervisor implementation as shipped with Red Hat Enterprise Linux 5 did not properly restrict the syscall return addresses in the sysret return path to canonical addresses. An unprivileged user in a 64-bit para-virtualized guest, that is running on a 64-bit host that has an Intel CPU, could use this flaw to crash the host or, potentially, escalate their privileges, allowing them to execute arbitrary code at the hypervisor level.
|Last Closed:||2014-08-06 11:37:24 EDT||Type:||---|
|oVirt Team:||---||RHEL 7.3 requirements from Atomic Host:|
|Bug Depends On:||813430, 813431, 817489|
|Bug Blocks:||813442, 815484, 823418|
Description Petr Matousek 2012-04-17 14:30:05 EDT
On Intel CPUs sysret to non-canonical address causes a fault on the sysret instruction itself after the stack pointer is set to guest value but before the CPL is changed. Systems running on AMD CPUs are not vulnerable to this issue as sysret on AMD CPUs does not generate a fault before the CPL change. On Xen, a privileged user on a 64 bit PV guest kernel running on a 64 bit hypervisor could use this flaw to escalate privileges to that of the host. Depending on the particular guest kernel it is also possible that non-privileged guest users could also elevate their privileges to that of the host. For Red Hat Enterprise Linux guests, only privileged guest users can exploit this issue. HVM guests and 32-bit PV guests cannot be used to exploit this issue. Acknowledgements: Red Hat would like to thank the Xen project for reporting this issue. Upstream acknowledges Rafal Wojtczuk as the original reporter.
Comment 21 Petr Matousek 2012-04-27 05:33:34 EDT
Statement: This issue did not affect the versions of the Linux kernel as shipped with Red Hat Enterprise Linux 5 and 6, and Red Hat Enterprise MRG, as those versions have a guard page between the end of the user-mode accessible virtual address space and the beginning of the non-canonical area due to CVE-2005-1764 fix, and hardened system call handler due to CVE-2006-0744 fix. This issue did affect the versions of Xen hypervisor as shipped with Red Hat Enterprise Linux 5. A kernel-xen update for Red Hat Enterprise Linux 5 is available to address this flaw.
Comment 24 Mark J. Cox (Product Security) 2012-05-02 04:01:22 EDT
CERT contacted us and moved the embargo to 1st June 2012. VU#649219
Comment 26 Mark J. Cox (Product Security) 2012-05-03 05:55:02 EDT
CERT contacted us and moved the embargo to 12th June 2012
Comment 30 Jan Lieskovsky 2012-06-12 08:07:20 EDT
Comment 31 errata-xmlrpc 2012-06-12 10:56:00 EDT
This issue has been addressed in following products: Red Hat Enterprise Linux 5.6 EUS - Server Only Via RHSA-2012:0720 https://rhn.redhat.com/errata/RHSA-2012-0720.html
Comment 32 errata-xmlrpc 2012-06-12 10:56:11 EDT
This issue has been addressed in following products: Red Hat Enterprise Linux 5 Via RHSA-2012:0721 https://rhn.redhat.com/errata/RHSA-2012-0721.html
Comment 33 Kirill Korotaev 2012-06-13 04:08:52 EDT
Is RHEL4 vulnerable? (it's still under Extended LifeCycle support).
Comment 34 Paolo Bonzini 2012-06-13 05:02:26 EDT
RHEL4 does not include the Xen hypervisor.
Comment 35 Petr Matousek 2012-06-13 05:20:28 EDT
(In reply to comment #33) > Is RHEL4 vulnerable? (it's still under Extended LifeCycle support). Not vulnerable. As of Xen specific aspects of this flaw, Red Hat Enterprise Linux 4 does not include the Xen hypervisor. Red Hat Enterprise Linux 4 has reduced task size (511 GB) that is less than the size of lower half of canonical area (current 48-bit implementation) so it does not need the fix for CVE-2005-1764 (that introduces the guard page between end of lower half canonical area and start of non-canonical area). Red Hat Enterprise Linux 4 also contains the fix for CVE-2006-0744, which addresses known attacks that used non-canonical ELF/signal entry points.
Comment 36 Vincent Danen 2012-06-15 10:52:43 EDT
IssueDescription: It was found that the Xen hypervisor implementation as shipped with Red Hat Enterprise Linux 5 did not properly restrict the syscall return addresses in the sysret return path to canonical addresses. An unprivileged user in a 64-bit para-virtualized guest, that is running on a 64-bit host that has an Intel CPU, could use this flaw to crash the host or, potentially, escalate their privileges, allowing them to execute arbitrary code at the hypervisor level.
Comment 37 Petr Matousek 2012-09-05 07:22:00 EDT
VUPEN Blog post about the vulnerability: http://www.vupen.com/blog/20120904.Advanced_Exploitation_of_Xen_Sysret_VM_Escape_CVE-2012-0217.php