CVE-2002-0501
CVSS7.2
发布时间 :2002-08-12 00:00:00
修订时间 :2008-09-05 16:28:11
NMCO    

[原文]Format string vulnerability in log_print() function of Posadis DNS server before version m5pre2 allows local users and possibly remote attackers to execute arbitrary code via format strings that are inserted into logging messages.


[CNNVD]Posadis DNS服务程序存在格式字符串漏洞(CNNVD-200208-123)

        
        Posadis是一款开放源代码的无缓冲DNS服务程序,设计目标是方便使用和配置,运行在Linux、Unix、Microsoft操作系统下。
        Posadis在日志函数中存在格式字符串漏洞,可导致攻击者利用此漏洞执行任意代码或者进行拒绝服务攻击。
        问题存在于log.cpp的日志函数上:
        ---
        void log_print(message_log_level log_level, char *logmsg, ...) {
         char buff[4096];
         long tsecs;
         struct tm *tstruct;
         va_list args;
         /* compile buffer */
         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) {
         case LOG_LEVEL_INFO: strcat(buff, "INFO: "); break;
         case LOG_LEVEL_WARNING: strcat(buff, "WARNING: "); break;
         case LOG_LEVEL_ERROR: strcat(buff, "ERROR: "); break;
         case LOG_LEVEL_PANIC: strcat(buff, "PANIC: "); break;
         }
         va_start(args, logmsg);
         vsprintf(&buff[strlen(buff)], logmsg, args);
         va_end(args);
         strcat(buff, "\n");
         /* and print it to various targets */
         if (!no_stdout_log) printf(buff); <-- heh
         if (logfile) fprintf(logfile, buff); <-- heh
        #ifdef _WIN32
         w32dlg_add_log_item(buff);
        #endif
        #ifdef HAVE_SYSLOG_H
         syslog(log_level, "厂商补丁:
        Posadis
        -------
        目前厂商还没有提供补丁或者升级程序,我们建议使用此软件的用户随时关注厂商的主页以获取最新版本:
        
        http://posadis.sourceforge.net/
", strchr(buff, '|') + 1);
        #endif
        }
        ---
        攻击者可以使用一个包含格式串的恶意字符串作为参数提供给printf函数,这可能导致攻击者任意修改任意内存的内容。这样,攻击者可能通过覆盖一个函数的返回地址,以DNS服务进程权限执行攻击者指定的任意代码。
        

- CVSS (基础分值)

CVSS分值: 7.2 [严重(HIGH)]
机密性影响: COMPLETE [完全的信息泄露导致所有系统文件暴露]
完整性影响: COMPLETE [系统完整性可被完全破坏]
可用性影响: COMPLETE [可能导致系统完全宕机]
攻击复杂度: LOW [漏洞利用没有访问限制 ]
攻击向量: LOCAL [漏洞利用需要具有物理访问权限或本地帐户]
身份认证: NONE [漏洞利用无需身份认证]

- CPE (受影响的平台与产品)

产品及版本信息(CPE)暂不可用

- OVAL (用于检测的技术细节)

未找到相关OVAL定义

- 官方数据库链接

http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2002-0501
(官方数据源) MITRE
http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2002-0501
(官方数据源) NVD
http://www.cnnvd.org.cn/vulnerability/show/cv_cnnvdid/CNNVD-200208-123
(官方数据源) CNNVD

- 其它链接及资源

http://www.securityfocus.com/bid/4378
(VENDOR_ADVISORY)  BID  4378
http://www.iss.net/security_center/static/8653.php
(VENDOR_ADVISORY)  XF  posadis-logging-format-string(8653)
http://sourceforge.net/forum/forum.php?forum_id=165094
(UNKNOWN)  CONFIRM  http://sourceforge.net/forum/forum.php?forum_id=165094
http://online.securityfocus.com/archive/1/264450
(VENDOR_ADVISORY)  BUGTRAQ  20020327 Format String Bug in Posadis DNS Server
http://www.osvdb.org/3516
(UNKNOWN)  OSVDB  3516

- 漏洞信息

Posadis DNS服务程序存在格式字符串漏洞
高危 未知
2002-08-12 00:00:00 2005-05-02 00:00:00
本地  
        
        Posadis是一款开放源代码的无缓冲DNS服务程序,设计目标是方便使用和配置,运行在Linux、Unix、Microsoft操作系统下。
        Posadis在日志函数中存在格式字符串漏洞,可导致攻击者利用此漏洞执行任意代码或者进行拒绝服务攻击。
        问题存在于log.cpp的日志函数上:
        ---
        void log_print(message_log_level log_level, char *logmsg, ...) {
         char buff[4096];
         long tsecs;
         struct tm *tstruct;
         va_list args;
         /* compile buffer */
         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) {
         case LOG_LEVEL_INFO: strcat(buff, "INFO: "); break;
         case LOG_LEVEL_WARNING: strcat(buff, "WARNING: "); break;
         case LOG_LEVEL_ERROR: strcat(buff, "ERROR: "); break;
         case LOG_LEVEL_PANIC: strcat(buff, "PANIC: "); break;
         }
         va_start(args, logmsg);
         vsprintf(&buff[strlen(buff)], logmsg, args);
         va_end(args);
         strcat(buff, "\n");
         /* and print it to various targets */
         if (!no_stdout_log) printf(buff); <-- heh
         if (logfile) fprintf(logfile, buff); <-- heh
        #ifdef _WIN32
         w32dlg_add_log_item(buff);
        #endif
        #ifdef HAVE_SYSLOG_H
         syslog(log_level, "厂商补丁:
        Posadis
        -------
        目前厂商还没有提供补丁或者升级程序,我们建议使用此软件的用户随时关注厂商的主页以获取最新版本:
        
        http://posadis.sourceforge.net/
", strchr(buff, '|') + 1);
        #endif
        }
        ---
        攻击者可以使用一个包含格式串的恶意字符串作为参数提供给printf函数,这可能导致攻击者任意修改任意内存的内容。这样,攻击者可能通过覆盖一个函数的返回地址,以DNS服务进程权限执行攻击者指定的任意代码。
        

- 公告与补丁

        

- 漏洞信息

3516
Posadis log_print() Format String Execute Arbitrary Code
Local / Remote, Context Dependent Input Manipulation
Loss of Integrity

- 漏洞描述

Posadis DNS Server contains a flaw that allows a remote attacker to create a denial of service. The issue is due to a format string vulnerability in the log_print() function of the DNS server. If exploited, the attacker can crash the DNS service and possibly execute arbitrary code on the host.

- 时间线

2002-03-27 Unknow
Unknow Unknow

- 解决方案

Upgrade to version m5pre2 or higher, as it has been reported to fix this vulnerability. An upgrade is required as there are no known workarounds.

- 相关参考

- 漏洞作者

Unknown or Incomplete
 

 

关于SCAP中文社区

SCAP中文社区是国内第一个以SCAP为主题的中文开放社区。了解更多信息,请查阅[关于本站]

版权声明

CVE/CWE/OVAL均为MITRE公司的注册商标,它们的官方数据源均保存在MITRE公司的相关网站