ntop认证头空指针引用拒绝服务漏洞
发布日期:2009-08-19
更新日期:2009-08-19
受影响系统:ntop.org ntop <= 3.3.10
描述:
BUGTRAQ ID:
36074
CVE(CAN) ID:
CVE-2009-2732
ntop是一个用来监视和分析unix系统网络使用状况的工具。
ntop在解析Basic认证的HTTP头时存在空指针应用漏洞。在接收到认证报文后ntop会base64解码值,然后基于冒号进行拆分。如果解码的字符串中不存在冒号,就会对用户名使用默认的NULL值。由于在认证过程中使用strlen()计算用户名的长度,在处理到空的值时会触发分段错误。以下是有漏洞的代码段:
static int checkHTTPpassword(char *theRequestedURL,
int theRequestedURLLen _UNUSED_,
char* thePw, int thePwLen) {
char outBuffer[65], tmpOutBuffer[65], *user = NULL, users[LEN_GENERAL_WORK_BUFFER];
.
.
.
if(outBuffer[i] == ':') {
outBuffer[i] = '\0';
user = outBuffer;
break;
}
.
.
.
if(strlen(user) >= sizeof(theHttpUser)) user[sizeof(theHttpUser)-1] = '\0';
.
.
.
<*来源:Brad Antoniewicz (
Brad.Antoniewicz@foundstone.com)
链接:
http://marc.info/?l=bugtraq&m=125062318614941&q=p3
http://secunia.com/advisories/36403/
*>
测试方法:
警 告
以下程序(方法)可能带有攻击性,仅供安全研究与教学之用。使用者风险自负!
http://marc.info/?l=bugtraq&m=125062318614941&q=p3建议:
厂商补丁:
ntop.org
--------
目前厂商还没有提供补丁或者升级程序,我们建议使用此软件的用户随时关注厂商的主页以获取最新版本:
http://www.ntop.org/浏览次数:2385
严重程度:0(网友投票)