Bug 642896 - (CVE-2010-3904) CVE-2010-3904 kernel: RDS sockets local privilege escalation
CVE-2010-3904 kernel: RDS sockets local privilege escalation
Status: NEW
Product: Security Response
Classification: Other
Component: vulnerability (Show other bugs)
unspecified
All Linux
high Severity high
: ---
: ---
Assigned To: Red Hat Product Security
reported=20101014,public=20101019,sou...
: Security
Depends On: 642897 642898 642899 642900 645252 645305
Blocks:
  Show dependency treegraph
 
Reported: 2010-10-14 00:09 EDT by Eugene Teo (Security Response)
Modified: 2015-08-31 23:55 EDT (History)
23 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Eugene Teo (Security Response) 2010-10-14 00:09:01 EDT
Description of problem:
The handling functions for sending and receiving messages, in rds_page_copy_user(), use the unchecked __copy_*_user_inatomic functions without any access checks on user-provided pointers.  As a result, by passing a kernel address as an iovec base address in recvmsg-style calls, a local user can overwrite arbitrary kernel memory, which can easily be used to escalate privileges to root.

Introduced via 7875e18e (v2.6.30-rc1).

Acknowledgements:

Red Hat would like to thank Dan Rosenberg of Virtual Security Research for reporting this issue.
Comment 3 Eugene Teo (Security Response) 2010-10-14 00:14:22 EDT
Statement:

The Linux kernel as shipped with Red Hat Enterprise Linux 3, 4 and Red Hat Enterprise MRG did not include support for the RDS Protocol, and therefore are not affected by this issue. Updates for Red Hat Enterprise Linux 5 and 6 are available to address this flaw.

Mitigation:

For users that do not run applications that use RDS, you can prevent the rds module from being loaded by adding the following entry to the end of the /etc/modprobe.d/blacklist file:

blacklist rds

This way, the rds module cannot be loaded accidentally, which may occur if an application that requires RDS is started. A reboot is not necessary for this change to take effect but do make sure the module is not loaded in the first place. You can verify that by running:

lsmod | grep rds

You may also consider removing the CAP_SYS_MODULE capability from the current global capability set to prevent kernel modules from being loaded or unloaded. The CAP_SYS_MODULE has a capability number of 16 (see linux/capability.h). The default value has all the bits set. To remove this capability, you have to clear the 16th bit of the default 32-bit value, e.g. 0xffffff ^ (1 << 16):

echo 0xFFFEFFFF > /proc/sys/kernel/cap-bound
Comment 8 Eugene Teo (Security Response) 2010-10-19 21:43:57 EDT
Public advisory:
http://www.vsecurity.com/resources/advisory/20101019-1/

Upstream commit:
http://git.kernel.org/linus/799c10559d60f159ab2232203f222f18fa3c4a5f
Comment 10 Leif Nixon 2010-10-20 03:34:18 EDT
Excuse me, isn't this trivially exploitable on RHEL 5?

Doesn't that warrant a prompt kernel update?
Comment 11 Eugene Teo (Security Response) 2010-10-20 04:36:12 EDT
(In reply to comment #10)
> Excuse me, isn't this trivially exploitable on RHEL 5?
> 
> Doesn't that warrant a prompt kernel update?

If you are unable to perform the mitigation steps, please contact Red Hat Support for a hotfix. We are planning to get this addressed in Red Hat Enterprise Linux 5 soon. Thanks.
Comment 12 Vincent Danen 2010-10-21 21:00:25 EDT
Noting Fedora tracking bugs created elsewhere:

CVE-2010-3904 Affects: Fedora 12/13 [bug #645252]
CVE-2010-3904 Affects: Fedora 14 [bug #645305]
Comment 13 Matthew Ife 2010-10-22 03:59:56 EDT
This does not work on most domains confined by SELinux, including RBAC enabled users such as staff_t and user_t, because it relies on having access to the system map / kallsyms which is a restricted file and/or "create" access on sockets which is typically not supplied in most confinements.
Comment 14 errata-xmlrpc 2010-10-25 14:44:12 EDT
This issue has been addressed in following products:

  Red Hat Enterprise Linux 5

Via RHSA-2010:0792 https://rhn.redhat.com/errata/RHSA-2010-0792.html
Comment 15 errata-xmlrpc 2010-11-10 14:09:23 EST
This issue has been addressed in following products:

  Red Hat Enterprise Linux 6

Via RHSA-2010:0842 https://rhn.redhat.com/errata/RHSA-2010-0842.html
Comment 16 errata-xmlrpc 2010-11-22 14:35:22 EST
This issue has been addressed in following products:

  Red Hat Enterprise Linux 6

Via RHSA-2010:0842 https://rhn.redhat.com/errata/RHSA-2010-0842.html

Note You need to log in before you can comment on or make changes to this bug.