Rapid7 Vulnerability & Exploit Database

Linux Kernel Sendpage Local Privilege Escalation

Back to Search

Linux Kernel Sendpage Local Privilege Escalation



The Linux kernel failed to properly initialize some entries in the proto_ops struct for several protocols, leading to NULL being dereferenced and used as a function pointer. By using mmap(2) to map page 0, an attacker can execute arbitrary code in the context of the kernel. Several public exploits exist for this vulnerability, including spender's wunderbar_emporium and rcvalle's ppc port, sock_sendpage.c. All Linux 2.4/2.6 versions since May 2001 are believed to be affected: 2.4.4 up to and including; 2.6.0 up to and including This module has been tested successfully on CentOS 5.0 (i386) with kernel version 2.6.18-8.1.1.tl5; and Debian 3.1r8 Sarge (i686) with kernel version 2.4.27-3-386.


  • Tavis Ormandy
  • Julien Tinnes <julien at cr0.org>
  • spender
  • rcvalle
  • egypt <egypt@metasploit.com>






Module Options

To display the available options, load the module within the Metasploit console and run the commands 'show options' or 'show advanced':

msf > use exploit/linux/local/sock_sendpage
msf exploit(sock_sendpage) > show targets
msf exploit(sock_sendpage) > set TARGET < target-id >
msf exploit(sock_sendpage) > show options
    ...show and set options...
msf exploit(sock_sendpage) > exploit

Time is precious, so I don’t want to do something manually that I can automate. Leveraging the Metasploit Framework when automating any task keeps us from having to re-create the wheel as we can use the existing libraries and focus our efforts where it matters.

– Jim O’Gorman | President, Offensive Security