lkml.org 
[lkml]   [2020]   [Jan]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: oopsably broken case-insensitive support in ext4 and f2fs (Re: vfat: Broken case-insensitive support for UTF-8)
    On Mon, Jan 20, 2020 at 07:35:58PM +0000, Al Viro wrote:
    > On Mon, Jan 20, 2020 at 08:07:21AM +0000, Al Viro wrote:
    >
    > > > > I hadn't checked ->d_compare() instances for a while; somebody needs to
    > > > > do that again, by the look of it. The above definitely is broken;
    > > > > no idea how many other instaces had grown such bugs...
    > > >
    > > > f2fs one also has the same bug. Anyway, I'm going down right now, will
    > > > check the rest tomorrow morning...
    > >
    > > We _probably_ can get away with just checking that inode for NULL and
    > > buggering off if it is (->d_seq mismatch is guaranteed in that case),
    > > but I suspect that we might need READ_ONCE() on both dereferences.
    > > I hate memory barriers...
    >
    > FWIW, other instances seem to be OK; HFS+ one might or might not be
    > OK in the face of concurrent rename (wrong result in that case is
    > no problem; oops would be), but it doesn't play silly buggers with
    > pointer-chasing.
    >
    > ext4 and f2fs do, and ->d_compare() is broken in both of them.

    Thanks Al. I sent out fixes for this:

    ext4: https://lore.kernel.org/r/20200124041234.159740-1-ebiggers@kernel.org
    f2fs: https://lore.kernel.org/r/20200124041549.159983-1-ebiggers@kernel.org

    Note that ->d_hash() was broken too. In fact, that was much easier to
    reproduce.

    - Eric

    \
     
     \ /
      Last update: 2020-01-24 05:30    [W:3.304 / U:0.988 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site