|漏洞详情
Posadis是一款开放源代码的无缓冲DNS服务程序,设计目标是方便使用和配置,运行在Linux、Unix、Microsoft操作系统下。Posadis在日志函数中存在格式字符串漏洞,可导致攻击者利用此漏洞执行任意代码或者进行拒绝服务攻击。问题存在于log.cpp的日志函数上:—voidlog_print(message_log_levellog_level,char*logmsg,…){charbuff[4096];longtsecs;structtm*tstruct;va_listargs;/*compilebuffer*/tsecs=time(NULL);tstruct=localtime(&tsecs);sprintf(buff,”%04d/%02d/%02d%02d:%02d|”,tstruct->tm_year+1900,tstruct->tm_mon+1,tstruct->tm_mday,tstruct->tm_hour,tstruct->tm_min);switch(log_level){caseLOG_LEVEL_INFO:strcat(buff,”INFO:”);break;caseLOG_LEVEL_WARNING:strcat(buff,”WARNING:”);break;caseLOG_LEVEL_ERROR:strcat(buff,”ERROR:”);break;caseLOG_LEVEL_PANIC:strcat(buff,”PANIC:”);break;}va_start(args,logmsg);vsprintf(&buff[strlen(buff)],logmsg,args);va_end(args);strcat(buff,”n”);/*andprintittovarioustargets*/if(!no_stdout_log)printf(buff);<–hehif(logfile)fprintf(logfile,buff);<–heh#ifdef_WIN32w32dlg_add_log_item(buff);#endif#ifdefHAVE_SYSLOG_Hsyslog(log_level,”%s”,strchr(buff,’|’)+1);#endif}—攻击者可以使用一个包含格式串的恶意字符串作为参数提供
|参考资料
来源:BID
名称:4378
链接:http://www.securityfocus.com/bid/4378
来源:XF
名称:posadis-logging-format-string(8653)
链接:http://www.iss.net/security_center/static/8653.php
来源:sourceforge.net
链接:http://sourceforge.net/forum/forum.php?forum_id=165094
来源:BUGTRAQ
名称:20020327FormatStringBuginPosadisDNSServer
链接:http://online.securityfocus.com/archive/1/264450
来源:OSVDB
名称:3516
链接:http://www.osvdb.org/3516