CVE-2002-0795
CVSS2.1
发布时间 :2002-08-12 00:00:00
修订时间 :2008-09-05 16:28:58
NMCO    

[原文]The rc system startup script for FreeBSD 4 through 4.5 allows local users to delete arbitrary files via a symlink attack on X Windows lock files.


[CNNVD]FreeBSD rc任意目录可删除漏洞(CNNVD-200208-185)

        
        FreeBSD是一款免费开放源代码的操作系统。
        FreeBSD中的rc脚本存在漏洞,可导致本地攻击者删除任意文件系统,造成拒绝服务攻击。
        rc(/etc/rc)是FreeBSD系统启动脚本,当FreeBSD以多用户启动时,执行一些启动时例行的操作,其中之一就是删除由X Windows留下的锁住的文件,由于rc脚本没有判断.X11-unix是否是一个实际的目录,也没有判断目录是否存在,攻击者可以通过建立符号链接指向系统任意目录,当脚本运行时,连接指向的目录就会被删除,造成本地拒绝服务攻击。
        

- CVSS (基础分值)

CVSS分值: 2.1 [轻微(LOW)]
机密性影响: NONE [对系统的机密性无影响]
完整性影响: PARTIAL [可能会导致系统文件被修改]
可用性影响: NONE [对系统可用性无影响]
攻击复杂度: LOW [漏洞利用没有访问限制 ]
攻击向量: LOCAL [漏洞利用需要具有物理访问权限或本地帐户]
身份认证: NONE [漏洞利用无需身份认证]

- CPE (受影响的平台与产品)

cpe:/o:freebsd:freebsd:4.5:stable
cpe:/o:freebsd:freebsd:4.5:release

- OVAL (用于检测的技术细节)

未找到相关OVAL定义

- 官方数据库链接

http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2002-0795
(官方数据源) MITRE
http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2002-0795
(官方数据源) NVD
http://www.cnnvd.org.cn/vulnerability/show/cv_cnnvdid/CNNVD-200208-185
(官方数据源) CNNVD

- 其它链接及资源

http://www.securityfocus.com/bid/4880
(VENDOR_ADVISORY)  BID  4880
http://www.iss.net/security_center/static/9217.php
(VENDOR_ADVISORY)  XF  freebsd-rc-delete-directories(9217)
ftp://ftp.freebsd.org/pub/FreeBSD/CERT/advisories/FreeBSD-SA-02:27.rc.asc
(VENDOR_ADVISORY)  FREEBSD  FreeBSD-SA-02:27
http://www.osvdb.org/5083
(UNKNOWN)  OSVDB  5083

- 漏洞信息

FreeBSD rc任意目录可删除漏洞
低危 未知
2002-08-12 00:00:00 2005-05-02 00:00:00
本地  
        
        FreeBSD是一款免费开放源代码的操作系统。
        FreeBSD中的rc脚本存在漏洞,可导致本地攻击者删除任意文件系统,造成拒绝服务攻击。
        rc(/etc/rc)是FreeBSD系统启动脚本,当FreeBSD以多用户启动时,执行一些启动时例行的操作,其中之一就是删除由X Windows留下的锁住的文件,由于rc脚本没有判断.X11-unix是否是一个实际的目录,也没有判断目录是否存在,攻击者可以通过建立符号链接指向系统任意目录,当脚本运行时,连接指向的目录就会被删除,造成本地拒绝服务攻击。
        

- 公告与补丁

        临时解决方法:
        如果您不能立刻安装补丁或者升级,CNNVD建议您采取以下措施以降低威胁:
        * 在/etc/rc脚本中删除或者注释下面一行:
        rm -f /tmp/.X*-lock /tmp/.X11-unix/*
        * 以root权限执行如下命令:
        /bin/sh -c 'echo -e "/.X11-unix/s/^/#/\nw\nq\n" | /bin/ed -s /etc/rc'
        厂商补丁:
        FreeBSD
        -------
        FreeBSD已经为此发布了一个安全公告(FreeBSD-SA-02:27)以及相应补丁:
        FreeBSD-SA-02:27:rc uses file globbing dangerously
        链接:ftp://ftp.freebsd.org/pub/FreeBSD/CERT/advisories/FreeBSD-SA-02:27.rc.asc
        补丁下载:
        FreeBSD FreeBSD 4.5 -STABLE:
        FreeBSD Patch rc.patch
        fetch ftp://ftp.FreeBSD.org/pub/FreeBSD/CERT/patches/SA-02:27/rc.patch
        a)下载相关补丁,并使用PGP工具验证PGP签名:
        # fetch ftp://ftp.FreeBSD.org/pub/FreeBSD/CERT/patches/SA-02:27/rc.patch
        # fetch ftp://ftp.FreeBSD.org/pub/FreeBSD/CERT/patches/SA-02:27/rc.patch.asc
        b)以ROOT权限执行如下命令:
        # cd /usr/src # patch < /path/to/patch
        c)安装新的rc脚本:
        # cd /usr/src/etc # install -c -o root -g wheel -m 644 rc /etc/rc
        FreeBSD FreeBSD 4.5 -RELEASE:
        FreeBSD Patch rc.patch
        fetch ftp://ftp.FreeBSD.org/pub/FreeBSD/CERT/patches/SA-02:27/rc.patch
        a)下载相关补丁,并使用PGP工具验证PGP签名:
        # fetch ftp://ftp.FreeBSD.org/pub/FreeBSD/CERT/patches/SA-02:27/rc.patch
        # fetch ftp://ftp.FreeBSD.org/pub/FreeBSD/CERT/patches/SA-02:27/rc.patch.asc
        b)以ROOT权限执行如下命令:
        # cd /usr/src # patch < /path/to/patch
        c)安装新的rc脚本:
        # cd /usr/src/etc # install -c -o root -g wheel -m 644 rc /etc/rc

- 漏洞信息

5083
FreeBSD /etc/rc Symlink Delete Arbitrary File
Local Access Required Race Condition
Loss of Integrity
Exploit Public

- 漏洞描述

FreeBSD contains a flaw that may allow a malicious user to gain access to unauthorized privileges. The issue is triggered when a malicious user creates a directory named .X11-unix in /tmp (if it does not exist) and symbolically links this directory to an arbitrary directory of his or her choosing. The FreeBSD rc startup script will traverse the symbolic link and delete the malicious user's chosen directory. This flaw may lead to a loss of integrity.

- 时间线

2002-05-29 Unknow
Unknow Unknow

- 解决方案

Upgrade to version 4.5-STABLE; or to either of the RELENG_4_5 (4.5-RELEASE-p6) or RELENG_4_4 (4.4-RELEASE-p13) security branches dated after the respective correction dates, as it has been reported to fix this vulnerability. It is also possible to correct the flaw by implementing the following workaround(s): Find and remove or comment-out the following line in /etc/rc: rm -f /tmp/.X*-lock /tmp/.X11-unix/* The following command executed as root will do this: /bin/sh -c 'echo -e "/.X11-unix/s/^/#/\nw\nq\n" | /bin/ed -s /etc/rc' Also, FreeBSD has released a patch.

- 相关参考

- 漏洞作者

 

 

关于SCAP中文社区

SCAP中文社区是国内第一个以SCAP为主题的中文开放社区。了解更多信息,请查阅[关于本站]

版权声明

CVE/CWE/OVAL均为MITRE公司的注册商标,它们的官方数据源均保存在MITRE公司的相关网站