Re: [PATCH] selinux: remove the SELinux lockdown implementation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Sep 30, 2021 at 4:32 AM Ondrej Mosnacek <omosnace@xxxxxxxxxx> wrote:
>
> On Wed, Sep 29, 2021 at 4:24 PM Paul Moore <paul@xxxxxxxxxxxxxx> wrote:
> > NOTE: This patch intentionally omits any "Fixes:" metadata or stable
> > tagging since it removes a SELinux access control check; while
> > removing the control point is the right thing to do moving forward,
> > removing it in stable kernels could be seen as a regression.
> >
> > The original SELinux lockdown implementation in 59438b46471a
> > ("security,lockdown,selinux: implement SELinux lockdown") used the
> > current task's credentials as both the subject and object in the
> > SELinux lockdown hook, selinux_lockdown().  Unfortunately that
> > proved to be incorrect in a number of cases as the core kernel was
> > calling the LSM lockdown hook in places where the credentials from
> > the "current" task_struct were not the correct credentials to use
> > in the SELinux access check.
> >
> > Attempts were made to resolve this by adding a credential pointer
> > to the LSM lockdown hook as well as suggesting that the single hook
> > be split into two: one for user tasks, one for kernel tasks; however
> > neither approach was deemed acceptable by Linus.  Faced with the
> > prospect of either changing the subj/obj in the access check to a
> > constant context (likely the kernel's label) or removing the SELinux
> > lockdown check entirely, the SELinux community decided that removing
> > the lockdown check was preferable.
> >
> > The supporting changes to the general LSM layer are left intact, this
> > patch only removes the SELinux implementation.
> >
> > Signed-off-by: Paul Moore <paul@xxxxxxxxxxxxxx>
>
> I would probably also remove LSM_AUDIT_DATA_LOCKDOWN, but I don't care
> enough to argue about it :)

As mentioned in the commit description, that was intentional.  I
wanted to keep the removal of the SELinux hook implementation separate
from any core LSM changes.

At some point in the future we can consider dropping the, rather
small, core LSM changes.  However it is my opinion that if we are
going to do that we should move the lockdown LSM functionality out of
the LSM and into the core kernel.  If Linus is effectively only going
to allow a single lockdown security model I feel the lockdown calls
shouldn't be part of the LSM.

Regardless, this patch is now merged into selinux/next.

-- 
paul moore
www.paul-moore.com



[Index of Archives]     [Selinux Refpolicy]     [Linux SGX]     [Fedora Users]     [Fedora Desktop]     [Yosemite Photos]     [Yosemite Camping]     [Yosemite Campsites]     [KDE Users]     [Gnome Users]

  Powered by Linux