Bug 183426 - Buffer overflow during archive creation
Buffer overflow during archive creation
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: zoo (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Nicolas Mailhot
Fedora Extras Quality Assurance
: Security
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-02-28 18:21 EST by Josh Bressers
Modified: 2007-11-30 17:11 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-03-05 11:14:08 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Josh Bressers 2006-02-28 18:21:44 EST
A buffer overflow bug exists in zoo which is triggered during archive creation.
 This issue is borderline a bug as it's really only a problem if someone is
creating a zoo archive on a directory full of files controlled by a local attacker.

Here is how to reproduce this issue:

mkdir `perl -e 'print "A"x254'`
cd `perl -e 'print "A"x254'`
mkdir `perl -e 'print "A"x254'`
cd `perl -e 'print "A"x254'`
touch feh
cd ../..
zoo a arch.zoo `perl -e 'print "A"x254 . "/" . "A"x254 . "/feh"'`


To fix this issue, in parse.c, line 42, Change the line:

strcpy (tempname, fname);

to

strncpy(tempname, fname, LFNAMESIZE);

Please note that there are probably countless other issues similar to this in
zoo.  I've not looked for any of them.
Comment 1 Nicolas Mailhot 2006-02-28 18:55:53 EST
This is a dupe of #183109
I take it you prefer your fix to the one proposed there ? (just making sure)

*** This bug has been marked as a duplicate of 183109 ***
Comment 2 Josh Bressers 2006-02-28 18:59:02 EST
These are two different issues.
Comment 3 Nicolas Mailhot 2006-03-04 08:33:45 EST
I couldn't reproduce it with the current fe zoo
I'm pushing a new fe zoo (zoo-2.10-7) using the opensuse package as base (seems
a bit cleaner than ours) and your fix
Please check the result is ok with you
Comment 4 Josh Bressers 2006-03-05 11:14:08 EST
I no longer see this behavior in the latest update from -devel (zoo-2.10-8.fc5)

If you've not done so, you may want to alert the other distributions and
upstream about this issue (I'm not sure if there is still an upstream though).

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