漏洞信息详情
Lighttpd Mod_Fast CGI模块请求头远程溢出漏洞
漏洞简介
lighttpd是德国软件开发者Jan Kneschke所研发的一款开源的Web服务器,它的主要特点是仅需少量的内存及CPU资源即可达到同类网页服务器的性能。
Lighttpd的mod_fastcgi扩展在处理HTTP请求头时存在缓冲区溢出漏洞,远程攻击者可能利用此漏洞控制服务器。
fcgi_env_add_request_headers(srv, con, p);
fcgi_header(&(header), FCGI_PARAMS, request_id, p->fcgi_env->used, 0);
buffer_append_memory(b, (const char *)&header, sizeof(header));
buffer_append_memory(b, (const char *)p->fcgi_env->ptr, p->fcgi_env->used);
上面的代码会读取所有客户端所请求的头并创建fastcgi头,然后将fastcgi头发送给PHP,但没有考虑contentLength是否大于0xffff,因此可能出现溢出:
static int fcgi_header(FCGI_Header * header, unsigned char type, size_t request_id, int contentLength, unsigned char paddingLength) {
...
header->contentLengthB0 = contentLength & 0xff;
header->contentLengthB1 = (contentLength >> 8) & 0xff;
...
如果用户所提交的HTTP请求包含有超长头的话,就可能添加或替换PHP头,如SCRIPT_FILENAME,导致执行任意指令。
漏洞公告
目前厂商已经发布了升级补丁以修复这个安全问题,请到厂商的主页下载:
http://www.lighttpd.net/download/lighttpd-1.4.18.tar.bz2
参考网址
来源: www.lighttpd.net
链接:http://www.lighttpd.net/assets/2007/9/9/lighttpd_sa_2007_12.txt
来源: trac.lighttpd.net
链接:http://trac.lighttpd.net/trac/changeset/1986
来源: MISC
链接:http://secweb.se/en/advisories/lighttpd-fastcgi-remote-vulnerability/
来源: SECUNIA
名称: 26732
链接:http://secunia.com/advisories/26732
来源: issues.rpath.com
链接:https://issues.rpath.com/browse/RPL-1715
来源: MISC
链接:https://bugzilla.redhat.com/show_bug.cgi?id=284511
来源: XF
名称: lighttpd-modfastcgi-code-execution(36526)
链接:http://xforce.iss.net/xforce/xfdb/36526
来源: BID
名称: 25622
链接:http://www.securityfocus.com/bid/25622
来源: BUGTRAQ
名称: 20070917 FLEA-2007-0054-1 lighttpd
链接:http://www.securityfocus.com/archive/1/archive/1/479763/100/0/threaded
来源: SUSE
名称: SUSE-SR:2007:020
链接:http://www.novell.com/linux/security/advisories/2007_20_sr.html
来源: GENTOO
名称: GLSA-200709-16
链接:http://www.gentoo.org/security/en/glsa/glsa-200709-16.xml
来源: VUPEN
名称: ADV-2007-3110
链接:http://www.frsirt.com/english/advisories/2007/3110
来源: SREASON
名称: 3127
链接:http://securityreason.com/securityalert/3127
来源: SECUNIA
名称: 27229
链接:http://secunia.com/advisories/27229
来源: SECUNIA
名称: 26997
链接:http://secunia.com/advisories/26997
来源: SECUNIA
名称: 26824
链接:http://secunia.com/advisories/26824
来源: SECUNIA
名称: 26794
链接:http://secunia.com/advisories/26794
来源: FEDORA
名称: FEDORA-2007-2132
链接:http://fedoranews.org/updates/FEDORA-2007-213.shtml
受影响实体
- Lighttpd Lighttpd:1.4.15<!--2000-1-1-->
补丁
暂无
还没有评论,来说两句吧...