[Linux][Grid] Schwachstelle in GNU libc - EGI-ADV-20101018

—–BEGIN PGP SIGNED MESSAGE—–
Hash: SHA1

Liebe Kolleginnen und Kollegen,

soeben erreichte uns nachfolgende Warnung. Wir geben diese Informationen
unveraendert an Sie weiter.

Der dynamische Linker/Loader der GNU C Bibliothek ld.so dient zur
Ausfuehrung von Programmen, wobei die wesentliche Aufgabe ist,
dynamische Bibliotheken im ELF-Format zu laden, die von dem Programm
benoetigt werden. Dabei existieren verschiedene Mechanismen, um ld.so
mitzuteilen, in welchen Verzeichnissen nach den benoetigten Bibliotheken
gesucht werden soll.

Allerdings werden spezielle Sicherheitsrichtlininen fuer SetUID/SetGID
Programme verfolgt, um einen Missbrauch zu verhindern. Davon betroffen
ist auch der $ORIGIN Platzhalter, ueber den ein Suchpfad fuer
Bibliotheken relativ zu einem Verzeichnis angegeben werden kann. Er kann
z. B. ueber DT_RPATH oder DT_RUNPATH in die ELF Substitution Sequence
eingebracht werden.

DFN-CERT CVE-2010-3847 – Schwachstelle in dem dynamischen Linker/Loader
der GNU C Bibliothek

Im dynamischen Linker/Loader ld.so der GNU C Bibliothek ist eine
Schwachstelle vorhanden, die sich aus dem unsicheren Umgang mit dem
$ORIGIN Platzhalter ergibt. Unter Umstaenden wird diese bei Hard-Links
auf SetUID/SetGID Programmen beruecksichtigt. Ein lokaler Angreifer kann
diese Schwachstelle ausnutzen, um beliebige Befehle mit den Rechten von
Root auszufuehren. Voraussetzung fuer das Ausnutzen der Schwachstelle
ist, dass der Angreifer einen Hard-Link auf ein SetUID/SetGID Programm
setzen kann. Dies erfordert, dass der Angreifer Schreibzugriff auf das
Dateisystem hat, im dem sich das SetUID/SetGID Programm befindet. Ein
Exploit zum Ausnutzen der Schwachstelle ist bereits veroeffentlicht
worden.

Betroffen sind die folgenden Software Pakete und Plattformen:

Verschiedene Linux Distributionen inklusive RHEL/CentOS/SL 5
*Nicht betroffen* ist RHEL 3 und 4 und davon abgeleitete
Distributionen

Weiterhin existieren Workarounds:

Bislang sind noch keine Patches verfuegbar. Voraussetzung fuer das
Ausnutzen der Schwachstelle ist jedoch, dass der Angreifer einen
Hard-Link auf ein SetUID/SetGID Programm setzen kann. Dies erfordert,
dass der Angreifer Schreibzugriff auf das Dateisystem hat, im dem sich
das SetUID/SetGID Programm befindet. Als Workaround koennen alle
Verzeichnisse, in denen sich SetUID/SetGID Programme befinden, mittels
des Kommandos “mount -o bind” als eigenstaendiges Dateisystem neu
gebunden werden (z.B. “mount -o bind /sbin /sbin”).

Sektion Mitigation im EGI_CSIRT Advisory

https://wiki.egi.eu/wiki/EGI_CSIRT:Alerts/liblinker-2010-10-18

(c) der deutschen Zusammenfassung bei DFN-CERT Services GmbH; die
Verbreitung, auch auszugsweise, ist nur unter Hinweis auf den Urheber,
DFN-CERT Services GmbH, und nur zu nicht kommerziellen Zwecken
gestattet.

Mit freundlichen Gruessen,
Jan Kohlrausch (CSIRT), Phone +49 40 808077-555

DFN-CERT Services GmbH, https://www.dfn-cert.de, Phone +49 40 808077-555
Sitz / Register: Hamburg, AG Hamburg, HRB 88805, Ust-IdNr.: DE 232129737
Sachsenstrasse 5, 20097 Hamburg/Germany, CEO: Dr. Klaus-Peter Kossakowski

CarmentiS – Early Warning Expertise
https://www.carmentis.org

** WHITE information – Unlimited distribution allowed **
** see https://wiki.egi.eu/wiki/EGI_CSIRT:TLP for distribution restrictions **

EGI CSIRT ADVISORY [EGI-ADV-20101018]

Title: HIGH Vulnerability in C library dynamic linker (CVE-2010-3847) [EGI-ADV-20101018]
Date: October 18, 2010
URL: https://wiki.egi.eu/wiki/EGI_CSIRT:Alerts/liblinker-2010-10-18

Introduction
============

Earlier today, Tavis Ormandy released information about a
vulnerability in GNU libc, complete with an exploit that on many
systems can give any local user root privileges. (For full details,
see the link below.)

This vulnerability has been labelled CVE-2010-3847, and is present on
many Linux distributions, including RHEL/CentOS/SL 5 (but *not* RHEL 3
and 4 and their derivatives). Vendor patches are not yet available.

Details
=======

As far as is known, the vulnerability can only be exploited if users can
write to a file system that contains binaries with suid root
permissions. (Since it is necessary for the attacker to create a hard
link to a suid root binary.)

This is, for instance, the case if /bin is located on the same
filesystem as /tmp (or any other user writable location, like /var/tmp,
/home, /var/lib/texmf, and so on). This is unfortunately a common
configuration.

Mitigation
==========

To make it impossible to make the required hard link, directories
containing suid/sgid binaries can be made to appear to as separate
file systems by doing

mount -o bind /sbin /sbin

for each such directory.

Please note that these commands must be re-run whenever the system is
rebooted, for example by adding them to a suitable init script.

A baseline list of directories with suid/sgid binaries on a typical
RHEL 5 system is:

/bin
/sbin
/usr/bin
/usr/libexec
/usr/lpp
/usr/sbin

You should check for any additional site specific locations using a command
like

find / -type f \( -perm /u+s -o -perm /g+s \)

that will list all files with suid/sgid permissions.

Recommendations
===============

Apply the mitigation method above for all relevant locations.

You may wish to suspend user logins and job submission until these steps
have been taken; please refer to your local site policy.

Apply vendor updates as soon as they become available.

References
==========

http://seclists.org/fulldisclosure/2010/Oct/257

On behalf of the EGI CSIRT,

– —
Nuno Dias – EGI CSIRT

—–BEGIN PGP SIGNATURE—–
Version: GnuPG v2.0.9 (GNU/Linux)

iEYEARECAAYFAky9ooYACgkQWmhIvjFb90Wk2QCfYY8/GjV1rLih1zlotiWrvMBO
G/EAnRKvUZVrjzXvLWncgQrVQ4VIM/7E
=chmP
—–END PGP SIGNATURE—–

Nach oben