public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: devzero@web.de
To: arjan@infradead.org
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] x86: introduce /dev/mem restrictions with a config option
Date: Thu, 31 Jan 2008 15:04:28 +0100	[thread overview]
Message-ID: <137932353@web.de> (raw)

nice !

did you think about some boot-time param , e.g. "insecure-devmem" or something like that?

recompiling kernel is time consuming.....






From: Arjan van de Ven <arjan@linux.intel.com>
Subject: [PATCH] x86: introduce /dev/mem restrictions with a config option

This patch introduces a restriction on /dev/mem: Only non-memory can be
read or written unless the newly introduced config option is set.

The X server needs access to /dev/mem for the PCI space, but it doesn't need
access to memory; both the file permissions and SELinux permissions of /dev/mem
just make X effectively super-super powerful. With the exception of the
BIOS area, there's just no valid app that uses /dev/mem on actual memory.
Other popular users of /dev/mem are rootkits and the like.
(note: mmap access of memory via /dev/mem was already not allowed since
a really long time)

People who want to use /dev/mem for kernel debugging can enable the config
option.

The restrictions of this patch have been in the Fedora and RHEL kernels for
at least 4 years without any problems.

Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
_______________________________________________________________________
Jetzt neu! Schützen Sie Ihren PC mit McAfee und WEB.DE. 30 Tage
kostenlos testen. http://www.pc-sicherheit.web.de/startseite/?mc=022220


             reply	other threads:[~2008-01-31 14:07 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-31 14:04 devzero [this message]
2008-01-31 14:41 ` [PATCH] x86: introduce /dev/mem restrictions with a config option Arjan van de Ven
  -- strict thread matches above, loose matches on Subject: below --
2008-01-30 20:48 Arjan van de Ven
2008-01-31 16:53 ` Jan Engelhardt
2008-01-31 17:08   ` Arjan van de Ven
2008-01-31 17:42     ` H. Peter Anvin
2008-01-31 22:02       ` Jesse Barnes
2008-01-31 22:05         ` H. Peter Anvin

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=137932353@web.de \
    --to=devzero@web.de \
    --cc=arjan@infradead.org \
    --cc=linux-kernel@vger.kernel.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