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.
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
Public advisory: http://www.vsecurity.com/resources/advisory/20101019-1/ Upstream commit: http://git.kernel.org/linus/799c10559d60f159ab2232203f222f18fa3c4a5f
Excuse me, isn't this trivially exploitable on RHEL 5? Doesn't that warrant a prompt kernel update?
(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.
Noting Fedora tracking bugs created elsewhere: CVE-2010-3904 Affects: Fedora 12/13 [bug #645252] CVE-2010-3904 Affects: Fedora 14 [bug #645305]
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.
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
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