misc/183230: ext2fs hash function incompatible with linux

Grzegorz kostka.grzegorz at gmail.com
Wed Oct 23 09:40:05 UTC 2013


>Number:         183230
>Category:       misc
>Synopsis:       ext2fs hash function incompatible with linux
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Oct 23 09:40:05 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator:     Grzegorz
>Release:        9
>Organization:
.
>Environment:
.
>Description:
Hi,


probably I found a bug. Half md4 hash output value is assigned to hash and hash_minor. Linux fsck reports problems (HTREE max value is wrong) on ext partition with a lot directory entries.

FreeBSD implementation:
http://fxr.watson.org/fxr/source/fs/ext2fs/ext2_hash.c?v=FREEBSD9#L242

Linux implementation:
http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/fs/ext3/hash.c

Look EXT2_HTREE_HALF_MD4:

FreeBSD:
major = hash[0];
minor = hash[1];

Linux:
minor_hash = buf[2];
hash = buf[1];



>How-To-Repeat:

>Fix:


>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-bugs mailing list