linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eric Biggers <ebiggers@kernel.org>
To: Al Viro <viro@zeniv.linux.org.uk>
Cc: "OGAWA Hirofumi" <hirofumi@mail.parknet.co.jp>,
	"Pali Rohár" <pali.rohar@gmail.com>,
	linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
	"Theodore Y. Ts'o" <tytso@mit.edu>,
	"Namjae Jeon" <linkinjeon@gmail.com>,
	"Gabriel Krisman Bertazi" <krisman@collabora.com>,
	"Linus Torvalds" <torvalds@linux-foundation.org>
Subject: Re: oopsably broken case-insensitive support in ext4 and f2fs (Re: vfat: Broken case-insensitive support for UTF-8)
Date: Thu, 23 Jan 2020 20:29:53 -0800	[thread overview]
Message-ID: <20200124042953.GA832@sol.localdomain> (raw)
In-Reply-To: <20200120193558.GD8904@ZenIV.linux.org.uk>

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

  reply	other threads:[~2020-01-24  4:30 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-19 22:14 vfat: Broken case-insensitive support for UTF-8 Pali Rohár
2020-01-19 23:08 ` Al Viro
2020-01-19 23:33   ` Pali Rohár
2020-01-20  0:09     ` Al Viro
2020-01-20 11:19       ` Pali Rohár
2020-01-20  4:04 ` OGAWA Hirofumi
2020-01-20  7:30   ` Al Viro
2020-01-20  7:45     ` Al Viro
2020-01-20  8:07       ` oopsably broken case-insensitive support in ext4 and f2fs (Re: vfat: Broken case-insensitive support for UTF-8) Al Viro
2020-01-20 19:35         ` Al Viro
2020-01-24  4:29           ` Eric Biggers [this message]
2020-01-24 17:47             ` Linus Torvalds
2020-01-24 18:03               ` Jaegeuk Kim
2020-01-24 18:45                 ` Eric Biggers
2020-01-20 11:04   ` vfat: Broken case-insensitive support for UTF-8 Pali Rohár
2020-01-20 12:07     ` OGAWA Hirofumi
2020-01-20 21:40       ` Pali Rohár
2020-01-20 22:46         ` Al Viro
2020-01-20 23:57           ` Pali Rohár
2020-01-21  0:07             ` Al Viro
2020-01-21 20:34               ` Pali Rohár
2020-01-21 21:36                 ` Al Viro
2020-01-21 22:14                   ` Al Viro
2020-01-21 22:46                     ` Pali Rohár
2020-01-26 23:08                 ` Pali Rohár
2020-01-21 12:43             ` David Laight
2020-01-22  0:25         ` Gabriel Krisman Bertazi
2020-01-20 15:07     ` David Laight
2020-01-20 15:20       ` Pali Rohár
2020-01-20 15:47         ` David Laight
2020-01-20 16:12           ` Al Viro
2020-01-20 16:51             ` David Laight
2020-01-20 16:27           ` Pali Rohár
2020-01-20 16:43             ` David Laight
2020-01-20 16:56               ` Pali Rohár
2020-01-20 17:37       ` Theodore Y. Ts'o
2020-01-20 17:32   ` Theodore Y. Ts'o
2020-01-20 17:56     ` Pali Rohár
2020-01-21  3:52     ` OGAWA Hirofumi
2020-01-21 11:00       ` Pali Rohár
2020-01-21 12:26         ` OGAWA Hirofumi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200124042953.GA832@sol.localdomain \
    --to=ebiggers@kernel.org \
    --cc=hirofumi@mail.parknet.co.jp \
    --cc=krisman@collabora.com \
    --cc=linkinjeon@gmail.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pali.rohar@gmail.com \
    --cc=torvalds@linux-foundation.org \
    --cc=tytso@mit.edu \
    --cc=viro@zeniv.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).