Bug 216937 - CVE-2006-6097 GNU tar directory traversal
Summary: CVE-2006-6097 GNU tar directory traversal
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: tar
Version: 4.4
Hardware: All
OS: Linux
medium
high
Target Milestone: ---
: ---
Assignee: Peter Vrabec
QA Contact: Ben Levenson
URL: http://lists.grok.org.uk/pipermail/fu...
Whiteboard: impact=moderate,source=fulldisclosure...
Depends On:
Blocks: 216938 218426
TreeView+ depends on / blocked
 
Reported: 2006-11-22 19:45 UTC by Lubomir Kundrak
Modified: 2007-11-17 01:14 UTC (History)
0 users

Fixed In Version: RHSA-2006-0749
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2006-12-19 22:47:46 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2006:0749 0 normal SHIPPED_LIVE Moderate: tar security update 2006-12-19 22:47:44 UTC

Description Lubomir Kundrak 2006-11-22 19:45:29 UTC
Description of problem:

GNU tar contains a flaw, that makes tar overwrite an arbitrairy file when
extracting a crafted archive.

See the original advisory for details.

Steps to Reproduce:

#TAR=/usr/src/redhat/BUILD/tar-1.13.25/src/tar
TAR=tar

# crafting a symlink

gcc -o tarxyz tarxyz.c
./tarxyz > xyz.tar

# cleaning environment up

rm -f/home/$USER/hello.txt
rm -f xyz

# adding files, relative to xyz/

mkdir -p xyz/home/$USER
echo "Hello" > xyz/home/$USER/hello.txt
tar -rf xyz.tar xyz/home/$USER

# exploitation

rm -rf xyz      # so symlink to / can be created
$TAR -xf xyz.tar
cat /home/$USER/hello.txt

Additional info:

All supported RHEL (2.1--4) and FC (5,6) releases are vulnerable

Comment 1 Lubomir Kundrak 2006-11-27 08:37:35 UTC
Kees Cook (of Ubuntu) reported an issue to upstream and proposed a patch.
See this thread:
http://lists.gnu.org/archive/html/bug-tar/2006-11/msg00028.html

Comment 3 Josh Bressers 2006-12-01 17:53:40 UTC
Ping on this issue.

Can we get some updated packages.  The patch looks to be rather simple.

Comment 5 Peter Vrabec 2006-12-05 10:10:14 UTC
fixed in:
tar-1.14-12.RHEL4,
tar-1.13.25-15.RHEL3,
tar-1.13.25-6.AS21.1

I dunno how to filed RHSA-2006:0749, concretely built for AS21.1.

Comment 9 Red Hat Bugzilla 2006-12-19 22:47:47 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-2006-0749.html



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