Vigil@nce: FreeBSD, privilege elevation on amd64
September 2008 by Vigil@nce
A local attacker can obtain root privileges on a FreeBSD/amd64 system.
Consequences: administrator access/rights
Provenance: user shell
Means of attack: no proof of concept, no attack
Ability of attacker: expert (4/4)
Confidence: confirmed by the editor (5/5)
Diffusion of the vulnerable configuration: high (3/3)
Creation date: 04/09/2008
FreeBSD [confidential versions]
The FreeBSD/amd64 system uses the GS segment to store:
in user mode : information on threads
in kernel mode : information on processes
The SwapGS assembler instruction swaps GS and the "KernelGSbase" MSR (Model Specific Register). This instruction is called for each mode change.
However, if a GPF (General Protection Fault) occurs when returning from an interrupt, trap or system call, SwapGS is called twice. Kernel GS data can thus be altered by the user.
A local attacker can therefore execute code with kernel privileges.
Identifiers: BID-31003, CVE-2008-3890, FreeBSD-SA-08:07.amd64,