From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: Vasiliy Kulikov <segoon@openwall.com>
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: Fri, 4 Mar 2011 21:42:09 +0100 [thread overview]
Message-ID: <201103042142.09247.rjw@sisk.pl> (raw)
In-Reply-To: <1299255084-4390-1-git-send-email-segoon@openwall.com>
On Friday, March 04, 2011, Vasiliy Kulikov wrote:
> If /proc/sys/kernel/modules_disabled is set to 1, then nobody (even full
> root) may not read/write arbitrary kernel memory. In spite of it,
> hibernation allows anyone with an access to either /dev/snapshot or
> /sys/power/ make the full snapshot of the system. This snapshot may be
> freely changed and uploaded back.
>
> Signed-off-by: Vasiliy Kulikov <segoon@openwall.com>
That "everyone" is actually the "full root" (in the case of /sys/power/state)
or someone having CAP_SYS_ADMIN in the /dev/snapshot case, right?
So the changelog is misleading and please fix it.
Second, there's _zero_ relationship between /proc/sys/kernel/modules_disabled
and the hibernation interface, so please find a different way to solve the
problem (if there is any).
Thanks,
Rafael
> ---
> kernel/power/hibernate.c | 6 ++++++
> 1 files changed, 6 insertions(+), 0 deletions(-)
>
> diff --git a/kernel/power/hibernate.c b/kernel/power/hibernate.c
> index 1832bd2..1ac9eee 100644
> --- a/kernel/power/hibernate.c
> +++ b/kernel/power/hibernate.c
> @@ -328,6 +328,9 @@ int hibernation_snapshot(int platform_mode)
> {
> int error;
>
> + if (modules_disabled)
> + return -EPERM;
> +
> error = platform_begin(platform_mode);
> if (error)
> goto Close;
> @@ -385,6 +388,9 @@ static int resume_target_kernel(bool platform_mode)
> {
> int error;
>
> + if (modules_disabled)
> + return -EPERM;
> +
> error = dpm_suspend_noirq(PMSG_QUIESCE);
> if (error) {
> printk(KERN_ERR "PM: Some devices failed to power down, "
>
next prev parent reply other threads:[~2011-03-04 20:42 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-04 16:11 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 [this message]
2011-03-04 21:10 ` Vasiliy Kulikov
2011-03-04 21:21 ` Rafael J. Wysocki
2011-03-04 21:46 ` Vasiliy Kulikov
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=201103042142.09247.rjw@sisk.pl \
--to=rjw@sisk.pl \
--cc=len.brown@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@lists.linux-foundation.org \
--cc=pavel@ucw.cz \
--cc=security@kernel.org \
--cc=segoon@openwall.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
all inboxes | Powered by JetHome®