linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Luigi Semenzato <semenzato@google.com>
To: Johannes Weiner <hannes@cmpxchg.org>, Will Drewry <drewry@google.com>
Cc: Ric Mason <ric.masonn@gmail.com>,
	linux-mm@kvack.org, Hugh Dickins <hughd@google.com>
Subject: Re: security: restricting access to swap
Date: Fri, 15 Mar 2013 10:27:23 -0700	[thread overview]
Message-ID: <CAA25o9SsVppWQ+Hi4LQ5OkiENHF5BQeNVD_G+a7CUbnPgOm=YQ@mail.gmail.com> (raw)
In-Reply-To: <20130315165509.GA1108@cmpxchg.org>

On Fri, Mar 15, 2013 at 9:55 AM, Johannes Weiner <hannes@cmpxchg.org> wrote:
> On Fri, Mar 15, 2013 at 08:48:49AM -0700, Luigi Semenzato wrote:
>> On Fri, Mar 15, 2013 at 2:04 AM, Ric Mason <ric.masonn@gmail.com> wrote:
>> > On 03/12/2013 07:57 AM, Luigi Semenzato wrote:
>> >>
>> >> Greetings linux-mmers,
>> >>
>> >> before we can fully deploy zram, we must ensure it conforms to the
>> >> Chrome OS security requirements.  In particular, we do not want to
>> >> allow user space to read/write the swap device---not even root-owned
>> >> processes.
>> >
>> >
>> > Interesting.
>>
>> Thank you.
>>
>> >>
>> >> A similar restriction is available for /dev/mem under
>> >> CONFIG_STRICT_DEVMEM.
>> >
>> >
>> > Sorry, what's /dev/mem used for?  and why relevant your topic?
>>
>> I don't know what it's used for Chrome OS, but I don't think it
>> matters.  The point is that /dev/mem is compiled in the kernel, and
>> without CONFIG_STRICT_DEVMEM it offers a way for a root-owned process
>> to read/write all of physical memory.  The situation is not as dire
>> with a swap device, but currently a root-owned process can open a
>> block device used for swap and peek and poke its data, which means
>> that a root-owned process has now potential access to the data segment
>> of any other process, among other things.
>
> How do you handle /proc/<pid>/mem?

Right.  We do not.  But... we might!  We could turn it off and see if
it breaks anything important.

In any case, we don't like expanding the attack surface.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2013-03-15 17:27 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-11 23:57 Luigi Semenzato
2013-03-12 13:06 ` Konrad Rzeszutek Wilk
2013-03-12 15:46   ` Luigi Semenzato
2013-03-12 23:32 ` Simon Jeons
2013-03-15  9:04 ` Ric Mason
2013-03-15 15:48   ` Luigi Semenzato
2013-03-15 16:55     ` Johannes Weiner
2013-03-15 17:27       ` Luigi Semenzato [this message]
2013-03-15 22:19         ` Luigi Semenzato
2013-03-18  3:58 ` Hugh Dickins
2013-03-18 16:05   ` Luigi Semenzato
2013-03-18 23:43 ` KOSAKI Motohiro
2013-03-19 17:39   ` Will Drewry

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='CAA25o9SsVppWQ+Hi4LQ5OkiENHF5BQeNVD_G+a7CUbnPgOm=YQ@mail.gmail.com' \
    --to=semenzato@google.com \
    --cc=drewry@google.com \
    --cc=hannes@cmpxchg.org \
    --cc=hughd@google.com \
    --cc=linux-mm@kvack.org \
    --cc=ric.masonn@gmail.com \
    /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