Bug 980945 - buffer overflow in *toname() functions
Summary: buffer overflow in *toname() functions
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: tree
Version: 19
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Tim Waugh
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-07-03 15:39 UTC by Zing
Modified: 2013-07-12 03:18 UTC (History)
1 user (show)

Fixed In Version: tree-1.6.0-9.fc19
Clone Of:
Environment:
Last Closed: 2013-07-12 03:18:38 UTC
Type: Bug
Embargoed:


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

Description Zing 2013-07-03 15:39:17 UTC
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 11:01:11 UTC
Thanks.  I only changed the snprintf calls to use sizeof(buf).

Comment 2 Fedora Update System 2013-07-04 11:49:30 UTC
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-05 02:03:05 UTC
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-10 01:24:38 UTC
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-12 03:18:38 UTC
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.