mmmail POP3-SMTP存在格式字符串攻击漏洞发布时间:2002-06-13 更新时间:2002-06-13 严重程度:高 威胁程度:普通用户访问权限 错误类型:输入验证错误 利用方式:服务器模式 受影响系统 mmmail <= 0.0.13 (mmpop3d & mmsmtpd)详细描述 mmmail使用MYSQL提供SMTP和POP3守护程序,以非ROOT权限运行。 其中'mmpop3d'和'mmsmtpd' 程序中的'mmsyslog()'函数存在格式字符串漏洞,如果'__GLIBC__'定义的情况下会以'vsyslog()'方式操作,它调用'syslog(3)'函数使用远程用户提供的格式字符串,可导致攻击者提交恶意字符串而覆盖任意内存地址。 测试代码 test:~$ telnet test.lab.intexxia.com 110 Trying x.x.x.x... Connected to test.lab.intexxia.com. Escape character is '^]'. +OK pop3.somehost.net (mmpop3d (mmmail-0.0.13/mmondor)) Service ready USER %p%p - -ERR Invalid username In the log file : mmpop3d[2165]: 3CFC8B53 USER 0x8052f620x80a44fc mmsmtpd - ------- test:~$ telnet test.lab.intexxia.com 25 Trying x.x.x.x... Connected to test.lab.intexxia.com. Escape character is '^]'. 220 smtp.somehost.net (mmsmtpd (mmmail-0.0.13/mmondor)) Service ready HELO %p%p 501 Invalid hostname In the log file : mmsmtpd[2188]: 3CFC8BF9 HELO 0x8052e360x80a447c 解决方案 补丁:iff -dru mmmail-0.0.13/mmlib/mmlog.c mmmail-0.0.13.fixed/mmlib/mmlog.c - --- mmmail-0.0.13/mmlib/mmlog.c Mon May 13 08:20:13 2002 +++ mmmail-0.0.13.fixed/mmlib/mmlog.c Tue Jun 4 12:37:19 2002 @@ -70,7 +70,7 @@ va_start(lst, fmt); vsnprintf(buf, 1023, fmt, lst); va_end(lst); - - syslog(LOG_NOTICE, buf); + syslog(LOG_NOTICE, "%s", buf); } } 或者下载新程序: http://mmondor.gobot.ca/software/linux/mmmail-0.0.14.tar.gz 相关信息 Beno?t Roussel (benoit.roussel@intexxia.com) 参考:http://archives.neohapsis.com/archives/bugtraq/2002-06/0095.html |