Title: Linux-PAM Pam_Wheel Module getlogin() Username Spoofing Privileged Escalation Vulnerability
Severity: MODERATE
Description:
Linux-PAM (Pluggable Authentication Modules for Linux) is an authentication system used to enforce various access restrictions and security mechanisms. The pam_wheel module can be used to enforce access restrictions to various utilities, such as 'su', using the 'wheel' group.
When the "trust" configuration option is implemented, users of the trusted group are not required to supply a password when running the 'su' utility. A configuration option "use_uid" is also available which specifies whether a user of the trusted group should be verified using the login name or user id.
A vulnerability has been discovered in the pam_wheel module when running a configuration with the "trust" option enabled and the "use_uid" option disabled. The vulnerability occurs due to the insecure use of the getlogin() function when verifying user login names against a list of trusted users. It should be noted that the said configuration is not used by default.
Due to the insecure use of getlogin() a local attacker may be capable of gaining unauthorized 'root' privileges without supplying a password. This can be accomplished by spoofing the 'logname' return value, effectively making the getlogin() function to return a value of another logged in user. The spoofed user would have to be logged in to the system and also be part of the trusted group for this to attack take place.
Successful exploitation of this issue would allow an attacker to invoke the 'su' utility and gain unauthorized superuser privileges.
Affected Products:
- Linux-PAM Linux-PAM 0.77.0
- RedHat Advanced Workstation for the Itanium Processor 2.1.0
- RedHat Advanced Workstation for the Itanium Processor 2.1.0 IA64
- RedHat Enterprise Linux AS 2.1
- RedHat Enterprise Linux AS 2.1 IA64
- RedHat Enterprise Linux ES 2.1
- RedHat Enterprise Linux ES 2.1 IA64
- RedHat Enterprise Linux WS 2.1
- RedHat Enterprise Linux WS 2.1 IA64
- RedHat Linux 7.3.0 i386
- RedHat Linux 9.0.0 i386
References:
- Linux-PAM: Linux-PAM Home Page
- Linux-PAM: pam_wheel.c
- RedHat: RHSA-2004:304-05 - Updated pam packages
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.