GZip超长文件名缓冲区溢出漏洞

漏洞信息详情

GZip超长文件名缓冲区溢出漏洞

漏洞简介

gzip 1.3x,1.2.4及其其他版本存在缓冲区溢出漏洞。攻击者可以借助超长文件名执行代码,如果gzip运行在FTP服务器上该漏洞可能是远程的。

漏洞公告

The following patch has been offered by greg to fix the vulnerability:
— gzip.c Thu Aug 19 09:39:43 1993
+++ gzip-fix.c Sun Dec 30 13:57:44 2001
@@ -1006,7 +1006,7 @@
char *dot; /* pointer to ifname extension, or NULL */
#endif
– strcpy(ifname, iname);
+ strncpy(ifname, iname, sizeof(ifname) – 1);
/* If input file exists, return OK. */
if (do_stat(ifname, sbuf) == 0) return OK;
@@ -1683,7 +1683,7 @@
}
len = strlen(dir);
if (len + NLENGTH(dp) + 1 < MAX_PATH_LEN – 1) {
– strcpy(nbuf,dir);
+ strncpy(nbuf, dir, sizeof(nbuf) – 1);
if (len != 0 /* dir = “” means current dir on Amiga */
#ifdef PATH_SEP2
&& dir[len-1] != PATH_SEP2
Various vendor-supplied fixes have been made available.
GNU gzip 1.2.4
@dekode.org>

GNU gzip 1.2.4 a

参考网址

来源: BUGTRAQ
名称: 20011230 gzip bug w/ patch..
链接:http://online.securityfocus.com/archive/1/247717

来源: XF
名称: gzip-long-filename-bo(7882)
链接:http://www.iss.net/security_center/static/7882.php

来源: NETBSD
名称: NetBSD-SA2002-002
链接:ftp://ftp.netbsd.org/pub/NetBSD/security/advisories/NetBSD-SA2002-002.txt.asc

来源: BID
名称: 3712
链接:http://www.securityfocus.com/bid/3712

受影响实体

© 版权声明
THE END
喜欢就支持一下吧
点赞0 分享