From: Pavel Machek <pavel@ucw.cz>
To: Alexey Dobriyan <adobriyan@gmail.com>
Cc: akpm@linux-foundation.org, linux-kernel@vger.kernel.org,
eric.dumazet@gmail.com, xiyou.wangcong@gmail.com, fw@strlen.de
Subject: Re: [PATCH] proc: reject "." and ".." as filenames
Date: Sun, 11 Mar 2018 22:41:53 +0100 [thread overview]
Message-ID: <20180311214153.GA6842@amd> (raw)
In-Reply-To: <20180311213534.GA5171@avx2>
[-- Attachment #1: Type: text/plain, Size: 1282 bytes --]
On Mon 2018-03-12 00:35:34, Alexey Dobriyan wrote:
> On Sun, Mar 11, 2018 at 10:30:58PM +0100, Pavel Machek wrote:
> > On Sat 2018-03-10 03:12:23, Alexey Dobriyan wrote:
> > > Various subsystems can create files and directories in /proc
> > > with names directly controlled by userspace.
> > >
> > > Which means "/", "." and ".." are no-no.
> > >
> > > "/" split is already taken care of, do the other 2 prohibited names.
> >
> > Hmm, patch is probably good idea, but now it means that userspace can
> > trigger WARN()s, and can hide objects from root by naming them '.' and
> > '..'... which is not good.
>
> Patch rejects creation of such entries.
>
> And they should be harmless as VFS lookup won't find them, only readdir
> would. It not clear how they could be useful.
Yeah, as I said, that's half of problem.
If I can name my object "." and it will be hidden from root, that
sounds like a security hole to be prevented.
So if you know _which_ subsystem allow creating files and directories
in /proc with names directly controlled by userspace, please let us
know, we want to fix that.
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]
next prev parent reply other threads:[~2018-03-11 21:41 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-10 0:12 [PATCH] proc: reject "." and ".." as filenames Alexey Dobriyan
2018-03-10 0:19 ` Florian Westphal
2018-03-11 21:30 ` Pavel Machek
2018-03-11 21:35 ` Alexey Dobriyan
2018-03-11 21:41 ` Pavel Machek [this message]
2018-03-12 23:00 ` Andrew Morton
2018-03-13 7:20 ` Alexey Dobriyan
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=20180311214153.GA6842@amd \
--to=pavel@ucw.cz \
--cc=adobriyan@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=eric.dumazet@gmail.com \
--cc=fw@strlen.de \
--cc=linux-kernel@vger.kernel.org \
--cc=xiyou.wangcong@gmail.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.