CVE-2003-1327
CVSS9.3
发布时间 :2003-12-31 00:00:00
修订时间 :2008-09-05 16:36:38
NMCO    

[原文]Buffer overflow in the SockPrintf function in wu-ftpd 2.6.2 and earlier, when compiled with MAIL_ADMIN option enabled on a system that supports very long pathnames, might allow remote anonymous users to execute arbitrary code by uploading a file with a long pathname, which triggers the overflow when wu-ftpd constructs a notification message to the administrator.


[CNNVD]Wu-Ftpd SockPrintf()远程栈缓冲区溢出漏洞(CNNVD-200312-075)

        
        Wu-ftpd是一个基于BSD ftpd的FTP服务器程序,由华盛顿大学维护。
        Wu-ftpd包含的SockPrintf()函数在处理输入时缺少正确的边界缓冲区检查,远程攻击者可以通过这个漏洞对服务器进行缓冲区溢出攻击,可能以root用户权限在系统上执行任意指令。
        问题存在于SockPrintf()函数使用vsprintf()时:
        "in file src/ftpd.c"
        int SockPrintf(FILE *sockfp, char *format,...)
        {
         va_list ap;
         char buf[32768];
         va_start(ap, format);
         vsprintf(buf, format, ap);
         va_end(ap);
         return SockWrite(buf, 1, strlen(buf), sockfp);
        }
        buf是字符数组(32768),vsprintf使用参数*format,然后在store()函数中:
        "in file src/ftpd.c"
        void store(char *name, char *mode, int unique)
        {
        ...
        ...
        #ifdef MAIL_ADMIN
        ...
        ...
         SockPrintf(sck, "From: wu-ftpd <厂商补丁:
        Slackware
        ---------
        目前厂商已经发布了升级补丁以修复这个安全问题,请到厂商的主页下载:
        Updated package for Slackware 9.0:
        ftp://ftp.slackware.com/pub/slackware/slackware-9.0/pasture/dontuse/wu-ftpd/wu-ftpd-2.6.2-i386-3.tgz
        Updated package for Slackware -current:
        ftp://ftp.slackware.com/pub/slackware/slackware-current/pasture/dontuse/wu-ftpd/wu-ftpd-2.6.2-i486-3.tgz>\r\n", mailfrom);
         SockPrintf(sck, "Subject: New file uploaded: \r\n\r\n", name);
        ...
         SockPrintf(sck, " uploaded from .\r\nFile size is %d.\r\n
        Please move the file where it belongs.\r\n",guestpw, pathname, remotehost, byte_count);
        ...
        #endif /* MAIL_ADMIN */
        ...
        ...
        }
        这个函数攻击者可以控制参数名,因此可以远程调用:
        SockPrintf(sck, "Subject: New file uploaded: \r\n\r\n", name);
        并触发溢出,攻击者可以通过精心构建超长的文件路径,可能以root用户权限在系统上执行任意指令。
        不过此漏洞不存在默认安装Wu-Ftpd服务程序中,服务器必须以'MAIL_ADMIN'选项配置才存在此漏洞。
        

- CVSS (基础分值)

CVSS分值: 9.3 [严重(HIGH)]
机密性影响: COMPLETE [完全的信息泄露导致所有系统文件暴露]
完整性影响: COMPLETE [系统完整性可被完全破坏]
可用性影响: COMPLETE [可能导致系统完全宕机]
攻击复杂度: MEDIUM [漏洞利用存在一定的访问条件]
攻击向量: NETWORK [攻击者不需要获取内网访问权或本地访问权]
身份认证: NONE [漏洞利用无需身份认证]

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

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

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

未找到相关OVAL定义

- 官方数据库链接

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

- 其它链接及资源

http://xforce.iss.net/xforce/xfdb/13269
(UNKNOWN)  XF  wuftp-mailadmin-sockprintf-bo(13269)
http://www.slackware.org/security/viewer.php?l=slackware-security&y=2003&m=slackware-security.365971
(UNKNOWN)  SLACKWARE  SSA:2003-259-03
http://www.securityfocus.com/bid/8668
(UNKNOWN)  BID  8668
http://www.osvdb.org/2594
(UNKNOWN)  OSVDB  2594
http://securitytracker.com/id?1007775
(UNKNOWN)  SECTRACK  1007775
http://secunia.com/advisories/9835
(VENDOR_ADVISORY)  SECUNIA  9835
http://archives.neohapsis.com/archives/bugtraq/2003-09/0348.html
(UNKNOWN)  BUGTRAQ  20030922 Wu_ftpd all versions (not) vulnerability.

- 漏洞信息

Wu-Ftpd SockPrintf()远程栈缓冲区溢出漏洞
高危 边界条件错误
2003-12-31 00:00:00 2007-05-18 00:00:00
远程  
        
        Wu-ftpd是一个基于BSD ftpd的FTP服务器程序,由华盛顿大学维护。
        Wu-ftpd包含的SockPrintf()函数在处理输入时缺少正确的边界缓冲区检查,远程攻击者可以通过这个漏洞对服务器进行缓冲区溢出攻击,可能以root用户权限在系统上执行任意指令。
        问题存在于SockPrintf()函数使用vsprintf()时:
        "in file src/ftpd.c"
        int SockPrintf(FILE *sockfp, char *format,...)
        {
         va_list ap;
         char buf[32768];
         va_start(ap, format);
         vsprintf(buf, format, ap);
         va_end(ap);
         return SockWrite(buf, 1, strlen(buf), sockfp);
        }
        buf是字符数组(32768),vsprintf使用参数*format,然后在store()函数中:
        "in file src/ftpd.c"
        void store(char *name, char *mode, int unique)
        {
        ...
        ...
        #ifdef MAIL_ADMIN
        ...
        ...
         SockPrintf(sck, "From: wu-ftpd <厂商补丁:
        Slackware
        ---------
        目前厂商已经发布了升级补丁以修复这个安全问题,请到厂商的主页下载:
        Updated package for Slackware 9.0:
        ftp://ftp.slackware.com/pub/slackware/slackware-9.0/pasture/dontuse/wu-ftpd/wu-ftpd-2.6.2-i386-3.tgz
        Updated package for Slackware -current:
        ftp://ftp.slackware.com/pub/slackware/slackware-current/pasture/dontuse/wu-ftpd/wu-ftpd-2.6.2-i486-3.tgz>\r\n", mailfrom);
         SockPrintf(sck, "Subject: New file uploaded: \r\n\r\n", name);
        ...
         SockPrintf(sck, " uploaded from .\r\nFile size is %d.\r\n
        Please move the file where it belongs.\r\n",guestpw, pathname, remotehost, byte_count);
        ...
        #endif /* MAIL_ADMIN */
        ...
        ...
        }
        这个函数攻击者可以控制参数名,因此可以远程调用:
        SockPrintf(sck, "Subject: New file uploaded: \r\n\r\n", name);
        并触发溢出,攻击者可以通过精心构建超长的文件路径,可能以root用户权限在系统上执行任意指令。
        不过此漏洞不存在默认安装Wu-Ftpd服务程序中,服务器必须以'MAIL_ADMIN'选项配置才存在此漏洞。
        

- 公告与补丁

        

- 漏洞信息

2594
WU-FTPD MAIL_ADMIN Function Remote Overflow
Remote / Network Access Input Manipulation
Loss of Integrity, Loss of Availability
Exploit Unknown

- 漏洞描述

A remote overflow exists in wu-ftpd. A SockPrintf call in ftpd.c fails to properly check bounds on a pathname when wu-ftpd is compiled with MAIL_ADMIN enabled resulting in a buffer overflow. With a specially crafted request, an attacker can possibly execute arbitrary code as the user wu-ftpd runs as (usually root) resulting in a loss of integrity, and/or availability.

- 时间线

2003-09-22 Unknow
Unknow Unknow

- 解决方案

Currently, there are no known upgrades or patches to correct this issue. It is possible to correct the flaw by implementing the following workaround(s): do not compile wu-ftpd with MAIL_ADMIN defined/enabled (by default, MAIL_ADMIN is not defined).

- 相关参考

- 漏洞作者

 

 

关于SCAP中文社区

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

版权声明

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