Bug 140589 (CVE-2005-1918)

Summary: CVE-2005-1918 tar archive path traversal issue
Product: [Other] Security Response Reporter: Josh Bressers <bressers>
Component: vulnerabilityAssignee: Peter Vrabec <pvrabec>
Status: CLOSED ERRATA QA Contact: Ben Levenson <benl>
Severity: low Docs Contact:
Priority: medium    
Version: unspecifiedCC: mjc
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: RHSA-2006-0195 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-02-21 14:30:39 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
I hope this patch will fix it. Could u test it please?
none
Patch against the current source. none

Description Josh Bressers 2004-11-23 19:12:13 UTC
There is an old path traversal issue that we've not fixed.

The text of the message describing this:

The tar patch "tar-1.13.25-dots.patch" changes....

for (;;)
{
if (p[0] == '.' && p[1] == '.' && (ISSLASH (p[2]) || !p[2]))
return 1;

do
{
if (! *p++)
return 0;
}
while (! ISSLASH (*p));
}

...into...

for (;;)
{
if (p[0] == '.' && p[1] == '.' && (ISSLASH (p[2]) || !p[2]))
return 1;

do
{
if (! *p++)
return 0;
}
while (! ISSLASH (*p));

do
{
if (! *p++)
return 0;
}
while ( ISSLASH (*p));
}

...which looks like it's an optimization, however it also changes the
answer for "/../etc/passwd" ... changing both do while's to just plain
while's should fix it.



This issue also affects RHEL 2.1

Comment 1 Peter Vrabec 2005-02-17 10:44:04 UTC
Created attachment 111155 [details]
I hope this patch will fix it. Could u test it please?

Comment 2 Josh Bressers 2005-03-31 21:53:22 UTC
Created attachment 112548 [details]
Patch against the current source.

Here's a patch against the current source, rather than modifying a current
patch, which is what the current patch in this bug seems to do.  By testing
this, things look good with this patch.

Comment 3 Josh Bressers 2005-05-26 21:09:36 UTC
Ping on this issue

Comment 8 Josh Bressers 2006-02-21 14:23:39 UTC
Lifting embargo

Comment 9 Red Hat Bugzilla 2006-02-21 14:30:40 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-0195.html