CVE-2002-0573
CVSS7.5
发布时间 :2002-07-03 00:00:00
修订时间 :2008-09-05 16:28:22
NMCOS    

[原文]Format string vulnerability in RPC wall daemon (rpc.rwalld) for Solaris 2.5.1 through 8 allows remote attackers to execute arbitrary code via format strings in a message that is not properly provided to the syslog function when the wall command cannot be executed.


[CNNVD]Solaris rpc.rwalld远程格式串溢出漏洞(CNNVD-200207-014)

        
        rwalld守护程序(rpc.rwalld)是一个处理网络wall请求的服务器。在接到rwall请求时,它调用本地的wall向一个时间共享系统中的所有终端发送信息。
        它在处理rwall客户端发来的信息时存在一个格式串漏洞,可允许本地或者远程攻击者以rwall守护程序的权限(缺省是root权限)执行任意代码。
        问题出在rwall_subr.c中的一段信息处理代码:
         /*
         * Make sure the wall programs exists, is executeable, and runs
         */
         if (rval == -1 || (wall.st_mode & S_IXUSR) == 0 ||
         (fp = popen(WALL_PROG, "w")) == NULL) {
         syslog(LOG_NOTICE,
         "rwall message received but could not execute 临时解决方法:
        如果您不能立刻安装补丁或者升级,CNNVD建议您采取以下措施以降低威胁:
        * rwalld服务不是必需的RPC服务,关闭它对于本地系统不会有任何不良影响,因此我们建议您关闭rwalld服务。
        具体方法是:
        1. 转变成root用户
         $ su -
         #
        2. 关闭rpc.rwalld服务
         使用您熟悉的编辑器打开/etc/inetd.conf文件,找到如下行:
         walld/1 tli rpc/datagram_v wait root /usr/lib/netsvc/rwall/rpc.rwalld rpc.rwalld
         在该行的开始处增加"#"号来将其注释:
         #walld/1 tli rpc/datagram_v wait root /usr/lib/netsvc/rwall/rpc.rwalld rpc.rwalld
         保存修改,退出编辑器。
        3. 禁止rpc.rwalld的执行权限(可选)
         # chmod 000 /usr/lib/netsvc/rwall/rpc.rwalld
        4. 重新启动inetd
         # ps -ef|grep inetd
         root 167 1 0 Oct 07 ? 0:07 /usr/sbin/inetd -s -t
         # kill -HUP 167 (上面的例子中,167是inetd的pid)
        厂商补丁:
        Sun
        ---
        目前厂商已经发布了升级补丁以修复这个安全问题:
        SPARC:
        Solaris 2.5.1 112891-01
        Solaris 2.6 112893-01
        Solaris 7 112899-01
        Solaris 8 112846-01
        Solaris 9 112875-01
        Intel:
        Solaris 2.5.1 112892-01
        Solaris 2.6 112894-01
        Solaris 7 112900-01
        Solaris 8 112847-01
         您可以使用下列链接来下载相应补丁:
        
        http://sunsolve.sun.com/pub-cgi/patchDownload.pl?target=<补丁ID>&method=h

         例如,对于代号为111596-02的补丁,您可以使用下列链接:
        
        http://sunsolve.sun.com/pub-cgi/patchDownload.pl?target=111596&method=h

         补丁安装方法:
         1. 首先用unzip或者uncompress命令将补丁包解压缩
         2. 然后使用patchadd 命令安装补丁,例如:
         # patchadd /var/spool/patch/104945-02
        假设要安装的补丁号是104945-02, 解压之后的目录在:"/var/spool/patch/104945-02"",
         WALL_PROG);
         syslog(LOG_NOTICE, msg);
        如果popen(WALL_PROG, "w")调用出错,程序会调用syslog()报告出错信息,由于错误的将客户端发来的信息(msg)作为格式串进行处理,客户端就可能利用这个漏洞重写内存内容,改变程序执行流程,并可能执行任意代码。
        攻击者利用这个漏洞需要能够使得popen调用失败,结合一些其他的攻击手法,比如设法删除rwalld或改变rwalld的属性和内容、耗尽系统进程或者文件描述符表等等。远程利用这个漏洞比较困难,但还是可能的。
        

- CVSS (基础分值)

CVSS分值: 7.5 [严重(HIGH)]
机密性影响: PARTIAL [很可能造成信息泄露]
完整性影响: PARTIAL [可能会导致系统文件被修改]
可用性影响: PARTIAL [可能会导致性能下降或中断资源访问]
攻击复杂度: LOW [漏洞利用没有访问限制 ]
攻击向量: [--]
身份认证: NONE [漏洞利用无需身份认证]

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

cpe:/o:sun:solaris:8.0
cpe:/o:sun:solaris:2.6
cpe:/o:sun:solaris:7.0::x86
cpe:/o:sun:solaris:7.0
cpe:/o:sun:solaris:8.0::x86
cpe:/o:sun:solaris:2.6::x86

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

oval:org.mitre.oval:def:79Solaris 8 RWall Daemon Syslog Format String Vulnerability
oval:org.mitre.oval:def:41Solaris 7 RWall Daemon Syslog Format String Vulnerability
*OVAL详细的描述了检测该漏洞的方法,你可以从相关的OVAL定义中找到更多检测该漏洞的技术细节。

- 官方数据库链接

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

- 其它链接及资源

http://www.cert.org/advisories/CA-2002-10.html
(VENDOR_ADVISORY)  CERT  CA-2002-10
http://www.kb.cert.org/vuls/id/638099
(UNKNOWN)  CERT-VN  VU#638099
http://www.iss.net/security_center/static/8971.php
(VENDOR_ADVISORY)  XF  solaris-rwall-format-string(8971)
http://online.securityfocus.com/archive/1/270268
(VENDOR_ADVISORY)  BUGTRAQ  20020430 Adivosry + Exploit for Remote Root Hole in Default Installation of Popular Commercial Operating System
http://www.securityfocus.com/bid/4639
(VENDOR_ADVISORY)  BID  4639
http://www.osvdb.org/778
(UNKNOWN)  OSVDB  778
http://archives.neohapsis.com/archives/vulnwatch/2002-q2/0049.html
(UNKNOWN)  VULNWATCH  20020430 [VulnWatch] Adivosry + Exploit for Remote Root Hole in Default Installation of Popular Commercial Operating System

- 漏洞信息

Solaris rpc.rwalld远程格式串溢出漏洞
高危 输入验证
2002-07-03 00:00:00 2005-05-02 00:00:00
远程  
        
        rwalld守护程序(rpc.rwalld)是一个处理网络wall请求的服务器。在接到rwall请求时,它调用本地的wall向一个时间共享系统中的所有终端发送信息。
        它在处理rwall客户端发来的信息时存在一个格式串漏洞,可允许本地或者远程攻击者以rwall守护程序的权限(缺省是root权限)执行任意代码。
        问题出在rwall_subr.c中的一段信息处理代码:
         /*
         * Make sure the wall programs exists, is executeable, and runs
         */
         if (rval == -1 || (wall.st_mode & S_IXUSR) == 0 ||
         (fp = popen(WALL_PROG, "w")) == NULL) {
         syslog(LOG_NOTICE,
         "rwall message received but could not execute 临时解决方法:
        如果您不能立刻安装补丁或者升级,CNNVD建议您采取以下措施以降低威胁:
        * rwalld服务不是必需的RPC服务,关闭它对于本地系统不会有任何不良影响,因此我们建议您关闭rwalld服务。
        具体方法是:
        1. 转变成root用户
         $ su -
         #
        2. 关闭rpc.rwalld服务
         使用您熟悉的编辑器打开/etc/inetd.conf文件,找到如下行:
         walld/1 tli rpc/datagram_v wait root /usr/lib/netsvc/rwall/rpc.rwalld rpc.rwalld
         在该行的开始处增加"#"号来将其注释:
         #walld/1 tli rpc/datagram_v wait root /usr/lib/netsvc/rwall/rpc.rwalld rpc.rwalld
         保存修改,退出编辑器。
        3. 禁止rpc.rwalld的执行权限(可选)
         # chmod 000 /usr/lib/netsvc/rwall/rpc.rwalld
        4. 重新启动inetd
         # ps -ef|grep inetd
         root 167 1 0 Oct 07 ? 0:07 /usr/sbin/inetd -s -t
         # kill -HUP 167 (上面的例子中,167是inetd的pid)
        厂商补丁:
        Sun
        ---
        目前厂商已经发布了升级补丁以修复这个安全问题:
        SPARC:
        Solaris 2.5.1 112891-01
        Solaris 2.6 112893-01
        Solaris 7 112899-01
        Solaris 8 112846-01
        Solaris 9 112875-01
        Intel:
        Solaris 2.5.1 112892-01
        Solaris 2.6 112894-01
        Solaris 7 112900-01
        Solaris 8 112847-01
         您可以使用下列链接来下载相应补丁:
        
        http://sunsolve.sun.com/pub-cgi/patchDownload.pl?target=<补丁ID>&method=h

         例如,对于代号为111596-02的补丁,您可以使用下列链接:
        
        http://sunsolve.sun.com/pub-cgi/patchDownload.pl?target=111596&method=h

         补丁安装方法:
         1. 首先用unzip或者uncompress命令将补丁包解压缩
         2. 然后使用patchadd 命令安装补丁,例如:
         # patchadd /var/spool/patch/104945-02
        假设要安装的补丁号是104945-02, 解压之后的目录在:"/var/spool/patch/104945-02"",
         WALL_PROG);
         syslog(LOG_NOTICE, msg);
        如果popen(WALL_PROG, "w")调用出错,程序会调用syslog()报告出错信息,由于错误的将客户端发来的信息(msg)作为格式串进行处理,客户端就可能利用这个漏洞重写内存内容,改变程序执行流程,并可能执行任意代码。
        攻击者利用这个漏洞需要能够使得popen调用失败,结合一些其他的攻击手法,比如设法删除rwalld或改变rwalld的属性和内容、耗尽系统进程或者文件描述符表等等。远程利用这个漏洞比较困难,但还是可能的。
        

- 公告与补丁

        

- 漏洞信息

778
Solaris rpc.rwalld Remote Format String Arbitrary Code Execution
Local Access Required, Remote / Network Access, Local / Remote, Context Dependent Input Manipulation
Loss of Confidentiality, Loss of Integrity, Loss of Availability
Exploit Public

- 漏洞描述

A format string vulnerability exists in Solaris's rpc.rwalld daemon. When the wall command cannot be executed, there is a format string vulnerability in the message which should be generated to the syslog function. If the attacker is able to force this message to be called, with a specially crafted request the attacker can cause remote execution of arbitrary code, resulting in a loss of confidentiality, integrity, and/or availability.

- 时间线

2002-04-30 Unknow
2002-04-30 Unknow

- 解决方案

Currently, there are no known workarounds or upgrades to correct this issue. However, Sun Microsystems has released a patch to address this vulnerability. It is also possible to correct the flaw by disabling the rwall daemon.

- 相关参考

- 漏洞作者

Unknown or Incomplete

- 漏洞信息

Sun Solaris RWall Daemon Syslog Format String Vulnerability
Input Validation Error 4639
Yes No
2002-04-30 12:00:00 2007-11-15 12:37:00
Vulnerability discovery credited to GOBBLES <gobbles@hushmail.com>.

- 受影响的程序版本

Sun Solaris 2.5.1 _x86
Sun Solaris 2.5.1
Sun Solaris 9
Sun Solaris 8_x86
Sun Solaris 8_sparc
Sun Solaris 7.0_x86
Sun Solaris 7.0
Sun Solaris 2.6_x86
Sun Solaris 2.6
IBM AIX 4.3.3
IBM AIX 4.3.2
IBM AIX 4.3.1
IBM AIX 4.3
IBM AIX 5.1

- 不受影响的程序版本

IBM AIX 4.3.3
IBM AIX 4.3.2
IBM AIX 4.3.1
IBM AIX 4.3
IBM AIX 5.1

- 漏洞讨论

Solaris is the freely available UNIX-derivative operating system developed and distributed by Sun Microsystems.

A format-string vulnerability allows attackers to execute arbitrary code on vulnerable systems. When malicious format strings are sent from one system to another, an insecure 'syslog' call may allow a remote attacker to exploit the call to execute arbitrary code.

- 漏洞利用

An exploit was released by GOBBLES.

UPDATE: Core Security Technologies has developed a working commercial exploit for its CORE IMPACT product. This exploit is not otherwise publicly available or known to be circulating in the wild.

- 解决方案

Sun has released fixes.


Sun Solaris 2.6

Sun Solaris 7.0

Sun Solaris 8_x86

Sun Solaris 2.6_x86

Sun Solaris 8_sparc

Sun Solaris 9

Sun Solaris 7.0_x86

Sun Solaris 2.5.1 _x86

Sun Solaris 2.5.1

- 相关参考

 

 

关于SCAP中文社区

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

版权声明

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