Bug 65793 (CVE-2005-0161) - VUL-0: CVE-2005-0161: unace: multiple security vulnerabilities
Summary: VUL-0: CVE-2005-0161: unace: multiple security vulnerabilities
Status: RESOLVED FIXED
Alias: CVE-2005-0161
Product: SUSE Security Incidents
Classification: Novell Products
Component: Incidents (show other bugs)
Version: unspecified
Hardware: All Linux
: P3 - Medium : Normal
Target Milestone: ---
Assignee: Security Team bot
QA Contact: Security Team bot
URL:
Whiteboard: CVE-2005-0161: CVSS v2 Base Score: 2....
Keywords:
Depends on:
Blocks:
 
Reported: 2005-02-14 16:54 UTC by Thomas Biege
Modified: 2021-11-02 16:08 UTC (History)
3 users (show)

See Also:
Found By: Other
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
unace-info.zip (2.60 KB, application/x-zip)
2005-02-14 17:02 UTC, Thomas Biege
Details
patchinfo-box.unace (698 bytes, text/plain)
2005-02-14 22:47 UTC, Thomas Biege
Details
patchinfo.unace (580 bytes, text/plain)
2005-02-14 22:47 UTC, Thomas Biege
Details
unace-1.2b-CAN-2005-0160-CAN-2005-0161.patch (4.48 KB, patch)
2005-04-19 07:26 UTC, Ludwig Nussel
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Biege 2005-02-14 16:54:13 UTC
Hello Klaus, 
the following reached us today. (not public) 
 
From: Ulf HÀrnhammar <Ulf.Harnhammar.9485@student.uu.se> 
To: mlemke@winace.com 
Cc: mlemke6413@aol.com, info@winace.com, support@winace.com, 
        vendor-sec@lst.de, naddy@mips.inka.de, wiz@netbsd.org 
User-Agent: Internet Messaging Program (IMP) 3.2.7 
Subject: [vendor-sec] unace-1.2b multiple security vulnerabilities 
Errors-To: vendor-sec-admin@lst.de 
Date: Mon, 14 Feb 2005 05:23:17 +0100 
 
[-- Anhang #1 --] 
[-- Typ: text/plain, Kodierung: quoted-printable, GröÃe: 0,6K --] 
 
Hello, 
 
I have found multiple security vulnerabilities in unace-1.2b 
(the last free version). 
 
There are buffer overflows when extracting, testing or 
listing specially prepared ACE archives. 
 
There are directory traversal bugs when extracting ACE 
archives. 
 
There are also buffer overflows when dealing with long (>17000 
characters) command line arguments. 
 
I have attached a ZIP archive containing some test archives 
and a patch. 
 
I hope that we can coordinate our respective releases of unace. 
 
// Ulf Harnhammar for the Debian Security Audit Project 
   http://www.debian.org/security/audit/ 
 
 
[-- Anhang #2: unace-info.zip --]
Comment 1 Thomas Biege 2005-02-14 16:54:13 UTC
<!-- SBZ_reproduce  -->
see attachment
Comment 2 Thomas Biege 2005-02-14 17:02:47 UTC
Created attachment 28455 [details]
unace-info.zip
Comment 3 Thomas Biege 2005-02-14 19:44:08 UTC
Use CAN-2005-0160 for the buffer overflows. 
use CAN-2005-0161 for the directory traversal problem. 
 
Comment 4 Thomas Biege 2005-02-14 22:34:07 UTC
 SM-Tracker-387 
Comment 5 Thomas Biege 2005-02-14 22:47:25 UTC
Created attachment 28465 [details]
patchinfo-box.unace
Comment 6 Thomas Biege 2005-02-14 22:47:44 UTC
Created attachment 28466 [details]
patchinfo.unace
Comment 7 Klaus Singvogel 2005-02-14 23:46:54 UTC
Thomas, thanks. But unace is a bit tricky regarding the patchinfo... 
 
We ship (static) binaries since 9.0 for i386 only, as they can also unpack the 
latest algorithm versions: 2.x. For all other architectures, we still ship 
version 1.2b (as we have sources for this version). 
 
Means we cannot patch unace for: 9.0-i386, 9.1-i386, SLES9-i386, 9.2-i386 
instead we have to wait for the release of upstream binaries. 
 
Now the real world: 
I already got from author the sources last November. But I'm unsure, if we are 
allowed to release them (topic still open with author) and if we can 
distribute them (several different contradicting licenses in the packages). 
Comment 8 Thomas Biege 2005-02-15 18:25:01 UTC
Uh, yes.. I remeber the mess. :( 
 
Do you like to asks the author again to push him a little bit? :) 
Comment 9 Klaus Singvogel 2005-02-15 22:06:21 UTC
mlenke@winace.com is already in the original e-mail from vendor-sec... 
Comment 10 Thomas Biege 2005-02-16 18:20:14 UTC
From: Ulf HÀrnhammar <Ulf.Harnhammar.9485@student.uu.s> 
To: Ulf HÀrnhammar <Ulf.Harnhammar.9485@student.uu.se 
Cc: solar@gentoo.org, Martin Schulze <joey@infodrom.org>, 
mlemke@winace.com, 
        info@winace.com, support@winace.com, vendor-sec@lst.de, 
        naddy@mips.inka.de, wiz@netbsd.org 
Subject: Re: [vendor-sec] Re: unace-1.2b multiple security vulnerabilities 
User-Agent: Internet Messaging Program (IMP) 3.2.7 
Errors-To: vendor-sec-admin@lst.de 
Date: Tue, 15 Feb 2005 19:24:29 +0100 
 
Quoting Ulf HÀrnhammar <Ulf.Harnhammar.9485@student.uu.se>: 
 
> What about releasing this on the 22nd of February? 
 
Since no-one said why we shouldn't, I now decide that 22/2 will indeed be 
the 
release date. 
 
// Ulf 
 
Comment 11 Thomas Biege 2005-02-23 07:41:01 UTC
it's public now. 
 
[Full-Disclosure] unace-1.2b multiple buffer overflows and directory traversal bugs 
 
 
Von:  
Ulf Härnhammar <Ulf.Harnhammar.9485@student.uu.se> 
 
 
An:  
full-disclosure@lists.netsys.com 
 
 
Datum:  
Gestern 23:59:35 
 
 
I have found multiple security vulnerabilities in unace-1.2b. (It is 
the last free version. The later versions are just binaries for the 
x86 processor, which is unhelpful if you want to use free software or 
if your computer has a non-x86 processor.) 
 
There are two buffer overflows when extracting, testing or listing 
specially prepared ACE archives. They are caused by wrong usage of 
strncpy() with the third parameter coming from the archive. In both 
cases, the attacker controls the EIP register. 
 
There are also two buffer overflows when (a) dealing with long (>15600 
characters) command line arguments for archive names, and (b) when 
preparing a string for printing Ready for next volume messages. 
 
Furthermore, there are directory traversal bugs when extracting ACE 
archives. They are both of the absolute ("/etc/nologin") and the relative 
("../../../../../../../etc/nologin") type. 
 
All buffer overflows have the identifier CAN-2005-0160, and the directory 
traversal bugs have the identifier CAN-2005-0161. 
 
I have attached a ZIP archive containing some test archives and a patch. 
I wrote a small Perl script to create the test archives, after having 
read ACE.txt. I didn't have the time to create archives that work on 
unace-2.x, so I haven't really tested whether later versions of unace 
are vulnerable to any of these bugs. 
 
The vendor and the distributors have been contacted, and the 22nd of 
February was agreed upon as the release date. 
 
// Ulf Härnhammar for the Debian Security Audit Project 
   http://www.debian.org/security/audit/ 
    Run this to get my new e-mail address: 
   lynx -source http://slashdot.org/ | head -n1 | sed -e 's%".*$%%' \ 
   -e 'y%TC!%aa#%' -e 's%UB%te%g' -e 'y%<ODP%#emr%' -e 's%E H.*r% %' \ 
   -e 's%#%%g' -e 's%$%com%' -e 's%aa*%ta%' -e 'y%IYL%iul%' 
 
unace.advisory-data.zip 
 
_______________________________________________ 
Full-Disclosure - We believe in it. 
Charter: http://lists.netsys.com/full-disclosure-charter.html 
Comment 12 Marcus Meissner 2005-03-14 14:20:28 UTC
klaus wants to wait after 9.3 
Comment 13 Thomas Biege 2005-04-12 13:26:38 UTC
9.3 is done, right
Comment 14 Klaus Singvogel 2005-04-12 15:49:19 UTC
FIX BUGZILLA!!! 
I investigated for this bug for around an hour, wrote a long comment with 
several questions and so on. Finally all my detailed input got lost, because I 
had to re-login into bugzilla. 
 
I don't want to use bugzilla anymore, as long as this doesn't get solved. 
 
Solve this bug whoever wants to. Good bye. 
 
 
Comment 15 Ludwig Nussel 2005-04-15 12:52:02 UTC
Well, it could be worse, "good" old netscape lost all input when you just 
resized the window ... ;-) 
Comment 16 Klaus Singvogel 2005-04-18 17:48:39 UTC
Security-Team: where do I get patches for i386? 
We distribute a static link binary with more recent version since SuLi 9.0 
 
I looked at the web: seems that no other Linux distribution ever worked on 
this issue. No patch can be found. 
Comment 17 Ludwig Nussel 2005-04-19 07:26:10 UTC
Created attachment 34772 [details]
unace-1.2b-CAN-2005-0160-CAN-2005-0161.patch

Both debian and gentoo fixed it
http://www.gentoo.org/cgi-bin/viewcvs.cgi/app-arch/unace/files/
http://packages.debian.org/unstable/utils/unace
Comment 18 Klaus Singvogel 2005-04-19 07:34:44 UTC
Sorry, but I think we misunderstood each other. 
 
I'm talking about unace-2.x, you showed me fixes for unace-1.2x 
 
So, what should I do regarding unace-2.x 
Comment 19 Ludwig Nussel 2005-04-19 07:45:12 UTC
I thought you are in contact with the author about that one? If it's affected 
as well we need to update it too. If that's not possible we could maybe 
downgrade it to the free version. 
Comment 20 Klaus Singvogel 2005-04-19 08:46:37 UTC
Yes, I am in contact with author. But as you already know from the vendor-sec 
ML, author insists on fact that this is not an issue. 
 
I can reproduce one of the problems with unace-2.x. 
But: is opening a non-conforming (corrupt) archive really an issue? 
 
Downgrade to free unace-1.2x version means also a massive restriction in the 
program functionalities: unace-2.x can open archives packed with a algorithm, 
which is unknown to unace-1.2x. Is this our intent? 
Comment 21 Ludwig Nussel 2005-04-19 09:00:09 UTC
If unace executes code due to a buffer overflow (is that the case? I don't 
know.) when extracting or listing a malicious file then yes it is an issue. If 
it just refuses to read it or crashes without overflow then it's not an issue. 
 
It's better to have no unace on the distro at all than an unace with a 
overflow that allows for code execution. 
Comment 22 Marcus Meissner 2005-04-19 16:24:27 UTC
the problem is, that if this might be used in automated ways, like 
by virus checkers. note that the virus writers changed from zip to rar  
and might just change to the next obscure compression format. 
 
judging from the patch it is a stack buffer overflow and probably easy 
exploitable. 
 
So far I would be happy if you could provide a fix for the earlier versions. 
Comment 23 Klaus Singvogel 2005-04-19 17:04:15 UTC
Marcus, please read comment#16 (regarding versions) and then answer my 2nd 
question in comment#20. TIA. 
Comment 24 Thomas Biege 2005-04-22 08:03:53 UTC
There seems to be more at sixes and sevens with unace 2 judging from a quick look.

I think we should provide unace 1 + fixes for our customers and tell them that
they should use the 1-version if they need security and the 2-version if they
need the new features. Let the customer decide...



Comment 25 Marcus Meissner 2005-04-22 08:06:11 UTC
klaus? 
 
can you do that, pack both unace2 and unace ... with unace fixed? 
Comment 26 Klaus Singvogel 2005-04-26 19:26:59 UTC
yes, working on it. but, please give me some time. 
Comment 27 Klaus Singvogel 2005-04-27 18:49:57 UTC
So far, I can say, that unace-2.x is not affected with the included sample 
files. The problem in files bufoflow?.ace is fully correct detected and 
unace-2.x complains about the problem (illegal content) without further 
processing. The dirtraversal?.ace files fail either: the crc check, and 
therefore are not processed either. 
 
This is the good news. The bad news is, that it might be possible to generate 
dirtraversal files, where unace-2.x possibly stumbles on the problem, because 
they have a correct crc sum. 
 
I don't know at the moment. Will dig into it deeper tommorrow. 
Comment 28 Thomas Biege 2005-05-24 16:45:36 UTC
I know this is one of the ugly dirty bugs we all dislike but nevertheless did
you found something, Klaus?
Comment 29 Michael Schröder 2005-06-08 16:11:42 UTC
I copied the patchinfos to /work/src/done and patched them. Klaus, please take 
a look at them and tell me if they are correct. 
Comment 30 Thomas Biege 2005-06-09 08:31:50 UTC
Thanks,
please assign to security-team when done.
Comment 31 Klaus Singvogel 2005-06-09 09:51:30 UTC
I was very busy yesterday evening (Vorstandssitzung LST e.V.) and forgot to 
check in the patches 9.3. So I did it this morning (= not yet complete). 
 
Comment 32 Klaus Singvogel 2005-06-09 09:58:58 UTC
Finally I came to the conclusion that it is impossible to exploit unace-2.x. I 
think it's impossible (at least pretty hard) to generate long enough, generic 
strings without having a valid CRC for them. 
If you try to generate any such archive, unace is ignoring it and quitting 
with an appropriate status code, because of the invalid CRC for the strings. 
 
Result: unace-2.x is not affected. 
 
Result: we need no 9.0-i386, 9.1-i386 (= SLES9-i386), 9.2-i386, 9.3-i386 
security fixes. 
For i386: only SLES8-i386, 8.2-i386 
But: every non-i386 SUSE Linux versions. 
 
Security-Team: please adapt patchinfo files. 
 
Comment 33 Michael Schröder 2005-06-09 10:04:43 UTC
Grrr, I adapted them yesterday and now want to know of you, if they are 
correct! That's what comment #29 was about. 
Comment 34 Klaus Singvogel 2005-06-13 12:32:57 UTC
submitted 
note: patchinfo files are already edited 
Comment 35 Marcus Meissner 2005-06-13 18:48:20 UTC
updates approved. 
Comment 36 Marcus Meissner 2005-09-26 11:15:48 UTC
   http://www.kb.cert.org/vuls/id/215006 
 
Comment 37 Marcus Meissner 2006-01-12 12:37:17 UTC
the patch never made it into the STABLE version.

i applied it there and submitted a fixed package.
Comment 38 Thomas Biege 2009-10-13 21:05:48 UTC
CVE-2005-0161: CVSS v2 Base Score: 2.1 (AV:L/AC:L/Au:N/C:N/I:P/A:N)