Bug 648020 - CVE-2010-3847 reported potentially allowing local privilege escalation
Summary: CVE-2010-3847 reported potentially allowing local privilege escalation
Status: RESOLVED FIXED
Alias: None
Product: openSUSE 11.3
Classification: openSUSE
Component: Basesystem (show other bugs)
Version: Final
Hardware: Other Other
: P5 - None : Critical (vote)
Target Milestone: ---
Assignee: Petr Baudis
QA Contact: E-mail List
URL:
Whiteboard:
Keywords: security_vulnerability
Depends on:
Blocks:
 
Reported: 2010-10-20 13:27 UTC by Aaron Burgemeister
Modified: 2010-10-27 01:56 UTC (History)
3 users (show)

See Also:
Found By: Security Response Team
Services Priority: 40
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Aaron Burgemeister 2010-10-20 13:27:02 UTC
+++ This bug was initially created as a clone of Bug #648017 +++
[Cloned for OpenSUSE]

OpenSUSE 11.x
glibc-2.11.2-3.1.1.x86_64

A vulnerability in the C libraries has been reported.  Links and the full contents are included below for convenience:

http://seclists.org/fulldisclosure/2010/Oct/257
https://wiki.egi.eu/wiki/EGI_CSIRT:Alerts/liblinker-2010-10-18

<quote>
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.
</quote>
Comment 1 Petr Baudis 2010-10-21 09:04:31 UTC
thank you for the report. We are also already tracking this in non-public bug 646960. Currently, we believe this is not exploitable in SUSE glibc since we do not compile with -DNDEBUG and an assert() catches this condition.
Comment 2 Petr Baudis 2010-10-22 17:07:30 UTC
However, much more serious problem popped up as a follow-up: http://thread.gmane.org/gmane.comp.security.full-disclosure/75807

This is very easily exploitable, even on OpenSUSE. We are preparing a security update. The only known workarounds are not very convenient - either block all setuid programs for the time being, or go through all libraries in /lib and /usr/lib and move away those with dangerous constructors (as outlined in the advisory).

To be safe at least against script kiddies, just do away with libpcprofile and the lftp modules, however more savvy attackers might find other problematic .sos.
Comment 3 Marcus Meissner 2010-10-23 19:39:23 UTC
second problem got CVE-2010-3856 (for cross referencing)
Comment 4 Marcus Meissner 2010-10-23 19:51:47 UTC
Workarounds:

- for the posted script kiddie exploit:

rm /lib*/libpcprofile.so
rpm -e lftp   (will deinstall the ftp client)


- setuid binary vector:
  
  disabling all setuid bits is likely not a good idea and will break the system
  for various usages.

  it can be done by changing
/etc/sysconfig/security to:

PERMISSION_SECURITY="paranoid local"

  and running "SuSEconfig --module=permissions"

   (paranoid removes all setuid bits)

  Again, please be aware this will break stuff like "su", "sudo", "at" etc.
Comment 5 Petr Baudis 2010-10-27 01:56:32 UTC
Fixes for all opensuse branches were submitted.