|
Bugzilla – Full Text Bug Listing |
| Summary: | mkfs.btrfs fails on 3 TB partition | ||
|---|---|---|---|
| Product: | [openSUSE] openSUSE 11.3 | Reporter: | Arvin Schnell <aschnell> |
| Component: | Basesystem | Assignee: | Dirk Mueller <dmueller> |
| Status: | RESOLVED FIXED | QA Contact: | E-mail List <qa-bugs> |
| Severity: | Critical | ||
| Priority: | P5 - None | CC: | jeffm |
| Version: | Milestone 6 | ||
| Target Milestone: | --- | ||
| Hardware: | Other | ||
| OS: | Other | ||
| Whiteboard: | |||
| Found By: | Development | Services Priority: | |
| Business Priority: | Blocker: | --- | |
| Marketing QA Status: | --- | IT Deployment: | --- |
| Attachments: |
gdb backtrace
btrfsprogs: Fix use after free in close_ctree |
||
|
Description
Arvin Schnell
2010-05-07 08:34:41 UTC
Created attachment 360346 [details]
gdb backtrace
it essentially crashes on all creation requests with this valgrind: ==13042== Invalid read of size 8 ==13042== at 0x407781: close_ctree (disk-io.c:974) ==13042== by 0x417E4E: main (mkfs.c:531) ==13042== Address 0x5998b00 is 272 bytes inside a block of size 400 free'd ==13042== at 0x4C25F7B: free (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) ==13042== by 0x406B66: btrfs_free_fs_root (disk-io.c:456) ==13042== by 0x407719: close_ctree (disk-io.c:471) ==13042== by 0x417E4E: main (mkfs.c:531) ==13042== which is introduced by 0003-btrfsck-check-root-back-forward-references.patch correction, the problem is not introduced by 0003-btrfsck-check-root-back-forward-references.patch Created attachment 364153 [details] btrfsprogs: Fix use after free in close_ctree After the roots are closed, root is freed. Yet close_ctree continues to use it. It works generally because no new memory is allocated in the interim, but with glibc malloc perturbing enabled, it crashes every time. This is because root->fs_info points to garbage. This patch uses the already-cached fs_info variable for the rest of the accesses and fixes the crash. Signed-off-by: Jeff Mahoney <jeffm@suse.com> added to the package, thanks a lot! did you submit this already upstream? Thanks for the reminder. Submitted just now. http://thread.gmane.org/gmane.comp.file-systems.btrfs/5708 thanks. closing as fixed. This is an autogenerated message for OBS integration: This bug (603620) was mentioned in https://build.opensuse.org/request/show/41263 Factory / btrfsprogs |