Vigil@nce: Solaris, buffer overflow via w
September 2009 by Vigil@nce
A local attacker can generate a buffer overflow in the w command,
in order to obtain root privileges.
Severity: 2/4
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: 11/09/2009
IMPACTED PRODUCTS
– OpenSolaris
– Sun Solaris
– Sun Trusted Solaris
DESCRIPTION OF THE VULNERABILITY
The whodo command displays processes of each user. The w command
displays statistics on connected users. Both commands are
installed suid root.
Both commands share the same source code to read the
/var/adm/utmpx file. The size of the utmpx file is used to
allocate a buffer, and then the getutxent() function fills in the
buffer.
However, in the time interval between the buffer allocation, and
the last call to getutxent(), the attacker can create new entries
in /var/adm/utmpx. The number of entries to save is therefore
larger than the buffer size, which generates a heap overflow.
A local attacker can therefore generate a buffer overflow in the
w/whodo command, in order to obtain root privileges.
CHARACTERISTICS
Identifiers: 266348, 6821298, BID-36369, CVE-2009-3183,
VIGILANCE-VUL-9020
http://vigilance.fr/vulnerability/Solaris-buffer-overflow-via-w-9020