public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH resend - v2 0/2] procfs: make /proc/*/{stack,syscall,pagemap} 0400
@ 2014-03-22 13:37 Djalal Harouni
  2014-03-22 13:37 ` [PATCH v2 1/2] procfs: make /proc/*/{stack,syscall,personality} 0400 Djalal Harouni
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Djalal Harouni @ 2014-03-22 13:37 UTC (permalink / raw)
  To: linux-kernel, Andrew Morton, Al Viro, Eric W. Biederman,
	Kees Cook, Andy Lutomirski, Oleg Nesterov, Linus Torvalds,
	Ingo Molnar
  Cc: Djalal Harouni

(Please note: this is a resend of version 2, I got two Acked-by, but no
one replied on why it should not be applied...)


The following patches make /proc/*/{stack,syscall,personality,pagemap}
0400.

These files contain sensitive information that can be used by an
unprivileged process to leak address space and bypass ASLR. This will
make the VFS able to bloc unprivileged processes from getting file
descriptors on *already* *running* processes (privileged processes).

This does not protect all the /proc and exec-suid cases. It just reduces
the scope of ASLR leaks by protecting *already running* processes. The
leak is still possible on these files *only* if an attacker opens its
/proc/*/file and can *spawn* a target setuid process, then read from it.

So, only already running processes are protected.

Patches were Acked by Kees Cook and Andy Lutomirski. Thank you!


This is a resend, first send:
https://lkml.org/lkml/2013/12/15/114

Of the already version 2, the original discussion:
https://lkml.org/lkml/2013/8/26/354
(date: Aug 2013, and it can be used to leak ASLR).


Kees Cook also confirmed the security exposure here:
https://lkml.org/lkml/2013/8/28/564

At least we have a VFS protection for now.


Reminder:
I've discussed the technique to use the 'file->f_cred' to protect proc
entries here:
https://lkml.org/lkml/2013/10/1/371

Eric suggest it, I did the implementation and it was rejected.

Good I've took _all_ the comments in consideration, and came up with
another scheme. It will protect *already running* processes, but first
I need to get this simple series accepted!


Thanks!


Djalal Harouni (2):
 procfs: make /proc/*/{stack,syscall,personality} 0400
 procfs: make /proc/*/pagemap 0400

 fs/proc/base.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

^ permalink raw reply	[flat|nested] 9+ messages in thread
* Re: [PATCH v2 1/2] procfs: make /proc/*/{stack,syscall,personality} 0400
@ 2014-03-24 13:41 Alexey Dobriyan
  2014-03-25 10:15 ` Djalal Harouni
  0 siblings, 1 reply; 9+ messages in thread
From: Alexey Dobriyan @ 2014-03-24 13:41 UTC (permalink / raw)
  To: tixxdz; +Cc: Linux Kernel

> - ONE("stack",      S_IRUGO, proc_pid_stack),
> + ONE("stack",      S_IRUSR, proc_pid_stack),

no love for /proc/*/wchan?

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2014-04-15 12:09 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox