[UNIX] zoo Stack Overflow
- From: SecuriTeam <support@xxxxxxxxxxxxxx>
- Date: 27 Feb 2006 18:29:34 +0200
The following security advisory is sent to the securiteam mailing list, and can be found at the SecuriTeam web site: http://www.securiteam.com
- - promotion
The SecuriTeam alerts list - Free, Accurate, Independent.
Get your security news from a reliable source.
http://www.securiteam.com/mailinglist.html
- - - - - - - - -
zoo Stack Overflow
------------------------------------------------------------------------
SUMMARY
zoo is a file archiving utility for maintaining collections of files. It
uses Lempel-Ziv compression to provide space savings in the range of 20 to
80 percent depending on the type of data. Written by Rahul Dhesi, and
posted to the USENET newsgroup comp.sources.misc.
A specially crafted archive may trigger a stack overflow in zoo, and allow
an attacker to seize control of the program.
DETAILS
fullpath()/misc.c accepts a pointer to a directory entry and returns the
combined directory name and filename. fullpath() calls the function
combine()/misc.c, and assume that the length of the string returned is
never
longer than 256 bytes. In fact, the string returned can be made a little
longer than 512 bytes.
If the string is in fact longer than 256 bytes, a static variable can be
overflowed in the function fullpath()/misc.c . This string is later used
in a strcpy() on a destination buffer of 256 bytes on the stack.
It is then easy to overwrite EIP and take control of the program.
Patch:
diff -u -r -r zoo-2.10.old/misc.c zoo-2.10.orig/misc.c
--- zoo-2.10.old/misc.c 1991-07-05 12:00:00.000000000 -0400
+++ zoo-2.10.orig/misc.c 2006-01-29 17:20:35.000000000 -0500
@@ -135,11 +135,16 @@
char *fullpath (direntry)
struct direntry *direntry;
{
- static char result[PATHSIZE];
+ static char result[PATHSIZE+PATHSIZE+12]; // Room for enough space
combine (result,
direntry->dirlen != 0 ?
direntry->dirname : "",
(direntry->namlen != 0) ? direntry->lfname
:
direntry->fname
);
+
+ if (strlen (result) >= PATHSIZE) {
+ prterror ('f', "Combined dirname and filename too
long\n");
+ }
+
return (result);
}
ADDITIONAL INFORMATION
The information has been provided by Jean-S bastien Guay-Leroux.
The original article can be found at:
<http://www.guay-leroux.com/projects/zoo-advisory.txt>
http://www.guay-leroux.com/projects/zoo-advisory.txt
========================================
This bulletin is sent to members of the SecuriTeam mailing list.
To unsubscribe from the list, send mail with an empty subject line and body to: list-unsubscribe@xxxxxxxxxxxxxx
In order to subscribe to the mailing list, simply forward this email to: list-subscribe@xxxxxxxxxxxxxx
====================
====================
DISCLAIMER:
The information in this bulletin is provided "AS IS" without warranty of any kind.
In no event shall we be liable for any damages whatsoever including direct, indirect, incidental, consequential, loss of business profits or special damages.
- Prev by Date: [EXPL] SCO Unixware ptrace Local Privilege Escalation Exploit
- Previous by thread: [EXPL] SCO Unixware ptrace Local Privilege Escalation Exploit
- Index(es):
Relevant Pages
- [NEWS] Apple QuickTime QTIF Stack Overflow
... The following security advisory is sent to the securiteam mailing list, and can be
found at the SecuriTeam web site: http://www.securiteam.com ... Apple QuickTime QTIF Stack
Overflow ... There is a stack overflow in the way QuickTime processes qtif format ...
(Securiteam) - [NEWS] D-Link Router UPNP Stack Overflow
... The following security advisory is sent to the securiteam mailing list, and can be
found at the SecuriTeam web site: http://www.securiteam.com ... A remote stack overflow
exists in a range of wired and wireless D-Link ... This vulnerability allows an
attacker to execute privileged code ... (Securiteam) - [NEWS] Trend Micro ServerProtect StCommon.dll Stack Overflow Vulnerabilities
... The following security advisory is sent to the securiteam mailing list, and can be
found at the SecuriTeam web site: http://www.securiteam.com ... Trend Micro ServerProtect StCommon.dll
Stack Overflow Vulnerabilities ... 65741711 push edx ... (Securiteam) - [NT] WinEggDropShell Multiple Remote Stack Overflows
... The following security advisory is sent to the securiteam mailing list, and can be
found at the SecuriTeam web site: http://www.securiteam.com ... WinEggDropShell is a popular
Chinese remote access trojan. ... Multiple pre-authentication stack overflow found in the
HTTP/FTP server ... (Securiteam) - [UNIX] Setterm Local Stack Overflow Vulnerability
... The following security advisory is sent to the securiteam mailing list, and can be
found at the SecuriTeam web site: http://www.securiteam.com ... Setterm is "a utility that
ships with many if not all UNIX and Linux ... The stack overflow condition exists because
the -file command line ... copied into a buffer, the vulnerability manifests itself. ...
(Securiteam)