Bug 216938 - GNU tar directory traversal
GNU tar directory traversal
Product: Fedora
Classification: Fedora
Component: tar (Show other bugs)
All Linux
medium Severity high
: ---
: ---
Assigned To: Peter Vrabec
Ben Levenson
: Security
Depends On: 216937
  Show dependency treegraph
Reported: 2006-11-22 14:47 EST by Lubomir Kundrak
Modified: 2007-11-30 17:11 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2006-12-04 10:48:41 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Lubomir Kundrak 2006-11-22 14:47:23 EST
+++ This bug was initially created as a clone of Bug #216937 +++

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:


# 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 Peter Vrabec 2006-12-04 10:48:41 EST
fixed in: tar-1.15.1-22.fc6, tar-1.15.1-17.FC5.

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