sredird LogMsg()格式串及HandleCPCCommand()缓冲区溢出漏洞

漏洞信息详情

sredird LogMsg()格式串及HandleCPCCommand()缓冲区溢出漏洞

漏洞简介

sredird是一款端口重定向服务程序。
sredird存在格式串问题和缓冲区溢出漏洞,远程攻击者可以利用这个漏洞以进程权限在系统上执行任意指令。
Max Vozeler报告在\’\’sredird.c\’\’文件中的LogMsg()函数里存在格式串问题,用户提供的数据没有任何处理直接传递给LogMsg()函数。精心构建提交数据可以破坏堆信息,可能以进程权限在系统上执行任意指令。
另外HandleCPCCommand()函数中的LogStr在处理sprintf()输出时没有进行正确边界检查,超长数据可触发基于堆栈的缓冲区溢出。

漏洞公告

临时解决方法:
如果您不能立刻安装补丁或者升级,CNNVD建议您采取以下措施以降低威胁:

* Max Vozeler <max@hinterhof.net>提供如下第三方补丁:

— sredird.c.orig 2004-05-01 21:45:49.000000000 +0200

+++ sredird.c 2004-05-01 21:46:05.000000000 +0200

@@ -460,7 +460,7 @@

void LogMsg(int LogLevel, const char * const Msg)

{

if (LogLevel <= MaxLogLevel)

– syslog(LogLevel,Msg);

+ syslog(LogLevel,”%s”,Msg);

}

/* Try to lock the file given in LockFile as pid LockPid using the classical

— sredird.c.orig 2004-05-01 22:09:28.000000000 +0200

+++ sredird.c 2004-05-01 22:10:10.000000000 +0200

@@ -1390,7 +1390,7 @@

{

/* Received client signature */

strncpy(SigStr,(char *) &Command[4],CSize – 6);

– sprintf(LogStr,”Received client signature: %s”,SigStr);

+ snprintf(LogStr,sizeof(LogStr)-1,”Received client signature: %s”,SigStr);

LogMsg(LOG_INFO,LogStr);

}

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

http://www.ibiblio.org/pub/Linux/system/serial/” target=”_blank”>
http://www.ibiblio.org/pub/Linux/system/serial/

参考网址

来源: BID
名称: 11031
链接:http://www.securityfocus.com/bid/11031

来源: OSVDB
名称: 8375
链接:http://www.osvdb.org/8375

来源: XF
名称: sredird-logmsg-format-string(17056)
链接:http://xforce.iss.net/xforce/xfdb/17056

来源: BID
名称: 11002
链接:http://www.securityfocus.com/bid/11002

来源: OSVDB
名称: 9104
链接:http://www.osvdb.org/9104

来源: SECTRACK
名称: 1011038
链接:http://securitytracker.com/id?1011038

来源: SECUNIA
名称: 12351
链接:http://secunia.com/advisories/12351

来源: cvs.lysator.liu.se
链接:http://cvs.lysator.liu.se/viewcvs/viewcvs.cgi/sercd/sercd.c?root=sercd

来源:NSFOCUS
名称:6839
链接:http://www.nsfocus.net/vulndb/6839

© 版权声明
THE END
喜欢就支持一下吧
点赞0 分享