Bug 980945 - buffer overflow in *toname() functions
buffer overflow in *toname() functions
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: tree (Show other bugs)
19
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Tim Waugh
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-07-03 11:39 EDT by Zing
Modified: 2013-07-11 23:18 EDT (History)
1 user (show)

See Also:
Fixed In Version: tree-1.6.0-9.fc19
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-07-11 23:18:38 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
fix buf overflow in *toname() (1.62 KB, patch)
2013-07-03 11:39 EDT, Zing
no flags Details | Diff

  None (edit)
Description Zing 2013-07-03 11:39:17 EDT
Created attachment 768300 [details]
fix buf overflow in *toname()

Description of problem:
uidtoname() and gidtoname() have possible buffer overflows.

Version-Release number of selected component (if applicable):
tree-1.6.0-7.fc19.x86_64

How reproducible:
always

Steps to Reproduce:
1. chgrp 111111 somefile.txt
2. tree -g .

Actual results:

*** buffer overflow detected ***: tree terminated

Expected results:

the tree listing

Additional info:
I'll attach a patch.  A second or more set of eyeballs would be good.

(I hit this while browsing the fedora iso... there's a squash file in there that has a huge gid.)
Comment 1 Tim Waugh 2013-07-04 07:01:11 EDT
Thanks.  I only changed the snprintf calls to use sizeof(buf).
Comment 2 Fedora Update System 2013-07-04 07:49:30 EDT
tree-1.6.0-8.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/tree-1.6.0-8.fc19
Comment 3 Fedora Update System 2013-07-04 22:03:05 EDT
Package tree-1.6.0-8.fc19:
* should fix your issue,
* was pushed to the Fedora 19 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing tree-1.6.0-8.fc19'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-12329/tree-1.6.0-8.fc19
then log in and leave karma (feedback).
Comment 4 Fedora Update System 2013-07-09 21:24:38 EDT
Package tree-1.6.0-9.fc19:
* should fix your issue,
* was pushed to the Fedora 19 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing tree-1.6.0-9.fc19'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-12329/tree-1.6.0-9.fc19
then log in and leave karma (feedback).
Comment 5 Fedora Update System 2013-07-11 23:18:38 EDT
tree-1.6.0-9.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.

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