Title: Multiple Vendor BSD libutil pw_error() Format String Vulnerability
Severity: HIGH
Description:
Libutil is a shared library used by almost every unix that contains code for "standard" functions used in many different unix untilities. The BSD libutil contains a format string vulnerability in the pw_error() function, used in the setuid chpass utility.
In pw_error(), user input is passed as the only argument to a *printf() function, making it possible for an attacker to corrupt the stack. If format specifiers are deliberately inserted into the string that is passed to the function, the *printf function will reference locations deeper into the stack than it should, expecting to see variables that would normally be there. This, combined with the fact that you can write to memory with format specifiers, allows an attacker to, for example, reconstruct the return address of the function so that it points to user-supplied (in the format string) shellcode. When the function returns, it will begin executing the shellcode on the stack.
Exploitation of this vulnerability leads to local root access for the attacker.
Affected Products:
- FreeBSD FreeBSD 3.2.0
- FreeBSD FreeBSD 3.3.0
- FreeBSD FreeBSD 3.4.0
- FreeBSD FreeBSD 3.5.0
- FreeBSD FreeBSD 4.0.0
- NetBSD NetBSD 1.4.0
- NetBSD NetBSD 1.4.1
- NetBSD NetBSD 1.4.2
- OpenBSD OpenBSD 2.3.0
- OpenBSD OpenBSD 2.4.0
- OpenBSD OpenBSD 2.5.0
- OpenBSD OpenBSD 2.6.0
- OpenBSD OpenBSD 2.7.0
References:
- FreeBSD: FreeBSD Security Information
- NetBSD: NetBSD Security Page
- OpenBSD: OpenBSD Security Information
Juniper Networks provides this content via a wide variety of sources and production methods. If notified of errors or omissions in the content of this page, Juniper Networks, at its discretion, will modify or remove the page or leave the content as is, depending on various factors including but not limited to the reputation and authority of the party providing the notification. Please use the contact information displayed elsewhere on this page to report any errors or omissions regarding the content on this page.