[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAG48ez22Mc=t7_=WpZdLFJhShk8xMQb=G2dem56NXK2JgXh-Ng@mail.gmail.com>
Date: Fri, 18 Jan 2019 17:22:50 +0100
From: Jann Horn <jannh@...gle.com>
To: Dave Chinner <david@...morbit.com>
Cc: Richard Henderson <rth@...ddle.net>,
Ivan Kokshaysky <ink@...assic.park.msu.ru>,
Matt Turner <mattst88@...il.com>,
Alexander Viro <viro@...iv.linux.org.uk>,
linux-fsdevel@...r.kernel.org,
"Eric W. Biederman" <ebiederm@...ssion.com>,
"Theodore Ts'o" <tytso@....edu>,
Andreas Dilger <adilger.kernel@...ger.ca>,
linux-alpha@...r.kernel.org,
kernel list <linux-kernel@...r.kernel.org>,
Pavel Machek <pavel@....cz>
Subject: Re: [PATCH v3 1/2] fs: don't let getdents return bogus names
On Tue, Jan 15, 2019 at 1:01 AM Dave Chinner <david@...morbit.com> wrote:
> On Mon, Jan 14, 2019 at 07:23:17PM +0100, Jann Horn wrote:
> > When you e.g. run `find` on a directory for which getdents returns
> > "filenames" that contain slashes, `find` passes those "filenames" back to
> > the kernel, which then interprets them as paths. That could conceivably
> > cause userspace to do something bad when accessing something like an
> > untrusted USB stick, but I'm not aware of any specific example.
> >
> > Instead of returning bogus filenames to userspace, return -EUCLEAN.
>
> Please don't use EUCLEAN directly to indicate filesystem corruption
> directly. If we want to indicate that the filesystem is corrupted,
> please hoist the multiple XFS/ext4 definitions of:
>
> #define EFSCORRUPTED EUCLEAN
>
> up into include/uapi/asm-generic/errno.h and then use EFSCORRUPTED
Alright, I've added a patch that moves EFSCORRUPTED into the uapi
header in front of my series and changed the following patches to use
EFSCORRUPTED instead of EUCLEAN; see the v4 version I just sent out.
Powered by blists - more mailing lists