apt-www-proxy NULL HTTP请求远程拒绝服务攻击漏洞
发布日期:2002-12-09
更新日期:2002-12-16
受影响系统:apt-www-proxy apt-www-proxy 0.1
描述:
BUGTRAQ ID:
6339
apt-www-proxy是一款代理服务器,特别设计用于apt-get http:// 形式的知识库。
apt-www-proxy中的utils.c代码在处理NULL HTTP请求时存在问题,远程攻击者可以利用这个漏洞对服务进行拒绝服务攻击。
在'utils.c'文件中:
__
260 int parse_get(struct client * client)
...
268 /* now match against the archives */
269 if(!strncmp("http://", client->get, 7)) // Here.
270 {
271 /* AHHA! It's a full URL. */
--
如果'client->get'值为NULL,strncmp()函数就会崩溃,程序函数执行结果如下:
----------------------------------------------------------------------
main()->main_loop()->process_cli()->parse_get()->strncmp()->'segfault'
----------------------------------------------------------------------
攻击者提供NULL HTTP请求,就可以导致服务崩溃,产生拒绝服务。
<*来源:dong-h0un U (
xploit@hackermail.com)
链接:
http://marc.theaimsgroup.com/?l=bugtraq&m=103953928107521&w=2
*>
测试方法:
警 告
以下程序(方法)可能带有攻击性,仅供安全研究与教学之用。使用者风险自负!
dong-h0un U (
xploit@hackermail.com)提供了如下测试方法:
bash$ (printf "\r\n";cat)|nc 0 6543
建议:
临时解决方法:
如果您不能立刻安装补丁或者升级,NSFOCUS建议您采取以下措施以降低威胁:
* "dong-h0un U" <
xploit@hackermail.com>提供如下第三方补丁:
=== utils.patch ===
--- utils.c Mon Oct 22 15:20:29 2001
+++ utils.patch.c Sat Nov 30 02:26:35 2002
@@ -224,11 +224,11 @@
/* log that information */
if(background)
{
- syslog(level, message);
+ syslog(level, "%s", message);
}
else
{
- fprintf(stderr, message);
+ fprintf(stderr, "%s", message);
}
}
}
@@ -265,6 +265,10 @@
struct urlmask *curu = urls;
int found = 0;
+ if(client->get==NULL)
+ {
+ return(0);
+ }
/* now match against the archives */
if(!strncmp("http://", client->get, 7))
{
=== eof ===
厂商补丁:
apt-www-proxy
-------------
目前厂商还没有提供补丁或者升级程序,我们建议使用此软件的用户随时关注厂商的主页以获取最新版本:
http://ironsides.terrabox.com/~ahzz/index.html浏览次数:3609
严重程度:0(网友投票)