[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <15833.1551974371@warthog.procyon.org.uk>
Date: Thu, 07 Mar 2019 15:59:31 +0000
From: David Howells <dhowells@...hat.com>
To: Matthew Garrett <matthewgarrett@...gle.com>
Cc: dhowells@...hat.com, jmorris@...ei.org,
linux-security-module@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 02/27] Add a SysRq option to lift kernel lockdown
Matthew Garrett <matthewgarrett@...gle.com> wrote:
> + /* Ban synthetic events from some sysrq functionality */
> + if ((from == SYSRQ_FROM_PROC || from == SYSRQ_FROM_SYNTHETIC) &&
> + op_p->enable_mask & SYSRQ_DISABLE_USERSPACE)
> + printk("This sysrq operation is disabled from userspace.\n");
> /*
> * Should we check for enabled operations (/proc/sysrq-trigger
> * should not) and is the invoked operation enabled?
> */
> - if (!check_mask || sysrq_on_mask(op_p->enable_mask)) {
> + if (from == SYSRQ_FROM_KERNEL || sysrq_on_mask(op_p->enable_mask)) {
There's some missing logic here. Probably an else is missing, but it seems
more than that.
David
Powered by blists - more mailing lists