cbcvebase.
CVE-2009-2692
published 2009-08-14

CVE-2009-2692: The Linux kernel 2.6.0 through 2.6.30.4, and 2.4.4 through 2.4.37.4, does not initialize all function pointers for socket operations in proto_ops structures…

PriorityP275high7.8CVSS 3.1
AVLACLPRLUINSUCHIHAH
ITWEXPLOITVulnCheck KEV
Exploited in the wild
EPSS
14.63%
96.3th percentile
The Linux kernel 2.6.0 through 2.6.30.4, and 2.4.4 through 2.4.37.4, does not initialize all function pointers for socket operations in proto_ops structures, which allows local users to trigger a NULL pointer dereference and gain privileges by using mmap to map page zero, placing arbitrary code on this page, and then invoking an unavailable operation, as demonstrated by the sendpage operation (sock_sendpage function) on a PF_PPPOX socket.

Affected

18 ranges
VendorProductVersion rangeFixed in
debiandebian_linux
linuxlinux_kernel>= 2.4.4 < 2.4.37.52.4.37.5
linuxlinux_kernel>= 2.6.0 < 2.6.30.52.6.30.5
redhatenterprise_linux_desktop
redhatenterprise_linux_desktop
redhatenterprise_linux_eus
redhatenterprise_linux_eus
redhatenterprise_linux_server
redhatenterprise_linux_server
redhatenterprise_linux_server_aus
redhatenterprise_linux_workstation
redhatenterprise_linux_workstation
suselinux_enterprise_real_time
vmwareesxi
vmwarevmware_tools
vmwarevmware_vcenter_server
vmwarevmware_vsphere
vmwarevmware_workstation

Detection & IOCsextracted from sources · hover to see the quote

urlhttp://www.grsecurity.net/~spender/wunderbar_emporium2.tgz
urlhttp://www.grsecurity.net/~spender/wunderbar_emporium.tgz
urlhttps://gitlab.com/exploit-database/exploitdb-bin-sploits/-/raw/main/bin-sploits/9435.tgz
urlhttps://gitlab.com/exploit-database/exploitdb-bin-sploits/-/raw/main/bin-sploits/9641.tar.gz
path/tmp/sendpage
path/tmp/tmp.XXXXXX
path/tmp/sendfile.XXXXXX
hashfd7810e34e9856f77cba67f291ba115f33411ebd
hashd4b0e413ebf15d039953dfabf7f9a2d1
path/proc/kallsyms
path/proc/ksyms
commandchmod +x /tmp/sendpage; /tmp/sendpage
bytes
ff 25 [4 bytes ptr] [4 bytes fn_ptr] (x86 JMP [mem] trampoline at page zero)
bytes
ff 25 [4 bytes ptr] (x86 JMP [mem] at address 0x00000000)
  • Exploit maps page zero (address 0x0 / NULL) using mmap(2) with MAP_FIXED to place shellcode/trampoline; detect mmap calls with addr=0 and MAP_FIXED|MAP_ANONYMOUS|MAP_PRIVATE flags from unprivileged processes.
  • Exploit triggers the vulnerability via sendfile() syscall on a socket of type PF_BLUETOOTH or PF_APPLETALK (SOCK_DGRAM) as the output fd; monitor sendfile() calls where the destination fd is a raw socket of these protocol families.
  • Exploit also uses PF_PPPOX sockets as the vulnerable sendpage target; monitor socket() calls for PF_PPPOX domain from unprivileged users.
  • Exploit drops and executes a binary at /tmp/sendpage; monitor for creation and execution of files matching /tmp/sendpage or /tmp/sendfile.* by non-root users.
  • Exploit reads /proc/kallsyms or /proc/ksyms to resolve kernel symbol addresses; alert on unprivileged processes opening these files, especially in conjunction with mmap(NULL) calls.
  • x86 trampoline shellcode placed at page zero starts with bytes 0xFF 0x25 (JMP [mem]) followed by a pointer to the privilege-escalation function; scan memory at address 0x0 for this byte pattern when mmap_min_addr is 0.
  • Exploit uses personality(0xffffffff) to check for PER_SVR4 and falls back to mprotect on address 0x0; monitor personality() syscalls with 0xffffffff argument followed by mprotect on address 0.
  • Post-exploitation step spawns an interactive shell via execl("/bin/sh","sh","-i"); correlate with preceding sendfile()+socket(PF_BLUETOOTH/PF_APPLETALK) activity for full kill-chain detection.
  • ·The Metasploit module targets Linux x86 only; x86_64 support is commented out in the module code.
  • ·The exploit may require the __attribute__((regparm(3))) to be removed for 2.4 kernels.

CVSS provenance

nvdv3.17.8HIGHCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
nvdv2.07.2HIGHAV:L/AC:L/Au:N/C:C/I:C/A:C
vulncheck7.8HIGH
vendor_redhat7.8HIGH
CVEs like this are exactly what “Exploited This Week” covers.

Every Monday: what got weaponized or added to CISA KEV in the last seven days — each CVE cross-linked to its PoC, Nuclei template, and detection rule. Free, one email a week, unsubscribe in one click.