Bug 710534 - buffer overflow in btrfs if device name too long
Summary: buffer overflow in btrfs if device name too long
Alias: None
Product: Fedora
Classification: Fedora
Component: btrfs-progs
Version: 19
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
Assignee: Josef Bacik
QA Contact: Fedora Extras Quality Assurance
Depends On:
Blocks: 689509
TreeView+ depends on / blocked
Reported: 2011-06-03 16:02 UTC by Milan Broz
Modified: 2013-09-30 00:38 UTC (History)
3 users (show)

Fixed In Version: btrfs-progs-0.20.rc1.20130917git194aa4a-1.fc19
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2013-09-30 00:38:35 UTC
Type: ---

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

Description Milan Broz 2011-06-03 16:02:10 UTC
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 15:25:11 UTC
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 15:51:55 UTC
btrfs-progs-0.20.rc1.20130917git194aa4a-1.fc19 has been submitted as an update for Fedora 19.

Comment 4 Eric Sandeen 2013-09-18 15:53:04 UTC
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-19 02:07:42 UTC
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-30 00:38:35 UTC
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.