Vigil@nce - Linux kernel: privilege escalation via IRET gsbase
December 2014 by Vigil@nce
This bulletin was written by Vigil@nce : http://vigilance.fr/offer
SYNTHESIS OF THE VULNERABILITY
A local attacker can call an IRET on the Linux kernel, in order to
escalate his privileges.
Impacted products: Linux, openSUSE, RHEL, SUSE Linux Enterprise
Desktop, SLES
Severity: 2/4
Creation date: 16/12/2014
DESCRIPTION OF THE VULNERABILITY
On an Intel processor, when an interruption/exception occurs (for
example a system call via int 0x80), the current context
(registers CS and EIP/RIP, and flags) is saved. At the end of the
interruption/exception, the IRET instruction restores saved
values, so the interrupted program can continue its execution
where it was interrupted:
– restore the EIP/RIP instruction pointer
– restore the CS register (privilege switch)
– restore flags
However, on a 64 bit processor, with a writable kernel stack,
after an IRET triggering a #SS Fault, the general_protection()
function is executed with kernel/user BS Base addresses swapped.
A local attacker can therefore call an IRET on the Linux kernel,
in order to escalate his privileges.
ACCESS TO THE COMPLETE VIGIL@NCE BULLETIN
http://vigilance.fr/vulnerability/Linux-kernel-privilege-escalation-via-IRET-gsbase-15815