Linux Kernel tun_chr_pool()函数空指针引用漏洞


发布日期:2009-07-17
更新日期:2009-07-20

受影响系统:
Linux kernel 2.6.30
描述:
--------------------------------------------------------------------------------
BUGTRAQ  ID: 35724
CVE(CAN) ID: CVE-2009-1894,CVE-2009-1897

Linux Kernel是开放源码操作系统Linux所使用的内核。

Linux Kernel的drivers/net/tun.c文件中的tun_chr_poll()函数存在空指针引用错误:

    int fd;
    struct pollfd pfd;
    fd = open("/dev/net/tun", O_RDWR);
    pfd.fd = fd;
    pfd.events = POLLIN | POLLOUT;
    poll(&pfd, 1, 0);

如果用户对tun设备执行了open()和poll()操作,就可以触发这个漏洞,导致崩溃或以root用户权限执行任意指令。成功攻击要求使用GCC的-fdelete-null-pointer-checks优化编译了内核。

<*来源:Christian Borntraeger
 
  链接:http://secunia.com/advisories/35839/
        http://lkml.org/lkml/2009/7/4/14
        http://article.gmane.org/gmane.linux.network/124939
*>

测试方法:
--------------------------------------------------------------------------------

警 告

以下程序(方法)可能带有攻击性,仅供安全研究与教学之用。使用者风险自负!

http://milw0rm.com/sploits/2009-cheddar_bay.tgz

建议:
--------------------------------------------------------------------------------
厂商补丁:

Linux
-----
目前厂商已经发布了升级补丁以修复这个安全问题,请到厂商的主页下载:

http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=3c8a9c63d5fd738c261bd0ceece04d9c8357ca13

相关内容