lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <YSv60c2/PM4zfl0u@zeniv-ca.linux.org.uk>
Date:   Sun, 29 Aug 2021 21:23:29 +0000
From:   Al Viro <viro@...iv.linux.org.uk>
To:     "Caleb D.S. Brzezinski" <calebdsb@...tonmail.com>
Cc:     hirofumi@...l.parknet.co.jp, linux-kernel@...r.kernel.org,
        linux-fsdevel@...r.kernel.org
Subject: Re: [PATCH 2/3] fat: add the msdos_format_name() filename cache

On Sun, Aug 29, 2021 at 05:11:56PM +0000, Caleb D.S. Brzezinski wrote:

> My understanding was that the maximum length of the name considered when
> passed to msdos_format_name() was eight characters; see:
> 
> 		while (walk - res < 8)
> 
> and
> 
> 		for (walk = res; len && walk - res < 8; walk++) {

Err...  You have noticed that the function does not end on that loop,
haven't you?  Exercise: figure out what that function does.  I.e.
what inputs are allowed and what outputs are produced.  You might
find some description of FAT directory layout to be useful...

> > 	* your find_fname_in_cache() assumes that hash collisions
> > are impossible, which is... unlikely, considering the nature of
> > that hash function
> 
> If the names are 8 character limited, then logically any name with the
> exact same set of characters would "collide" into the same formatted
> name.

Huh?  Collision is when two *different* values of argument yield the
same result.  What makes you assume that yours won't have any such
pairs shorter than 8 bytes?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ