[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LRH.2.21.1905030653480.32502@namei.org>
Date: Fri, 3 May 2019 07:07:15 +1000 (AEST)
From: James Morris <jmorris@...ei.org>
To: Matthew Garrett <mjg59@...gle.com>
cc: LSM List <linux-security-module@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
David Howells <dhowells@...hat.com>,
Linux API <linux-api@...r.kernel.org>,
Andy Lutomirski <luto@...nel.org>
Subject: Re: [PATCH V32 01/27] Add the ability to lock down access to the
running kernel image
On Mon, 29 Apr 2019, Matthew Garrett wrote:
> Hi James,
>
> What's the best way forward with this? I'm still not entirely clear on
> how it can be implemented purely as an LSM, but if you have ideas on
> what sort of implementation you'd prefer I'm happy to work on that.
It can't be implemented purely as an LSM.
The concerns I have are:
o Mixing of mechanism and policy (they are hardcoded together)
o Too-coarse policy (all or nothing, which will lead many to choose
nothing)
o Lack of integration with LSM
o Completeness
o Maintenance (including adding new lockdowns without breaking existing
userspace)
One possible direction is to (as previously mentioned) assign IDs to each
callsite and be able to check this ID against a simple policy array
(allow/deny). The default policy choices could be reduced to 'all' or
'none' during kconfig, and allow a custom policy to be loaded later if
desired.
Within the policy check hook, we could add a new LSM hook, which would
allow an LSM to restrictively override the lockdown policy with its own
(so e.g. SELinux could utilize the context of the current process to
determine if a lockdown feature should be enforced).
This doesn't really address the completeness / maintenance issue (i.e. "do
we have everything covered and how do we ensure this on an ongoing
basis?", and "what will this new lockdown feature break?"), although it
should make it easier to add new lockdown callsites as they don't have to
be enabled by the user.
Thoughts?
--
James Morris
<jmorris@...ei.org>
Powered by blists - more mailing lists