From: Djalal Harouni <tixxdz@opendz.org>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org, Al Viro <viro@zeniv.linux.org.uk>,
"Eric W. Biederman" <ebiederm@xmission.com>,
Kees Cook <keescook@chromium.org>,
Andy Lutomirski <luto@amacapital.net>,
Oleg Nesterov <oleg@redhat.com>,
Linus Torvalds <torvalds@linux-foundation.org>,
Ingo Molnar <mingo@kernel.org>,
Alexey Dobriyan <adobriyan@gmail.com>
Subject: Re: [PATCH v2 1/2] procfs: make /proc/*/{stack,syscall,personality} 0400
Date: Tue, 15 Apr 2014 13:09:00 +0100 [thread overview]
Message-ID: <20140415120900.GA5766@dztty> (raw)
In-Reply-To: <20140328153231.93bcad089d9ccc670ee6cc17@linux-foundation.org>
On Fri, Mar 28, 2014 at 03:32:31PM -0700, Andrew Morton wrote:
> On Sat, 22 Mar 2014 14:37:39 +0100 Djalal Harouni <tixxdz@opendz.org> wrote:
>
> > These procfs files contain sensitive information and currently their
> > mode is 0444. Change this to 0400, so the VFS will be able to block
> > unprivileged processes from getting file descriptors on arbitrary
> > privileged /proc/*/{stack,syscall,personality} files.
> >
> > This reduces the scope of ASLR leaking and bypasses by protecting
> > already running processes.
>
> Sigh. Why on earth did we make these 444 in the first place.
>
> There is risk of breakage here. Probably anyone who is using these
> files and who observes such breakage is a sophisticated user who
> understands the reasons and knows how to make the tools work again.
> There's only one way to find out :(
>
> I can't remember why we even added /proc/pid/syscall - the changelog
> doesn't give a rationale (this is regrettably common).
Yep :-/
Ok, thank you for taking the patches!
Just to update the tread, Alexey Dobriyan suggested that we also improve
/proc/*/wchan
I'll do it by caching the ptrace check during open time, and re-check it
in proc_pid_wchan() only in case we return an address, this way we do not
break tools. Will add it to the patches I've and send it soon (didn't
want to disturb you during the merge window).
Thanks!
--
Djalal Harouni
http://opendz.org
next prev parent reply other threads:[~2014-04-15 12:09 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-22 13:37 [PATCH resend - v2 0/2] procfs: make /proc/*/{stack,syscall,pagemap} 0400 Djalal Harouni
2014-03-22 13:37 ` [PATCH v2 1/2] procfs: make /proc/*/{stack,syscall,personality} 0400 Djalal Harouni
2014-03-28 22:32 ` Andrew Morton
2014-04-02 17:34 ` Oleg Nesterov
2014-04-15 12:09 ` Djalal Harouni [this message]
2014-03-22 13:37 ` [PATCH v2 1/2] procfs: make /proc/*/pagemap 0400 Djalal Harouni
2014-03-22 14:23 ` [PATCH resend - v2 0/2] procfs: make /proc/*/{stack,syscall,pagemap} 0400 Kees Cook
-- strict thread matches above, loose matches on Subject: below --
2014-03-24 13:41 [PATCH v2 1/2] procfs: make /proc/*/{stack,syscall,personality} 0400 Alexey Dobriyan
2014-03-25 10:15 ` Djalal Harouni
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=20140415120900.GA5766@dztty \
--to=tixxdz@opendz.org \
--cc=adobriyan@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=ebiederm@xmission.com \
--cc=keescook@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@amacapital.net \
--cc=mingo@kernel.org \
--cc=oleg@redhat.com \
--cc=torvalds@linux-foundation.org \
--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