Bug 710534 - buffer overflow in btrfs if device name too long
buffer overflow in btrfs if device name too long
Product: Fedora
Classification: Fedora
Component: btrfs-progs (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Josef Bacik
Fedora Extras Quality Assurance
Depends On:
Blocks: 689509
  Show dependency treegraph
Reported: 2011-06-03 12:02 EDT by Milan Broz
Modified: 2013-09-29 20:38 EDT (History)
3 users (show)

See Also:
Fixed In Version: btrfs-progs-0.20.rc1.20130917git194aa4a-1.fc19
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-09-29 20:38:35 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Proposed patch (3.16 KB, patch)
2011-06-03 12:02 EDT, Milan Broz
no flags Details | Diff

  None (edit)
Description Milan Broz 2011-06-03 12:02:10 EDT
Created attachment 502846 [details]
Proposed patch

Description of problem:

btrfs overwrite memory for too long device paramater

btrfs device scan $(awk 'BEGIN{$5090=OFS="x";print}')

** buffer overflow detected ***: btrfs terminated
======= Backtrace: =========

Version-Release number of selected component (if applicable):
(probably all versions)

See attached patch - it is not perfect fix (probably there should be error check if string is too long) but at least it avoids trivial strcpy() buffer overflow.
Comment 2 Fedora End Of Life 2013-04-03 11:25:11 EDT
This bug appears to have been reported against 'rawhide' during the Fedora 19 development cycle.
Changing version to '19'.

(As we did not run this process for some time, it could affect also pre-Fedora 19 development
cycle bugs. We are very sorry. It will help us with cleanup during Fedora 19 End Of Life. Thank you.)

More information and reason for this action is here:
Comment 3 Fedora Update System 2013-09-18 11:51:55 EDT
btrfs-progs-0.20.rc1.20130917git194aa4a-1.fc19 has been submitted as an update for Fedora 19.
Comment 4 Eric Sandeen 2013-09-18 11:53:04 EDT
A new git snapshot of btrfs-progs has been pushed to F19 testing.  If possible, please re-test these bugs & feel free to close or comment as appropriate.

Comment 5 Fedora Update System 2013-09-18 22:07:42 EDT
Package btrfs-progs-0.20.rc1.20130917git194aa4a-1.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 btrfs-progs-0.20.rc1.20130917git194aa4a-1.fc19'
as soon as you are able to.
Please go to the following url:
then log in and leave karma (feedback).
Comment 6 Fedora Update System 2013-09-29 20:38:35 EDT
btrfs-progs-0.20.rc1.20130917git194aa4a-1.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.