fsck.hfsplus fails due to "buffer overflow detected"

Bug #1450760 reported by Karl-Philipp Richter
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
hfsplus (Ubuntu)
New
Undecided
Unassigned

Bug Description

Running `mkfs.hfsplus` on a partition on a USB 3.0 connected HDD which ran without problems on Mac OS X before fails immediately with

    $ sudo fsck.hfsplus /dev/disk/by-id/ata-Hitachi_HTS545032B9SA02_100222PBT30016HTWPTY-part2
    *** buffer overflow detected ***: fsck.hfsplus terminated
    ======= Backtrace: =========
    /lib/x86_64-linux-gnu/libc.so.6(+0x78c4e)[0x7fc40c40cc4e]
    /lib/x86_64-linux-gnu/libc.so.6(__fortify_fail+0x5c)[0x7fc40c4ace8c]
    /lib/x86_64-linux-gnu/libc.so.6(+0x116e80)[0x7fc40c4aae80]
    fsck.hfsplus[0x4028c8]
    fsck.hfsplus[0x402a16]
    fsck.hfsplus[0x4020bb]
    /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf0)[0x7fc40c3b4a40]
    fsck.hfsplus[0x4025ce]
    ======= Memory map: ========
    00400000-0042c000 r-xp 00000000 00:13 1614883 /sbin/fsck.hfsplus
    0062b000-0062c000 r--p 0002b000 00:13 1614883 /sbin/fsck.hfsplus
    0062c000-0062e000 rw-p 0002c000 00:13 1614883 /sbin/fsck.hfsplus
    0062e000-00633000 rw-p 00000000 00:00 0
    01074000-01095000 rw-p 00000000 00:00 0 [heap]
    7fc40c17e000-7fc40c194000 r-xp 00000000 00:13 637176 /lib/x86_64-linux-gnu/libgcc_s.so.1
    7fc40c194000-7fc40c393000 ---p 00016000 00:13 637176 /lib/x86_64-linux-gnu/libgcc_s.so.1
    7fc40c393000-7fc40c394000 rw-p 00015000 00:13 637176 /lib/x86_64-linux-gnu/libgcc_s.so.1
    7fc40c394000-7fc40c554000 r-xp 00000000 00:13 27534 /lib/x86_64-linux-gnu/libc-2.21.so
    7fc40c554000-7fc40c754000 ---p 001c0000 00:13 27534 /lib/x86_64-linux-gnu/libc-2.21.so
    7fc40c754000-7fc40c758000 r--p 001c0000 00:13 27534 /lib/x86_64-linux-gnu/libc-2.21.so
    7fc40c758000-7fc40c75a000 rw-p 001c4000 00:13 27534 /lib/x86_64-linux-gnu/libc-2.21.so
    7fc40c75a000-7fc40c75e000 rw-p 00000000 00:00 0
    7fc40c75e000-7fc40c76c000 r-xp 00000000 00:13 27532 /lib/x86_64-linux-gnu/libbsd.so.0.7.0
    7fc40c76c000-7fc40c96b000 ---p 0000e000 00:13 27532 /lib/x86_64-linux-gnu/libbsd.so.0.7.0
    7fc40c96b000-7fc40c96c000 r--p 0000d000 00:13 27532 /lib/x86_64-linux-gnu/libbsd.so.0.7.0
    7fc40c96c000-7fc40c96d000 rw-p 0000e000 00:13 27532 /lib/x86_64-linux-gnu/libbsd.so.0.7.0
    7fc40c96d000-7fc40c96e000 rw-p 00000000 00:00 0
    7fc40c96e000-7fc40c992000 r-xp 00000000 00:13 27491 /lib/x86_64-linux-gnu/ld-2.21.so
    7fc40cb53000-7fc40cb56000 rw-p 00000000 00:00 0
    7fc40cb8e000-7fc40cb91000 rw-p 00000000 00:00 0
    7fc40cb91000-7fc40cb92000 r--p 00023000 00:13 27491 /lib/x86_64-linux-gnu/ld-2.21.so
    7fc40cb92000-7fc40cb93000 rw-p 00024000 00:13 27491 /lib/x86_64-linux-gnu/ld-2.21.so
    7fc40cb93000-7fc40cb94000 rw-p 00000000 00:00 0
    7ffefa706000-7ffefa727000 rw-p 00000000 00:00 0 [stack]
    7ffefa741000-7ffefa743000 r--p 00000000 00:00 0 [vvar]
    7ffefa743000-7ffefa745000 r-xp 00000000 00:00 0 [vdso]
    ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0 [vsyscall]

ProblemType: Bug
DistroRelease: Ubuntu 15.04
Package: hfsplus 1.0.4-12.1ubuntu1
Uname: Linux 4.0.1-040001-generic x86_64
ApportVersion: 2.17.2-0ubuntu1
Architecture: amd64
CurrentDesktop: Unity
Date: Fri May 1 12:04:42 2015
Dependencies:
 gcc-5-base 5.1~rc1-0ubuntu1
 libc6 2.21-0ubuntu4
 libgcc1 1:5.1~rc1-0ubuntu1
 libhfsp0 1.0.4-12.1ubuntu1
 multiarch-support 2.21-0ubuntu4
EcryptfsInUse: Yes
InstallationDate: Installed on 2015-04-02 (28 days ago)
InstallationMedia: Ubuntu 15.04 "Vivid Vervet" - Beta amd64 (20150326)
ProcEnviron:
 TERM=xterm
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=de_DE.UTF-8
 SHELL=/bin/bash
SourcePackage: hfsplus
SystemImageInfo:
 current build number: 0
 device name:
 channel: daily
 last update: Unknown
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Karl-Philipp Richter (krichter722) wrote :
description: updated
Revision history for this message
Karl-Philipp Richter (krichter722) wrote :

I could repair the filesystem with `fsck.hfsplus` in a `qemu` instance running Ubuntu 14.04.2 amd64.

Revision history for this message
Karl-Philipp Richter (krichter722) wrote :

But `fsck.hfsplus` still fails immediately with the same buffer overflow error like above.

Revision history for this message
Joshua Trees (jtrees) wrote :

I just ran into this on NixOS and thought I'd share the workaround I discovered:

```
# fails
sudo fsck.hfsplus /dev/disk/by-uuid/a-longish-string

# works
sudo fsck.hfsplus /dev/sda1
```

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.