Multiple BSD suid programs can be used to gain elevated privileges

bsd-suid-apps-gain-privileges (8920) The risk level is classified as HighHigh Risk

Description:

A vulnerability in the handling of stdio file descriptors in multiple BSD implementations could allow a local attacker to gain elevated privileges. If a local attacker opens a suid program that has either the stdin, stdout, or stderr file descriptor closed (0, 1, or 2 in POSIX systems), the attacker could gain elevated privileges by opening a file that they would not normally have access to, which would be assigned to the next available file descriptor. This would allow an attacker to write data to or read data from the file using the parent suid program. An attacker could exploit this vulnerability to gain root privileges on the system.

Note: In OpenBSD systems, root privileges can be obtained by exploiting a race condition that occurs once the kernel file descriptor table has been filled.

Platforms Affected:

  • Compaq, Tru64 4.0g
  • FreeBSD, FreeBSD 4.1
  • FreeBSD, FreeBSD 4.1.1
  • FreeBSD, FreeBSD 4.2
  • FreeBSD, FreeBSD 4.3
  • FreeBSD, FreeBSD 4.4
  • FreeBSD, FreeBSD 4.5
  • OpenBSD, OpenBSD 2.9
  • OpenBSD, OpenBSD 3.0
  • OpenBSD, OpenBSD 3.1

Remedy:

For all versions of FreeBSD including FreeBSD 4.5-RELEASE and 4.5-STABLE:
Upgrade to the latest version of FreeBSD (4.5-STABLE dated 2002-04-21 or later) or the latest RELENG_4_5 (4.5-RELEASE-p4) or RELENG_4_4 (4.4-RELEASE-p11) security branches (dated 2002-04-21 or later), as listed in FreeBSD, Inc. Security Advisory FreeBSD-SA-02:23.stdio. See References.

— OR —

Apply the appropriate patch for your system, as listed in FreeBSD, Inc. Security Advisory FreeBSD-SA-02:23.stdio. See References.

For other distributions:
Contact your vendor for upgrade or patch information.

Consequences:

Gain Privileges

References:

Reported:

Apr 22, 2002

The information within this database may change without notice. Use of this information constitutes acceptance for use in an AS IS condition. There are NO warranties, implied or otherwise, with regard to this information or its use. Any use of this information is at the user's risk. In no event shall the author/distributor (IBM Internet Security Systems X-Force) be held liable for any damages whatsoever arising out of or in connection with the use or spread of this information.

For corrections or additions please email xforce@iss.net

Return to the main page