Bug 138462 - CAN-2004-0947 buffer overflow in unarj
Summary: CAN-2004-0947 buffer overflow in unarj
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 2.1
Classification: Red Hat
Component: unarj
Version: 2.1
Hardware: All
OS: Linux
medium
low
Target Milestone: ---
Assignee: Lon Hohberger
QA Contact:
URL:
Whiteboard: impact=low,reported=20041109
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2004-11-09 14:25 UTC by Josh Bressers
Modified: 2007-11-30 22:06 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2005-01-12 18:38:52 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Proposed patch for the buffer overflow. (1.49 KB, patch)
2004-11-09 14:27 UTC, Josh Bressers
no flags Details | Diff
Proposed patch for the directory traversal issue. (2.97 KB, patch)
2004-11-09 14:27 UTC, Josh Bressers
no flags Details | Diff
Buffer overflow POC archive. (2.06 KB, application/octet-stream)
2004-11-09 14:28 UTC, Josh Bressers
no flags Details
Directory traversal POC archive. (143 bytes, application/octet-stream)
2004-11-09 14:30 UTC, Josh Bressers
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2005:007 0 normal SHIPPED_LIVE Low: unarj security update 2005-01-12 05:00:00 UTC

Description Josh Bressers 2004-11-09 14:25:00 UTC
This was reported to vendor-sec by Suse.

Recently some guy called "doubles" posted something about a directory
traversal bug in unarj to full-disclosure. While looking into that
issue I also found a buffer overflow. The problem is that the value of
'short entry_pos' in unarj.c:read_header() is not checked but later
used as offset into 'char filename[512]' when copying into a 512 byte
buffer on the stack in extract(). It's exploitable if the compiler
doesn't inline the extract() function in unarj.c.

Comment 1 Josh Bressers 2004-11-09 14:27:16 UTC
Created attachment 106328 [details]
Proposed patch for the buffer overflow.

Comment 2 Josh Bressers 2004-11-09 14:27:39 UTC
Created attachment 106329 [details]
Proposed patch for the directory traversal issue.

Comment 5 Josh Bressers 2004-11-09 15:05:30 UTC
No embargo date has been set for this issue.

Comment 8 Mark J. Cox 2005-01-11 09:49:06 UTC
Now public, removing embargo

Comment 9 Josh Bressers 2005-01-12 18:38:52 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHSA-2005-007.html



Note You need to log in before you can comment on or make changes to this bug.