Re: [RFC, PATCH] pagemap: do not leak physical addresses to non-privileged userspace

2015-03-23 Thread Vlastimil Babka
On 23.3.2015 22:26, Pavel Machek wrote: > On Thu 2015-03-19 13:51:02, Vlastimil Babka wrote: >> On 03/17/2015 02:21 AM, Andy Lutomirski wrote: >>> On Mon, Mar 16, 2015 at 5:49 PM, Mark Seaborn wrote: >>> >>> The Intel people I asked last week weren't confident. For one thing, >>> I fully expect

Re: [RFC, PATCH] pagemap: do not leak physical addresses to non-privileged userspace

2015-03-23 Thread Pavel Machek
On Thu 2015-03-19 13:51:02, Vlastimil Babka wrote: > On 03/17/2015 02:21 AM, Andy Lutomirski wrote: > > On Mon, Mar 16, 2015 at 5:49 PM, Mark Seaborn wrote: > >> On 16 March 2015 at 14:11, Pavel Machek wrote: > >> > >>> Can we do anything about that? Disabling cache flushes from userland > >>>

Re: rowhammer and pagemap (was Re: [RFC, PATCH] pagemap: do not leak physical addresses to non-privileged userspace)

2015-03-23 Thread Pavel Machek
> > > The Intel people I asked last week weren't confident. For one thing, > > > I fully expect that rowhammer can be exploited using only reads and > > > writes with some clever tricks involving cache associativity. I don't > > > think there are any fully-associative caches, although the cache

Re: [RFC, PATCH] pagemap: do not leak physical addresses to non-privileged userspace

2015-03-23 Thread Pavel Machek
On Thu 2015-03-19 13:51:02, Vlastimil Babka wrote: On 03/17/2015 02:21 AM, Andy Lutomirski wrote: On Mon, Mar 16, 2015 at 5:49 PM, Mark Seaborn mseab...@chromium.org wrote: On 16 March 2015 at 14:11, Pavel Machek pa...@ucw.cz wrote: Can we do anything about that? Disabling cache flushes

Re: rowhammer and pagemap (was Re: [RFC, PATCH] pagemap: do not leak physical addresses to non-privileged userspace)

2015-03-23 Thread Pavel Machek
The Intel people I asked last week weren't confident. For one thing, I fully expect that rowhammer can be exploited using only reads and writes with some clever tricks involving cache associativity. I don't think there are any fully-associative caches, although the cache

Re: [RFC, PATCH] pagemap: do not leak physical addresses to non-privileged userspace

2015-03-23 Thread Vlastimil Babka
On 23.3.2015 22:26, Pavel Machek wrote: On Thu 2015-03-19 13:51:02, Vlastimil Babka wrote: On 03/17/2015 02:21 AM, Andy Lutomirski wrote: On Mon, Mar 16, 2015 at 5:49 PM, Mark Seaborn mseab...@chromium.org wrote: The Intel people I asked last week weren't confident. For one thing, I fully

Re: [RFC, PATCH] pagemap: do not leak physical addresses to non-privileged userspace

2015-03-19 Thread Vlastimil Babka
On 03/17/2015 02:21 AM, Andy Lutomirski wrote: > On Mon, Mar 16, 2015 at 5:49 PM, Mark Seaborn wrote: >> On 16 March 2015 at 14:11, Pavel Machek wrote: >> >>> Can we do anything about that? Disabling cache flushes from userland >>> should make it no longer exploitable. >> >> Unfortunately

Re: [RFC, PATCH] pagemap: do not leak physical addresses to non-privileged userspace

2015-03-19 Thread Vlastimil Babka
On 03/17/2015 02:21 AM, Andy Lutomirski wrote: On Mon, Mar 16, 2015 at 5:49 PM, Mark Seaborn mseab...@chromium.org wrote: On 16 March 2015 at 14:11, Pavel Machek pa...@ucw.cz wrote: Can we do anything about that? Disabling cache flushes from userland should make it no longer exploitable.

Re: rowhammer and pagemap (was Re: [RFC, PATCH] pagemap: do not leak physical addresses to non-privileged userspace)

2015-03-17 Thread One Thousand Gnomes
> > Can we just try getting rid of it except with global CAP_SYS_ADMIN. > > > > (Hmm. Rowhammer attacks targeting SMRAM could be interesting.) > CAP_SYS_RAWIO is the protection for "can achieve anything". If you have CAP_SYS_RAWIO you can attain any other capability, the reverse _should_ not

rowhammer and pagemap (was Re: [RFC, PATCH] pagemap: do not leak physical addresses to non-privileged userspace)

2015-03-17 Thread Pavel Machek
> > Given that, I think it would still be worthwhile to disable > > /proc/PID/pagemap. > > Having slept on this further, I think that unprivileged pagemap access > is awful and we should disable it with no option to re-enable. If we > absolutely must, we could allow programs to read all zeros

Re: rowhammer and pagemap (was Re: [RFC, PATCH] pagemap: do not leak physical addresses to non-privileged userspace)

2015-03-17 Thread One Thousand Gnomes
Can we just try getting rid of it except with global CAP_SYS_ADMIN. (Hmm. Rowhammer attacks targeting SMRAM could be interesting.) CAP_SYS_RAWIO is the protection for can achieve anything. If you have CAP_SYS_RAWIO you can attain any other capability, the reverse _should_ not be true.

rowhammer and pagemap (was Re: [RFC, PATCH] pagemap: do not leak physical addresses to non-privileged userspace)

2015-03-17 Thread Pavel Machek
Given that, I think it would still be worthwhile to disable /proc/PID/pagemap. Having slept on this further, I think that unprivileged pagemap access is awful and we should disable it with no option to re-enable. If we absolutely must, we could allow programs to read all zeros or to

Re: [RFC, PATCH] pagemap: do not leak physical addresses to non-privileged userspace

2015-03-16 Thread Andy Lutomirski
On Mon, Mar 16, 2015 at 5:49 PM, Mark Seaborn wrote: > On 16 March 2015 at 14:11, Pavel Machek wrote: >> On Mon 2015-03-09 23:11:12, Kirill A. Shutemov wrote: >> > From: "Kirill A. Shutemov" >> > >> > As pointed by recent post[1] on exploiting DRAM physical imperfection, >> > /proc/PID/pagemap

Re: [RFC, PATCH] pagemap: do not leak physical addresses to non-privileged userspace

2015-03-16 Thread Mark Seaborn
On 16 March 2015 at 14:11, Pavel Machek wrote: > On Mon 2015-03-09 23:11:12, Kirill A. Shutemov wrote: > > From: "Kirill A. Shutemov" > > > > As pointed by recent post[1] on exploiting DRAM physical imperfection, > > /proc/PID/pagemap exposes sensitive information which can be used to do > >

Re: [RFC, PATCH] pagemap: do not leak physical addresses to non-privileged userspace

2015-03-16 Thread Pavel Machek
On Mon 2015-03-09 23:11:12, Kirill A. Shutemov wrote: > From: "Kirill A. Shutemov" > > As pointed by recent post[1] on exploiting DRAM physical imperfection, > /proc/PID/pagemap exposes sensitive information which can be used to do > attacks. > > This is RFC patch which disallow anybody without

Re: [RFC, PATCH] pagemap: do not leak physical addresses to non-privileged userspace

2015-03-16 Thread Andy Lutomirski
On Mon, Mar 16, 2015 at 5:49 PM, Mark Seaborn mseab...@chromium.org wrote: On 16 March 2015 at 14:11, Pavel Machek pa...@ucw.cz wrote: On Mon 2015-03-09 23:11:12, Kirill A. Shutemov wrote: From: Kirill A. Shutemov kirill.shute...@linux.intel.com As pointed by recent post[1] on exploiting

Re: [RFC, PATCH] pagemap: do not leak physical addresses to non-privileged userspace

2015-03-16 Thread Mark Seaborn
On 16 March 2015 at 14:11, Pavel Machek pa...@ucw.cz wrote: On Mon 2015-03-09 23:11:12, Kirill A. Shutemov wrote: From: Kirill A. Shutemov kirill.shute...@linux.intel.com As pointed by recent post[1] on exploiting DRAM physical imperfection, /proc/PID/pagemap exposes sensitive information

Re: [RFC, PATCH] pagemap: do not leak physical addresses to non-privileged userspace

2015-03-16 Thread Pavel Machek
On Mon 2015-03-09 23:11:12, Kirill A. Shutemov wrote: From: Kirill A. Shutemov kirill.shute...@linux.intel.com As pointed by recent post[1] on exploiting DRAM physical imperfection, /proc/PID/pagemap exposes sensitive information which can be used to do attacks. This is RFC patch which

Re: [RFC, PATCH] pagemap: do not leak physical addresses to non-privileged userspace

2015-03-09 Thread Dave Hansen
On 03/09/2015 05:19 PM, Andy Lutomirski wrote: > per-pidns like this is no good. You shouldn't be able to create a > non-paranoid pidns if your parent is paranoid. That sounds like a reasonable addition that shouldn't be hard to add. > Also, at some point we need actual per-ns controls. This

Re: [RFC, PATCH] pagemap: do not leak physical addresses to non-privileged userspace

2015-03-09 Thread Andy Lutomirski
On Mon, Mar 9, 2015 at 5:11 PM, Kees Cook wrote: > On Mon, Mar 9, 2015 at 2:11 PM, Kirill A. Shutemov > wrote: >> From: "Kirill A. Shutemov" >> >> As pointed by recent post[1] on exploiting DRAM physical imperfection, >> /proc/PID/pagemap exposes sensitive information which can be used to do

Re: [RFC, PATCH] pagemap: do not leak physical addresses to non-privileged userspace

2015-03-09 Thread Kees Cook
On Mon, Mar 9, 2015 at 2:11 PM, Kirill A. Shutemov wrote: > From: "Kirill A. Shutemov" > > As pointed by recent post[1] on exploiting DRAM physical imperfection, > /proc/PID/pagemap exposes sensitive information which can be used to do > attacks. > > This is RFC patch which disallow anybody

Re: [RFC, PATCH] pagemap: do not leak physical addresses to non-privileged userspace

2015-03-09 Thread Konstantin Khlebnikov
On Tue, Mar 10, 2015 at 12:11 AM, Kirill A. Shutemov wrote: > From: "Kirill A. Shutemov" > > As pointed by recent post[1] on exploiting DRAM physical imperfection, > /proc/PID/pagemap exposes sensitive information which can be used to do > attacks. > > This is RFC patch which disallow anybody

Re: [RFC, PATCH] pagemap: do not leak physical addresses to non-privileged userspace

2015-03-09 Thread Pavel Emelyanov
On 03/10/2015 12:11 AM, Kirill A. Shutemov wrote: > From: "Kirill A. Shutemov" > > As pointed by recent post[1] on exploiting DRAM physical imperfection, > /proc/PID/pagemap exposes sensitive information which can be used to do > attacks. > > This is RFC patch which disallow anybody without

[RFC, PATCH] pagemap: do not leak physical addresses to non-privileged userspace

2015-03-09 Thread Kirill A. Shutemov
From: "Kirill A. Shutemov" As pointed by recent post[1] on exploiting DRAM physical imperfection, /proc/PID/pagemap exposes sensitive information which can be used to do attacks. This is RFC patch which disallow anybody without CAP_SYS_ADMIN to read the pagemap. Any comments? [1]

[RFC, PATCH] pagemap: do not leak physical addresses to non-privileged userspace

2015-03-09 Thread Kirill A. Shutemov
From: Kirill A. Shutemov kirill.shute...@linux.intel.com As pointed by recent post[1] on exploiting DRAM physical imperfection, /proc/PID/pagemap exposes sensitive information which can be used to do attacks. This is RFC patch which disallow anybody without CAP_SYS_ADMIN to read the pagemap.

Re: [RFC, PATCH] pagemap: do not leak physical addresses to non-privileged userspace

2015-03-09 Thread Pavel Emelyanov
On 03/10/2015 12:11 AM, Kirill A. Shutemov wrote: From: Kirill A. Shutemov kirill.shute...@linux.intel.com As pointed by recent post[1] on exploiting DRAM physical imperfection, /proc/PID/pagemap exposes sensitive information which can be used to do attacks. This is RFC patch which

Re: [RFC, PATCH] pagemap: do not leak physical addresses to non-privileged userspace

2015-03-09 Thread Konstantin Khlebnikov
On Tue, Mar 10, 2015 at 12:11 AM, Kirill A. Shutemov kir...@shutemov.name wrote: From: Kirill A. Shutemov kirill.shute...@linux.intel.com As pointed by recent post[1] on exploiting DRAM physical imperfection, /proc/PID/pagemap exposes sensitive information which can be used to do attacks.

Re: [RFC, PATCH] pagemap: do not leak physical addresses to non-privileged userspace

2015-03-09 Thread Kees Cook
On Mon, Mar 9, 2015 at 2:11 PM, Kirill A. Shutemov kir...@shutemov.name wrote: From: Kirill A. Shutemov kirill.shute...@linux.intel.com As pointed by recent post[1] on exploiting DRAM physical imperfection, /proc/PID/pagemap exposes sensitive information which can be used to do attacks.

Re: [RFC, PATCH] pagemap: do not leak physical addresses to non-privileged userspace

2015-03-09 Thread Andy Lutomirski
On Mon, Mar 9, 2015 at 5:11 PM, Kees Cook keesc...@chromium.org wrote: On Mon, Mar 9, 2015 at 2:11 PM, Kirill A. Shutemov kir...@shutemov.name wrote: From: Kirill A. Shutemov kirill.shute...@linux.intel.com As pointed by recent post[1] on exploiting DRAM physical imperfection,

Re: [RFC, PATCH] pagemap: do not leak physical addresses to non-privileged userspace

2015-03-09 Thread Dave Hansen
On 03/09/2015 05:19 PM, Andy Lutomirski wrote: per-pidns like this is no good. You shouldn't be able to create a non-paranoid pidns if your parent is paranoid. That sounds like a reasonable addition that shouldn't be hard to add. Also, at some point we need actual per-ns controls. This