Bug 797979
Summary: | don't abort upon unexpected file system contents | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | Red Hat Enterprise Linux 6 | Reporter: | Jim Meyering <meyering> | ||||||
Component: | parted | Assignee: | Brian Lane <bcl> | ||||||
Status: | CLOSED ERRATA | QA Contact: | Release Test Team <release-test-team-automation> | ||||||
Severity: | low | Docs Contact: | |||||||
Priority: | low | ||||||||
Version: | 6.2 | CC: | atodorov, bugzilla, jstodola | ||||||
Target Milestone: | rc | ||||||||
Target Release: | --- | ||||||||
Hardware: | All | ||||||||
OS: | Linux | ||||||||
Whiteboard: | |||||||||
Fixed In Version: | parted-2.1-19.el6 | Doc Type: | Bug Fix | ||||||
Doc Text: |
Cause:
Unexpected HFS+ filesystem contents
Consequence:
parted would crash
Fix:
Added a number of checks for unexpected values to the HFS+ code.
Result:
parted doesn't crash.
|
Story Points: | --- | ||||||
Clone Of: | Environment: | ||||||||
Last Closed: | 2013-02-21 10:13:31 UTC | Type: | --- | ||||||
Regression: | --- | Mount Type: | --- | ||||||
Documentation: | --- | CRM: | |||||||
Verified Versions: | Category: | --- | |||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||
Cloudforms Team: | --- | Target Upstream Version: | |||||||
Embargoed: | |||||||||
Bug Depends On: | |||||||||
Bug Blocks: | 840685 | ||||||||
Attachments: |
|
Description
Jim Meyering
2012-02-27 17:37:58 UTC
Only reproducible with the single example partition instance Jim attached. Through regression, I have been unable to produce an Apple Boot partition that causes an abort. The Apple Boot JHFS+ file system is clean per Apple's fsck_hfs utility, so I'm just not sure what's unique about this partition, but it does not seem to be common or likely to be encountered in the real world. Further regression details here: http://lists.gnu.org/archive/html/bug-parted/2012-02/msg00076.html Created attachment 566163 [details]
new 'no abort' Apple Boot partition
This is the resulting partition after regression steps followed, does not induce a parted crash. Unclear what the difference is between this and original.
patch from the list referenced in comment 1 --- ../libparted/fs/hfs/probe.c.~1~ 2012-02-26 13:46:33.357842027 -0500 +++ ../libparted/fs/hfs/probe.c 2012-02-26 13:47:30.069592361 -0500 @@ -156,8 +156,9 @@ search = ((PedSector) PED_BE32_TO_CPU (vh->total_blocks) - 1) * ( PED_BE32_TO_CPU (vh->block_size) / PED_SECTOR_SIZE_DEFAULT ) - 1; - if (!ped_geometry_set (geom_ret, geom_ret->start, - search + 2) + if (search < 0 + || !ped_geometry_set (geom_ret, geom_ret->start, + search + 2) || !ped_geometry_read (geom_ret, buf, search, 1) || vh->signature != PED_CPU_TO_BE16 (HFSP_SIGNATURE)) { ped_geometry_destroy (geom_ret); This request was evaluated by Red Hat Product Management for inclusion in a Red Hat Enterprise Linux release. Product Management has requested further review of this request by Red Hat Engineering, for potential inclusion in a Red Hat Enterprise Linux release for currently deployed products. This request is not yet committed for inclusion in a release. Reproduced with parted-2.1-18.el6: [root@rtt7 ~]# parted -s AppleBoot.img u s p Backtrace has 13 calls on stack: 13: /lib64/libparted-2.1.so.0(ped_assert+0x32) [0x3fffd734316] 12: /lib64/libparted-2.1.so.0(ped_geometry_read+0xc8) [0x3fffd73c5dc] 11: /lib64/libparted-2.1.so.0(hfsplus_probe+0x1ae) [0x3fffd7574fa] 10: /lib64/libparted-2.1.so.0(ped_file_system_probe_specific+0x7e) [0x3fffd735ba6] 9: /lib64/libparted-2.1.so.0(ped_file_system_probe+0x82) [0x3fffd73611e] 8: /lib64/libparted-2.1.so.0(+0x51614) [0x3fffd770614] 7: /lib64/libparted-2.1.so.0(ped_disk_probe+0xbe) [0x3fffd73bb76] 6: /lib64/libparted-2.1.so.0(ped_disk_new+0x40) [0x3fffd73bc1c] 5: parted() [0x80007ac4] 4: parted(non_interactive_mode+0xa2) [0x8000e02a] 3: parted(main+0x7e) [0x8000c26e] 2: /lib64/libc.so.6(__libc_start_main+0x120) [0x3fffd5138c4] 1: parted() [0x80005e72] Aborted (core dumped) [root@rtt7 ~]# Verified with parted-2.1-19.el6: [root@rtt7 ~]# parted -s AppleBoot.img u s p Error: /root/AppleBoot.img: unrecognised disk label [root@rtt7 ~]# Moving to VERIFIED. Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHBA-2013-0407.html |