From: mingo@kernel.org (Ingo Molnar)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 2/2] restrict /dev/mem to idle io memory ranges
Date: Thu, 26 Nov 2015 12:08:55 +0100 [thread overview]
Message-ID: <20151126110855.GA32226@gmail.com> (raw)
In-Reply-To: <CAPcyv4ijWns879DytqUa+=r5hzQ1qzmB83VV6Z16kQNtmHUtbA@mail.gmail.com>
* Dan Williams <dan.j.williams@intel.com> wrote:
> > - why is the patch mucking with access to PCI and BIOS space? Is the
> > persistent memory even mappable in those regions? Or is the concern
> > that userspace can access control registers associated with the
> > persistent memory? What is the problem scenario?
>
> It seems to me that letting /dev/mem do arbitrary access to any region
> of memory is a dangerous capability for a production environment.
So basically the original motivation years ago was to disable /dev/mem altogether:
it used to be a wide open roothole if anything with write access to it (such as
old Xorg) is exploited, plus it's a favorite and convenient tool for stealth
access to system areas of memory in cases where the attacker already has root.
(this is relevant as even being root might not give easy access to system mmio
areas if things like being able to load modules is restricted even for room, and
if the system has readonly storage and a few other things configured.)
But we couldn't disable /dev/mem completely due to Xorg and dosemu legacies - so
we came up with this restriction feature that limits its scope.
Any additional steps that limit the scope of access under the STRICT_DEVMEM option
(which is really a misnomer: it should be RESTRICT_DEVMEM instead) are welcome
from a generic Linux distro POV.
Thanks,
Ingo
prev parent reply other threads:[~2015-11-26 11:08 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-24 0:05 [PATCH v2 0/2] restrict /dev/mem to idle io memory ranges Dan Williams
2015-11-24 0:05 ` [PATCH v2 1/2] arch: consolidate CONFIG_STRICT_DEVM in lib/Kconfig.debug Dan Williams
2015-11-24 0:06 ` [PATCH v2 2/2] restrict /dev/mem to idle io memory ranges Dan Williams
2015-11-24 22:25 ` Andrew Morton
2015-11-25 0:34 ` Dan Williams
2015-11-25 0:47 ` Andrew Morton
2015-11-25 0:50 ` Kees Cook
2015-11-25 1:28 ` Dan Williams
2015-11-25 18:54 ` Dan Williams
2015-11-26 11:08 ` Ingo Molnar [this message]
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=20151126110855.GA32226@gmail.com \
--to=mingo@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
/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;
as well as URLs for NNTP newsgroup(s).