Re: [RFC][PATCH v2] procfs: Always expose /proc/pid/map_files/ and make it readable

2015-02-03 Thread Calvin Owens
On Monday 02/02 at 12:16 -0800, Andy Lutomirski wrote: On Fri, Jan 30, 2015 at 5:58 PM, Calvin Owens calvinow...@fb.com wrote: On Thursday 01/29 at 17:30 -0800, Kees Cook wrote: On Tue, Jan 27, 2015 at 8:38 PM, Calvin Owens calvinow...@fb.com wrote: On Monday 01/26 at 15:43 -0800, Andrew

Re: [RFC][PATCH v2] procfs: Always expose /proc/pid/map_files/ and make it readable

2015-02-03 Thread Calvin Owens
On Monday 02/02 at 09:01 -0500, Austin S Hemmelgarn wrote: On 2015-01-30 20:58, Calvin Owens wrote: On Thursday 01/29 at 17:30 -0800, Kees Cook wrote: On Tue, Jan 27, 2015 at 8:38 PM, Calvin Owens calvinow...@fb.com wrote: On Monday 01/26 at 15:43 -0800, Andrew Morton wrote: On Tue, 27 Jan

Re: [RFC][PATCH v2] procfs: Always expose /proc/pid/map_files/ and make it readable

2015-02-02 Thread Andy Lutomirski
On Fri, Jan 30, 2015 at 5:58 PM, Calvin Owens calvinow...@fb.com wrote: On Thursday 01/29 at 17:30 -0800, Kees Cook wrote: On Tue, Jan 27, 2015 at 8:38 PM, Calvin Owens calvinow...@fb.com wrote: On Monday 01/26 at 15:43 -0800, Andrew Morton wrote: On Tue, 27 Jan 2015 00:00:54 +0300 Cyrill

Re: [RFC][PATCH v2] procfs: Always expose /proc/pid/map_files/ and make it readable

2015-02-02 Thread Austin S Hemmelgarn
On 2015-01-30 20:58, Calvin Owens wrote: On Thursday 01/29 at 17:30 -0800, Kees Cook wrote: On Tue, Jan 27, 2015 at 8:38 PM, Calvin Owens calvinow...@fb.com wrote: On Monday 01/26 at 15:43 -0800, Andrew Morton wrote: On Tue, 27 Jan 2015 00:00:54 +0300 Cyrill Gorcunov gorcu...@gmail.com wrote:

Re: [RFC][PATCH v2] procfs: Always expose /proc/pid/map_files/ and make it readable

2015-01-30 Thread Calvin Owens
On Thursday 01/29 at 17:30 -0800, Kees Cook wrote: On Tue, Jan 27, 2015 at 8:38 PM, Calvin Owens calvinow...@fb.com wrote: On Monday 01/26 at 15:43 -0800, Andrew Morton wrote: On Tue, 27 Jan 2015 00:00:54 +0300 Cyrill Gorcunov gorcu...@gmail.com wrote: On Mon, Jan 26, 2015 at

Re: [RFC][PATCH v2] procfs: Always expose /proc/pid/map_files/ and make it readable

2015-01-29 Thread Kees Cook
On Tue, Jan 27, 2015 at 8:38 PM, Calvin Owens calvinow...@fb.com wrote: On Monday 01/26 at 15:43 -0800, Andrew Morton wrote: On Tue, 27 Jan 2015 00:00:54 +0300 Cyrill Gorcunov gorcu...@gmail.com wrote: On Mon, Jan 26, 2015 at 02:47:31PM +0200, Kirill A. Shutemov wrote: On Fri, Jan 23,

Re: [RFC][PATCH v2] procfs: Always expose /proc/pid/map_files/ and make it readable

2015-01-27 Thread Kees Cook
On Mon, Jan 26, 2015 at 11:37 PM, Cyrill Gorcunov gorcu...@gmail.com wrote: On Mon, Jan 26, 2015 at 04:15:26PM -0800, Kees Cook wrote: akpm3:/usr/src/25 grep -r map_files Documentation If akpm's comments weren't clear: this needs to be fixed. Everything in /proc should appear in

Re: [RFC][PATCH v2] procfs: Always expose /proc/pid/map_files/ and make it readable

2015-01-27 Thread Cyrill Gorcunov
On Tue, Jan 27, 2015 at 11:53:19AM -0800, Kees Cook wrote: Are mount namespaces handled in this output? Could you clarify this moment, i'm not sure i get it. I changed how I asked this question in my review of the documentation, but it looks like these symlinks aren't regular symlinks

Re: [RFC][PATCH v2] procfs: Always expose /proc/pid/map_files/ and make it readable

2015-01-27 Thread Pavel Emelyanov
Are mount namespaces handled in this output? Could you clarify this moment, i'm not sure i get it. I changed how I asked this question in my review of the documentation, but it looks like these symlinks aren't regular symlinks (that are up to the follower to have access to the file system

Re: [RFC][PATCH v2] procfs: Always expose /proc/pid/map_files/ and make it readable

2015-01-27 Thread Calvin Owens
On Monday 01/26 at 15:43 -0800, Andrew Morton wrote: On Tue, 27 Jan 2015 00:00:54 +0300 Cyrill Gorcunov gorcu...@gmail.com wrote: On Mon, Jan 26, 2015 at 02:47:31PM +0200, Kirill A. Shutemov wrote: On Fri, Jan 23, 2015 at 07:15:44PM -0800, Calvin Owens wrote: Currently,

Re: [RFC][PATCH v2] procfs: Always expose /proc/pid/map_files/ and make it readable

2015-01-26 Thread Kirill A. Shutemov
On Fri, Jan 23, 2015 at 07:15:44PM -0800, Calvin Owens wrote: Currently, /proc/pid/map_files/ is restricted to CAP_SYS_ADMIN, and is only exposed if CONFIG_CHECKPOINT_RESTORE is set. This interface is very useful for enumerating the files mapped into a process when the more verbose information

Re: [RFC][PATCH v2] procfs: Always expose /proc/pid/map_files/ and make it readable

2015-01-26 Thread Andrew Morton
On Tue, 27 Jan 2015 09:46:47 +0300 Cyrill Gorcunov gorcu...@gmail.com wrote: There's one other problem here: we're assuming that the map_files implementation doesn't have bugs. If it does have bugs then relaxing permissions like this will create new vulnerabilities. And the map_files

Re: [RFC][PATCH v2] procfs: Always expose /proc/pid/map_files/ and make it readable

2015-01-26 Thread Cyrill Gorcunov
On Mon, Jan 26, 2015 at 10:50:23PM -0800, Andrew Morton wrote: On Tue, 27 Jan 2015 09:46:47 +0300 Cyrill Gorcunov gorcu...@gmail.com wrote: There's one other problem here: we're assuming that the map_files implementation doesn't have bugs. If it does have bugs then relaxing

Re: [RFC][PATCH v2] procfs: Always expose /proc/pid/map_files/ and make it readable

2015-01-26 Thread Cyrill Gorcunov
On Mon, Jan 26, 2015 at 03:43:46PM -0800, Andrew Morton wrote: Looks good to me, thanks! Though I would really appreciate if someone from security camp take a look as well. hm, who's that. Kees comes to mind. yup, I managed to forget CC him. And reviewers' task would be a heck of a

Re: [RFC][PATCH v2] procfs: Always expose /proc/pid/map_files/ and make it readable

2015-01-26 Thread Kees Cook
On Mon, Jan 26, 2015 at 3:43 PM, Andrew Morton a...@linux-foundation.org wrote: On Tue, 27 Jan 2015 00:00:54 +0300 Cyrill Gorcunov gorcu...@gmail.com wrote: On Mon, Jan 26, 2015 at 02:47:31PM +0200, Kirill A. Shutemov wrote: On Fri, Jan 23, 2015 at 07:15:44PM -0800, Calvin Owens wrote:

Re: [RFC][PATCH v2] procfs: Always expose /proc/pid/map_files/ and make it readable

2015-01-26 Thread Cyrill Gorcunov
On Mon, Jan 26, 2015 at 04:15:26PM -0800, Kees Cook wrote: akpm3:/usr/src/25 grep -r map_files Documentation If akpm's comments weren't clear: this needs to be fixed. Everything in /proc should appear in Documentation. I'll do that. The 640708a2cff7f81 changelog says: : This

Re: [RFC][PATCH v2] procfs: Always expose /proc/pid/map_files/ and make it readable

2015-01-26 Thread Andrew Morton
On Tue, 27 Jan 2015 00:00:54 +0300 Cyrill Gorcunov gorcu...@gmail.com wrote: On Mon, Jan 26, 2015 at 02:47:31PM +0200, Kirill A. Shutemov wrote: On Fri, Jan 23, 2015 at 07:15:44PM -0800, Calvin Owens wrote: Currently, /proc/pid/map_files/ is restricted to CAP_SYS_ADMIN, and is only

Re: [RFC][PATCH v2] procfs: Always expose /proc/pid/map_files/ and make it readable

2015-01-26 Thread Kirill A. Shutemov
On Mon, Jan 26, 2015 at 03:43:46PM -0800, Andrew Morton wrote: On Tue, 27 Jan 2015 00:00:54 +0300 Cyrill Gorcunov gorcu...@gmail.com wrote: On Mon, Jan 26, 2015 at 02:47:31PM +0200, Kirill A. Shutemov wrote: On Fri, Jan 23, 2015 at 07:15:44PM -0800, Calvin Owens wrote: Currently,

Re: [RFC][PATCH v2] procfs: Always expose /proc/pid/map_files/ and make it readable

2015-01-26 Thread Cyrill Gorcunov
On Mon, Jan 26, 2015 at 02:47:31PM +0200, Kirill A. Shutemov wrote: On Fri, Jan 23, 2015 at 07:15:44PM -0800, Calvin Owens wrote: Currently, /proc/pid/map_files/ is restricted to CAP_SYS_ADMIN, and is only exposed if CONFIG_CHECKPOINT_RESTORE is set. This interface is very useful for

[RFC][PATCH v2] procfs: Always expose /proc/pid/map_files/ and make it readable

2015-01-23 Thread Calvin Owens
Currently, /proc/pid/map_files/ is restricted to CAP_SYS_ADMIN, and is only exposed if CONFIG_CHECKPOINT_RESTORE is set. This interface is very useful for enumerating the files mapped into a process when the more verbose information in /proc/pid/maps is not needed. This patch moves the folder out