From: Vasiliy Kulikov <segoon@openwall.com>
To: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: linux-kernel@vger.kernel.org, security@kernel.org,
Len Brown <len.brown@intel.com>, Pavel Machek <pavel@ucw.cz>,
linux-pm@lists.linux-foundation.org
Subject: Re: [PATCH] power: disable hibernation if module loading is disabled
Date: Sat, 5 Mar 2011 00:46:32 +0300 [thread overview]
Message-ID: <20110304214630.GA29883@albatros> (raw)
In-Reply-To: <201103042221.02852.rjw@sisk.pl>
On Fri, Mar 04, 2011 at 22:21 +0100, Rafael J. Wysocki wrote:
> On Friday, March 04, 2011, Vasiliy Kulikov wrote:
> > If modules_disabled is set to 1, then nobody, even full root may not write
> > to the kernel, right? So, if something permits to indirectly pass
> > modules_disabled restriction, this is a bug. Otherwise,
> > modules_disabled is confusing as it gives false sense of security.
> >
> > -OR-
> >
> > modules_disabled's documentation should be changed to note that it
> > doesn't prevent rootkit uploading, but only forbids modprob'ing modules
> > via the "official" init_module(2) gate, disallowing e.g. module autoloading.
>
> Why not to change that documentation, then?
Because it's better to fix something (if it is possible, of course) than
simply documenting the bug.
> Also, please note that in order to "write" into memory using the hibernation
> interface you need to have write access to swap,
No, you may just "write the kernel" via write() /dev/snapshot, this is
the way uswsusp works. I didn't check whether it really needs
temporary file to change the kernel memory or it may be done entirely
without disk iteraction. This is irrelevant to modules_disabled policy
violation, though.
> which you can use to corrupt
> memory regardless of the modules_disabled setting AFAICS.
Please correct me if I'm wrong, but kernel memory is not swappable at
all and only userspace memory is written to the swap. Root with
CAP_SYS_ADMIN already may do everything with all processes, so this is
not a threat.
If one may change kernel memory via swap then it is another problem with
modules_disabled.
Thanks,
--
Vasiliy Kulikov
http://www.openwall.com - bringing security into open computing environments
next prev parent reply other threads:[~2011-03-04 21:46 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-04 16:11 [PATCH] power: disable hibernation if module loading is disabled Vasiliy Kulikov
2011-03-04 18:43 ` Kees Cook
2011-03-04 20:48 ` Rafael J. Wysocki
2011-03-04 20:32 ` Pavel Machek
2011-03-04 21:52 ` Vasiliy Kulikov
2011-03-04 20:42 ` Rafael J. Wysocki
2011-03-04 21:10 ` Vasiliy Kulikov
2011-03-04 21:21 ` Rafael J. Wysocki
2011-03-04 21:46 ` Vasiliy Kulikov [this message]
2011-03-04 22:30 ` Rafael J. Wysocki
2011-03-04 22:42 ` Pavel Machek
2011-03-05 10:34 ` Vasiliy Kulikov
2011-03-05 11:24 ` Rafael J. Wysocki
2011-03-08 6:58 ` Pavel Machek
2011-03-04 21:27 ` [Security] " Greg KH
2011-03-04 21:51 ` Vasiliy Kulikov
2011-03-06 19:36 ` david
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=20110304214630.GA29883@albatros \
--to=segoon@openwall.com \
--cc=len.brown@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@lists.linux-foundation.org \
--cc=pavel@ucw.cz \
--cc=rjw@sisk.pl \
--cc=security@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;
as well as URLs for NNTP newsgroup(s).