安全研究

安全漏洞
ghttpd Log()函数远程缓冲区溢出漏洞

发布日期:2002-10-15
更新日期:2002-10-18

受影响系统:
ghttpd ghttpd 1.4.3
ghttpd ghttpd 1.4.2
ghttpd ghttpd 1.4.1
ghttpd ghttpd 1.4
描述:
BUGTRAQ  ID: 5960
CVE(CAN) ID: CVE-2002-1904

Ghttpd是一款快速高效支持CGI的HTTP服务程序。

Ghttpd程序对GET请求缺少正确的缓冲区边界检查,远程攻击者可以利用这个漏洞进行缓冲区溢出攻击,可能以WEB进程权限在系统上执行任意指令。

缓冲区溢出发生在当WEB服务程序接收到超长的"GET <buffer>"请求,并由Log()函数记录的时候:

    protocol.c:103:
    Log("Connection from %s, request = \"GET %s\"",
         inet_ntoa(sa.sin_addr), ptr);

当执行Log()函数的时候拷贝数据到缓冲区时没有正确检查边界,导致发生缓冲区溢出:

    util.c:208: void Log(char *format, ...)
    util.c:213: char temp[200], temp2[200], logfilename[255];
    util.c:219: vsprintf(temp, format, ap);

精心构建提交数据可能以WEB进程权限在系统上执行任意指令。

<*来源:Marc Pompl (pyramid-rp@hushmail.com
  
  链接:http://marc.theaimsgroup.com/?l=bugtraq&m=103463200529632&w=2
*>

建议:
临时解决方法:

如果您不能立刻安装补丁或者升级,NSFOCUS建议您采取以下措施以降低威胁:

* Marc Pompl提供如下第三方补丁程序:

ghttpd ghttpd 1.4:
ghttpd ghttpd 1.4.1:
ghttpd ghttpd 1.4.2:
ghttpd ghttpd 1.4.3:

Marc Pompl Patch ghttpd-1.4-3.diff
http://lynorics.sundawn.net/prog/ghttpd-1.4-3.diff

厂商补丁:

ghttpd
------
目前厂商还没有提供补丁或者升级程序,我们建议使用此软件的用户随时关注厂商的主页以获取最新版本:

http://lynorics.sundawn.net/prog/ghttpd.html

浏览次数:3724
严重程度:0(网友投票)
本安全漏洞由绿盟科技翻译整理,版权所有,未经许可,不得转载
绿盟科技给您安全的保障