CVE-2004-0377
CVSS10.0
发布时间 :2004-05-04 00:00:00
修订时间 :2016-10-17 22:44:48
NMCOPS    

[原文]Buffer overflow in the win32_stat function for (1) ActiveState's ActivePerl and (2) Larry Wall's Perl before 5.8.3 allows local or remote attackers to execute arbitrary commands via filenames that end in a backslash character.


[CNNVD]Perl win32_stat函数远程缓冲区溢出漏洞(CNNVD-200405-015)

        
        Perl是流行的跨平台编程语言。
        ActivePerl和Larry Wall's Perl包含的'win32_stat'函数缺少正确的边界缓冲区检查,远程攻击者可以利用这个漏洞进行缓冲区溢出攻击,可能以进程权限在系统上执行任意指令。
        如果传递以反斜线符号结尾的文件名给这个'win32_stat'函数时,它拷贝数据到固定长度的缓冲区时,对字符串缺少正确的边界缓冲区检查,超长的字符串可覆盖堆栈中的控制信息,造成任意指令执行。
        如果WEB包含的PERL脚本使用了这些函数,并允许用户提供路径名,就可能以WEB进程权限在系统上执行任意指令。
        

- CVSS (基础分值)

CVSS分值: 10 [严重(HIGH)]
机密性影响: [--]
完整性影响: [--]
可用性影响: [--]
攻击复杂度: [--]
攻击向量: [--]
身份认证: [--]

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

cpe:/a:larry_wall:perl:5.8.3
cpe:/a:activestate:activeperlActiveState ActivePerl

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

未找到相关OVAL定义

- 官方数据库链接

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

- 其它链接及资源

http://lists.grok.org.uk/pipermail/full-disclosure/2004-April/019794.html
(VENDOR_ADVISORY)  FULLDISC  20040405 iDEFENSE Security Advisory 04.05.04: Perl win32_stat Function
http://marc.info/?l=bugtraq&m=108118694327979&w=2
(UNKNOWN)  BUGTRAQ  20040405 [Full-Disclosure] iDEFENSE Security Advisory 04.05.04: Perl win32_stat Function
http://public.activestate.com/cgi-bin/perlbrowse?patch=22552
(UNKNOWN)  CONFIRM  http://public.activestate.com/cgi-bin/perlbrowse?patch=22552
http://www.idefense.com/application/poi/display?id=93&type=vulnerabilities
(UNKNOWN)  MISC  http://www.idefense.com/application/poi/display?id=93&type=vulnerabilities
http://www.kb.cert.org/vuls/id/722414
(VENDOR_ADVISORY)  CERT-VN  VU#722414
http://xforce.iss.net/xforce/xfdb/15732
(VENDOR_ADVISORY)  XF  perl-win32stat-bo(15732)

- 漏洞信息

Perl win32_stat函数远程缓冲区溢出漏洞
危急 边界条件错误
2004-05-04 00:00:00 2005-10-20 00:00:00
远程  
        
        Perl是流行的跨平台编程语言。
        ActivePerl和Larry Wall's Perl包含的'win32_stat'函数缺少正确的边界缓冲区检查,远程攻击者可以利用这个漏洞进行缓冲区溢出攻击,可能以进程权限在系统上执行任意指令。
        如果传递以反斜线符号结尾的文件名给这个'win32_stat'函数时,它拷贝数据到固定长度的缓冲区时,对字符串缺少正确的边界缓冲区检查,超长的字符串可覆盖堆栈中的控制信息,造成任意指令执行。
        如果WEB包含的PERL脚本使用了这些函数,并允许用户提供路径名,就可能以WEB进程权限在系统上执行任意指令。
        

- 公告与补丁

        厂商补丁:
        Larry Wall
        ----------
        目前厂商已经发布了升级补丁以修复这个安全问题,请到厂商的主页下载:
        Committed to the Perl 5.9.x development branch:
        
        http://public.activestate.com/cgi-bin/perlbrowse?patch=22466

        Integrated into Perl 5.8.x maintenance branch as part of:
        
        http://public.activestate.com/cgi-bin/perlbrowse?patch=22552

- 漏洞信息 (F33009)

idefense-040504.txt (PacketStormID:F33009)
2004-04-05 00:00:00
Greg MacManus  idefense.com
advisory,remote,overflow,arbitrary
CVE-2004-0377
[点击下载]

Remote exploitation of a buffer overflow in the win32_stat function of ActiveState's ActivePerl may allow arbitrary commands to be executed. No check is made on the length of the string before the copy is made allowing long strings to overwrite control information and execution of arbitrary code possible.

Perl win32_stat Function Buffer Overflow Vulnerability

iDEFENSE Security Advisory 04.05.04
www.idefense.com/application/poi/display?id=93&type=vulnerabilities
April 5, 2004

I. BACKGROUND

Perl is a popular programming language due to its text manipulation
capabilities and rapid development cycle. It is open source, cross
platform and used for mission critical projects in the public and
private sector.

II. DESCRIPTION

Remote exploitation of a buffer overflow in the 'win32_stat' function of
ActiveState's ActivePerl and Larry Wall's Perl could allow for the
execution of arbitrary commands.

If the filename passed to the function ends with a backslash character,
it is copied into a fixed length buffer. There is no check made on the
length of the string before the copy, allowing an excessively long
string to overwrite control information, allowing execution of arbitrary
code.

The problem specifically exists within the win32 wrapper to the stat()
routine and hence the Unix builds of Perl are not affected.

III. ANALYSIS

The 'win32_stat' function is a wrapper around the 'stat' function and
the file test operators ('-r', '-w', '-e', '-d' etc) on Win32 based
platforms.

If a web site contains a Perl script that uses any of these functions
with user supplied pathnames, it may be possible to remotely execute
commands.

IV. DETECTION

All versions of Perl for Win32 operating systems up to and including
5.8.3 are affected.

V. VENDOR RESPONSE

The fix will be incorporated into core Perl 5.8.4. Patches are currently
available at the following locations:

Committed to the Perl 5.9.x development branch:

   http://public.activestate.com/cgi-bin/perlbrowse?patch=22466

Integrated into Perl 5.8.x maintenance branch as part of:

   http://public.activestate.com/cgi-bin/perlbrowse?patch=22552

VI. CVE INFORMATION

The Common Vulnerabilities and Exposures (CVE) project has assigned the
name CAN-2004-0377 to this issue. This is a candidate for inclusion in
the CVE list (http://cve.mitre.org), which standardizes names for
security problems.

VII. DISCLOSURE TIMELINE

January 09, 2004     Vulnerability discovered by iDEFENSE
February 25, 2004    Initial vendor contact
February 26, 2004    iDEFENSE clients notified
February 26, 2004    Vendor response
April 05, 2004       Public disclosure

VIII. CREDIT

Greg MacManus (iDEFENSE Labs) is credited with this discovery.

Get paid for vulnerability research
http://www.idefense.com/poi/teams/vcp.jsp

IX. LEGAL NOTICES

Copyright (c) 2004 iDEFENSE, Inc.

Permission is granted for the redistribution of this alert
electronically. It may not be edited in any way without the express
written consent of iDEFENSE. If you wish to reprint the whole or any
part of this alert in any other medium other than electronically, please
email customerservice@idefense.com for permission.

Disclaimer: The information in the advisory is believed to be accurate
at the time of publishing based on currently available information. Use
of the information constitutes acceptance for use in an AS IS condition.
There are no warranties with regard to this information. Neither the
author nor the publisher accepts any liability for any direct, indirect,
or consequential loss or damage arising from use of, or reliance on,
this information.

_______________________________________________
Full-Disclosure - We believe in it.
Charter: http://lists.netsys.com/full-disclosure-charter.html
    

- 漏洞信息

4960
Perl / ActivePerl win32_stat Function Overflow
Local Access Required, Remote / Network Access Input Manipulation
Loss of Confidentiality, Loss of Integrity
Exploit Unknown

- 漏洞描述

A local overflow exists in Perl. The win32_stat function fails to validate filename input resulting in a buffer overflow. With a specially crafted request, an attacker can cause arbitrary code execution resulting in a loss of confidentiality, integrity, and/or availability.

- 时间线

2004-04-05 2004-01-09
Unknow Unknow

- 解决方案

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

- 相关参考

- 漏洞作者

- 漏洞信息

Perl 'win32_stat' function Remote Buffer Overflow Vulnerability
Boundary Condition Error 10050
Yes No
2004-04-05 12:00:00 2009-07-12 04:06:00
Discovery is credited to Greg MacManus.

- 受影响的程序版本

Larry Wall Perl 5.8.3
+ Gentoo Linux
+ Trustix Secure Linux 2.1
+ Trustix Secure Linux 2.0
+ Ubuntu Ubuntu Linux 4.1 ppc
+ Ubuntu Ubuntu Linux 4.1 ia64
+ Ubuntu Ubuntu Linux 4.1 ia32
Larry Wall Perl 5.8
+ Turbolinux Home
+ Turbolinux Turbolinux Desktop 10.0
Larry Wall Perl 5.6.1
+ Debian Linux 3.0 sparc
+ Debian Linux 3.0 s/390
+ Debian Linux 3.0 ppc
+ Debian Linux 3.0 mipsel
+ Debian Linux 3.0 mips
+ Debian Linux 3.0 m68k
+ Debian Linux 3.0 ia-64
+ Debian Linux 3.0 ia-32
+ Debian Linux 3.0 hppa
+ Debian Linux 3.0 arm
+ Debian Linux 3.0 alpha
+ Debian Linux 3.0
+ Turbolinux Turbolinux Server 8.0
+ Turbolinux Turbolinux Server 7.0
+ Turbolinux Turbolinux Workstation 8.0
+ Turbolinux Turbolinux Workstation 7.0
Larry Wall Perl 5.6
+ Mandriva Linux Mandrake 7.1
Larry Wall Perl 5.0 05_003
+ Debian Linux 2.2 sparc
+ Debian Linux 2.2 powerpc
+ Debian Linux 2.2 arm
+ Debian Linux 2.2 alpha
+ Debian Linux 2.2
+ Debian Linux 2.1 sparc
+ Debian Linux 2.1 alpha
+ Debian Linux 2.1 68k
+ Debian Linux 2.1
+ Mandriva Linux Mandrake 7.0
+ Mandriva Linux Mandrake 6.1
+ Mandriva Linux Mandrake 6.0
+ RedHat Linux 6.2 E sparc
+ RedHat Linux 6.2 E i386
+ RedHat Linux 6.2 E alpha
+ RedHat Linux 6.2 sparc
+ RedHat Linux 6.2 i386
+ RedHat Linux 6.2 alpha
+ RedHat Linux 6.1 sparc
+ RedHat Linux 6.1 i386
+ RedHat Linux 6.1 alpha
+ RedHat Linux 6.0 sparc
+ RedHat Linux 6.0 alpha
+ RedHat Linux 6.0
+ SCO eDesktop 2.4
+ SCO eServer 2.3
+ Trustix Trustix Secure Linux 1.1
+ Turbolinux Turbolinux 6.0.4
+ Turbolinux Turbolinux 6.0.3
+ Turbolinux Turbolinux 6.0.2
+ Turbolinux Turbolinux 6.0.1
+ Turbolinux Turbolinux 6.0
+ Turbolinux Turbolinux 4.4
+ Turbolinux Turbolinux 4.2
+ Turbolinux Turbolinux 4.0
Larry Wall Perl 5.0 05
Larry Wall Perl 5.0 04_05
+ RedHat Linux 5.2 sparc
+ RedHat Linux 5.2 i386
+ RedHat Linux 5.2 alpha
+ RedHat Linux 5.1
+ RedHat Linux 5.0
Larry Wall Perl 5.0 04
Larry Wall Perl 5.0 03
Activestate ActivePerl 5.9 dev
Activestate ActivePerl 5.8.3
Activestate ActivePerl 5.8.1
Activestate ActivePerl 5.8
Activestate ActivePerl 5.7.3
Activestate ActivePerl 5.7.2
Activestate ActivePerl 5.7.1
Activestate ActivePerl 5.6.3
Activestate ActivePerl 5.6.2
Activestate ActivePerl 5.6.1 .630
Activestate ActivePerl 5.6.1
- Linux kernel 2.0
- Microsoft Windows 2000 Advanced Server SP3
- Microsoft Windows 2000 Advanced Server SP2
- Microsoft Windows 2000 Advanced Server SP1
- Microsoft Windows 2000 Advanced Server
- Microsoft Windows 2000 Datacenter Server SP3
- Microsoft Windows 2000 Datacenter Server SP2
- Microsoft Windows 2000 Datacenter Server SP1
- Microsoft Windows 2000 Datacenter Server
- Microsoft Windows 2000 Professional SP3
- Microsoft Windows 2000 Professional SP2
- Microsoft Windows 2000 Professional SP1
- Microsoft Windows 2000 Professional
- Microsoft Windows 2000 Server SP3
- Microsoft Windows 2000 Server SP2
- Microsoft Windows 2000 Server SP1
- Microsoft Windows 2000 Server
- Microsoft Windows 95
- Microsoft Windows 98
- Microsoft Windows ME
- Microsoft Windows NT Enterprise Server 4.0 SP6a
- Microsoft Windows NT Enterprise Server 4.0 SP6
- Microsoft Windows NT Enterprise Server 4.0 SP5
- Microsoft Windows NT Enterprise Server 4.0 SP4
- Microsoft Windows NT Enterprise Server 4.0 SP3
- Microsoft Windows NT Enterprise Server 4.0 SP2
- Microsoft Windows NT Enterprise Server 4.0 SP1
- Microsoft Windows NT Enterprise Server 4.0
- Microsoft Windows NT Server 4.0 SP6a
- Microsoft Windows NT Server 4.0 SP6
- Microsoft Windows NT Server 4.0 SP5
- Microsoft Windows NT Server 4.0 SP4
- Microsoft Windows NT Server 4.0 SP3
- Microsoft Windows NT Server 4.0 SP2
- Microsoft Windows NT Server 4.0 SP1
- Microsoft Windows NT Server 4.0
- Microsoft Windows NT Terminal Server 4.0 SP6
- Microsoft Windows NT Terminal Server 4.0 SP5
- Microsoft Windows NT Terminal Server 4.0 SP4
- Microsoft Windows NT Terminal Server 4.0 SP3
- Microsoft Windows NT Terminal Server 4.0 SP2
- Microsoft Windows NT Terminal Server 4.0 SP1
- Microsoft Windows NT Terminal Server 4.0
- Microsoft Windows NT Workstation 4.0 SP6a
- Microsoft Windows NT Workstation 4.0 SP6
- Microsoft Windows NT Workstation 4.0 SP5
- Microsoft Windows NT Workstation 4.0 SP4
- Microsoft Windows NT Workstation 4.0 SP3
- Microsoft Windows NT Workstation 4.0 SP2
- Microsoft Windows NT Workstation 4.0 SP1
- Microsoft Windows NT Workstation 4.0
- Sun Solaris 2.6_sparc

- 漏洞讨论

It has been reported that a remote buffer overflow condition in the win32 wrapper to the stat() routine employed by Perl could allow an attacker to cause a denial of service condition or execute arbitrary code. The problem exists in the 'win32_stat' function due to insufficient boundary checking.

Perl versions 5.8.3 and prior for the Windows platforms are reported to be vulnerable to this issue.

- 漏洞利用

Currently we are not aware of any exploits for this issue. If you feel we are in error or are aware of more recent information, please mail us at: vuldb@securityfocus.com <mailto:vuldb@securityfocus.com>.

- 解决方案

Patches are availabe from Activestate for Perl 5.9 development branch and Perl 5.8 maintenance branch.


Activestate ActivePerl 5.8

Activestate ActivePerl 5.8.1

Activestate ActivePerl 5.8.3

Activestate ActivePerl 5.9 dev

- 相关参考

 

 

关于SCAP中文社区

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

版权声明

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