CVE-2010-3904 — Linux Kernel Improper Input Validation Vulnerability

CVE-2010-3904

Linux Kernel RDS — Improper Input Validation in Reliable Datagram Sockets Enables Local Privilege Escalation to Root

What is the Linux Kernel RDS Protocol?

The Linux kernel's Reliable Datagram Sockets (RDS) protocol is a transport layer protocol designed for high-performance, low-latency communication between nodes in a cluster — particularly in Oracle RAC (Real Application Clusters) database environments where it was primarily developed. RDS provides reliable, ordered datagram delivery over InfiniBand or TCP transports. The RDS implementation was added to the Linux kernel in 2.6.26 (2008) to support Oracle clustering workloads. RDS is a less commonly known kernel subsystem, but its presence on any Linux system compiled with RDS support (common in Red Hat Enterprise Linux and Oracle Linux distributions) created an exploitable local privilege escalation path.

Overview

CVE-2010-3904 is a high-severity local privilege escalation vulnerability (CWE-1284, CVSS 7.8) in the Linux kernel's RDS (Reliable Datagram Sockets) protocol implementation. The kernel fails to properly validate a quantity in the rds_page_copy_user() function when processing sendmsg and recvmsg system calls, allowing a local user to gain root privileges via crafted system calls. The vulnerability is reliable, requires no special privileges beyond the ability to create RDS sockets, and was publicly disclosed with a working exploit. CISA added to KEV in May 2023; the requiredAction notes that impacted (end-of-life) kernels should be disconnected.

Affected Versions

Product Vulnerable Fixed
Linux kernel 2.6.26 through 2.6.36-rc8 Affected Update to kernel 2.6.37 or apply upstream patch
Red Hat Enterprise Linux 5 with RDS enabled Affected Apply RHSA security update
Red Hat Enterprise Linux 6 with RDS enabled Affected Apply RHSA security update

Note: Systems where RDS is compiled as a module but not loaded are not exploitable. The CONFIG_RDS kernel configuration option determines whether RDS is compiled in. The affected kernel versions are end-of-life.

Technical Details

The vulnerability (CWE-1284: Improper Validation of Specified Quantity in Input) exists in the rds_page_copy_user() function in the kernel's RDS implementation. This function copies data between kernel memory and user space when processing RDS socket operations. The function fails to properly validate the len parameter — the quantity of data to be copied — before using it in a memory operation.

A local attacker with access to RDS sockets can call sendmsg() or recvmsg() with crafted parameters that pass a negative or oversized length value. The inadequate validation allows the copy operation to write to arbitrary kernel memory locations, overwriting kernel data structures including privilege-related data (such as the cred struct for the process). By overwriting the current process's credential structure, the attacker can escalate their effective user ID to root (UID 0), gaining full system administrator privileges.

A reliable public exploit was disclosed alongside the vulnerability report. The exploit was straightforward: create an RDS socket, call sendmsg with crafted parameters, and observe the resulting root shell. This simplified exploitation made CVE-2010-3904 a popular local privilege escalation tool in post-exploitation toolkits throughout the 2010s.

Discovery

Discovered and published by Dan Rosenberg of Virtual Security Research (VSR). Rosenberg disclosed the vulnerability with a full working exploit in October 2010, allowing system administrators to test whether their systems were vulnerable before patches were widely available. The public exploit significantly accelerated exploitation of the vulnerability in the wild. The kernel patch was committed to the mainline kernel tree on October 30, 2010, shortly after disclosure.

Exploitation Context

Linux kernel local privilege escalation vulnerabilities are invaluable as second-stage exploit tools:

  • Post-exploitation privilege escalation: CVE-2010-3904 was widely used as a second-stage privilege escalation tool after attackers gained initial code execution at a low-privilege level (e.g., through a web application vulnerability, SSH credential compromise, or container escape). The reliable public exploit made it a standard component of attacker toolkits targeting Linux servers.
  • Shared hosting environments: In hosting environments where multiple customers shared the same physical or virtual server, CVE-2010-3904 allowed a compromised customer account to escalate to root and potentially access data from other customers.
  • Container escape context: Even in early container deployments, local privilege escalation vulnerabilities in the host kernel could break container isolation.
  • Long persistence of vulnerable kernels: Linux kernels are notoriously slow to update in production environments. Enterprise Linux systems running RHEL 5 or RHEL 6 with older kernel versions remained vulnerable for years after the patch was available.
  • CISA 2023 KEV addition: The May 2023 KEV addition — more than 12 years after the patch — reflects CISA's intelligence that vulnerable legacy Linux systems in critical infrastructure were being actively exploited, likely as local privilege escalation steps in multi-stage attacks.

Remediation

  1. Apply kernel security update: Update to Linux kernel 2.6.37 or later, or apply the upstream patch to the affected kernel version. For RHEL/CentOS, apply the Red Hat Security Advisory (RHSA) for the affected version.
  2. Disable RDS module: If RDS is not needed (which is the case for most non-Oracle-clustering workloads), blacklist the RDS module: add blacklist rds to /etc/modprobe.d/blacklist.conf. This prevents the module from loading even if it is compiled in.
  3. Upgrade operating system: Systems running kernel 2.6.26-2.6.36 should be upgraded to a supported OS with a patched kernel (RHEL 7+, Ubuntu 18.04+, or current versions of other distributions).
  4. Decommission legacy systems: CISA's requiredAction states that impacted end-of-life products should be disconnected. Systems that cannot be updated should be isolated from the network or decommissioned.

Key Details

PropertyValue
CVE ID CVE-2010-3904
Vendor / Product Linux — Kernel
NVD Published2010-12-06
NVD Last Modified2025-10-22
CVSS 3.1 Score7.8
CVSS 3.1 VectorCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
SeverityHIGH
CWE CWE-1284 find similar ↗
CISA KEV Added2023-05-12
CISA KEV Deadline2023-06-02
Known Ransomware Use No

CVSS 3.1 Breakdown

Attack Vector
Local
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

Required Action

CISA BOD 22-01 Deadline: 2023-06-02. The impacted product is end-of-life and should be disconnected if still in use.

Timeline

DateEvent
2010-10-22Vulnerability discovered and reported; Linux kernel RDS socket input validation flaw disclosed
2010-10-30Patch committed to Linux kernel mainline git tree (commit d05b8615a)
2010-12-06CVE-2010-3904 published
2023-05-12CISA added to KEV — reflecting continued exploitation of legacy Linux systems running vulnerable kernels
2023-06-02CISA BOD 22-01 remediation deadline

References

ResourceType
NVD — CVE-2010-3904 Vulnerability Database
CISA KEV Catalog Entry US Government