From: Andrew Morton <akpm@linux-foundation.org>
To: Djalal Harouni <tixxdz@opendz.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>
Subject: Re: [PATCH v2 1/2] procfs: make /proc/*/{stack,syscall,personality} 0400
Date: Fri, 28 Mar 2014 15:32:31 -0700 [thread overview]
Message-ID: <20140328153231.93bcad089d9ccc670ee6cc17@linux-foundation.org> (raw)
In-Reply-To: <1395495460-7652-2-git-send-email-tixxdz@opendz.org>
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).
Now for a six-year-late code review:
- How the heck can target==current in task_current_syscall()?
- Less talk, more action:
From: Andrew Morton <akpm@linux-foundation.org>
Subject: lib/syscall.c: unexport task_current_syscall()
It is only used by procfs and procfs cannot be a module.
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
lib/syscall.c | 1 -
1 file changed, 1 deletion(-)
diff -puN lib/syscall.c~a lib/syscall.c
--- a/lib/syscall.c~a
+++ a/lib/syscall.c
@@ -72,4 +72,3 @@ int task_current_syscall(struct task_str
return 0;
}
-EXPORT_SYMBOL_GPL(task_current_syscall);
_
next prev parent reply other threads:[~2014-03-28 22:32 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 [this message]
2014-04-02 17:34 ` Oleg Nesterov
2014-04-15 12:09 ` Djalal Harouni
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
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=20140328153231.93bcad089d9ccc670ee6cc17@linux-foundation.org \
--to=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=tixxdz@opendz.org \
--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
Powered by JetHome