Re: Linux Security *Module* Framework (Was: LSM conversion to static interface)

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <linux-kernel@...>, <linux-security-module@...>
Date: Sunday, October 28, 2007 - 7:55 pm

On 10/29/07, Crispin Cowan <crispin@crispincowan.com> wrote:

LSM is providing bad security on two fronts.

Number 1 LSM are speeding effort to create features.  Apparmor and
Selinux both provide file access filtering from applications.  Yet
they double up the code to do it.   So they cannot be used with each
other without doubling up hooks.  Then other LSM are creating there
own sections of code to do the same thing.   Simple rule more code
more risk of bugs since it will be less audited.  Duplication defense
features is really bad for security.  Some how code sharing has to be
got into LSM construction.

Number 2 The critical bit LSM stop at the edges of applications.   Now
without overlapping my hooks with existing LSMs I cannot create
application level protections.  Overlapping hooks will cause speed
loss.

LSM is set to protect the application. But inside the application
there will be sections that need the access rights and others that
don't.  Now a exploit in any section of the application under LSM gets
the LSM assigned rights.   With application level this can be done a
few ways extension to elf that is create by the complier and api calls
lowering access functions of current thread or for a starting thread.
If you exploit a section of the code without access to disk network
access and so on and without the right to call any function that does
that.   What have you exploited.   Minor data damage compared to
complete data that the application have access to being stolen as what
is the case with LSM at moment.  Basically LSM prevent taking control
of the complete system but don't help to stop peoples private data
from being stolen.  Both are bad to happen to a person.

LSM design is there to help security development not get in its way or
to cause bitrot.  Currently LSM design is causing major risk bitrot in
duplicated code.

Reading and processing configuration files should be independent to
the protection methods.   Hopefully designed to be able to run user
mode to test if the new profile for a application is safe to add
before adding it to the OS.   Typo prevention on both sides.  Current
method of just sticking everything into one huge blob is preventing
code sharing and risking more security holes.

The current LSM design is bad on so many levels.  I am surprised that
it takes a Non PHD System Admin to see it.  Some how I think its a
empire thing.   If everything was just simple blocks a person could
write a new LSM in hours with pretty good security.  Compared to
todays long time trying effort.  Leads of Apparmor selinux and so on
not being prepared to give up there little empire for the greater
good.

I personally hate stacking as a idea.  I personally prefer two layers
only.  Config reading and  enforcement.   Of course that does not stop
applications being assigned to different config reading systems.
Depth the two layers should stay fixed even if you have many different
models in use.

All LSM seam to want to force System Admins to pick there LSM over
another.   Instead of being able to pick LSM for task at hand.   Same
with poor security being better than no security its true.  Its
nothing strange to find selinux based systems with there security
disabled because the Admin cannot configure it.   But the reverse is
also true that when you have skilled Admins stuck with a system like
Apparmor cannot harden the system as far as they could with selinux.
Both ways its causing security holes poor security when you should
have good security is bad too.  Part of the problem LSM maintainers
are not at the front lines is all I can guess.  Because they don't
seam to know what is really needed.

Peter Dolding
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: LSM conversion to static interface, Linus Torvalds, (Wed Oct 17, 10:18 pm)
Re: Re: LSM conversion to static interface, Crispin Cowan, (Sun Oct 21, 9:12 pm)
Re: LSM conversion to static interface, Andreas Gruenbacher, (Fri Oct 19, 4:26 pm)
Re: LSM conversion to static interface, James Morris, (Fri Oct 19, 5:07 pm)
Re: LSM conversion to static interface, Linus Torvalds, (Fri Oct 19, 4:40 pm)
Re: LSM conversion to static interface, Jan Engelhardt, (Sat Oct 20, 7:05 am)
Re: LSM conversion to static interface, James Morris, (Sat Oct 20, 6:57 pm)
Re: LSM conversion to static interface, Jan Engelhardt, (Tue Oct 23, 5:13 am)
Re: LSM conversion to static interface [revert patch], Arjan van de Ven, (Tue Oct 23, 12:09 am)
Re: LSM conversion to static interface [revert patch], James Morris, (Tue Oct 23, 12:56 am)
Re: LSM conversion to static interface [revert patch], Arjan van de Ven, (Tue Oct 23, 12:57 am)
Re: LSM conversion to static interface [revert patch], Chris Wright, (Tue Oct 23, 1:16 am)
Re: LSM conversion to static interface [revert patch], Jeremy Fitzhardinge, (Tue Oct 23, 8:31 pm)
Re: LSM conversion to static interface [revert patch], Arjan van de Ven, (Wed Oct 24, 1:06 am)
Re: eradicating out of tree modules, Tilman Schmidt, (Sun Oct 28, 2:51 pm)
Re: eradicating out of tree modules, Adrian Bunk, (Sun Oct 28, 3:25 pm)
Re: eradicating out of tree modules, Tilman Schmidt, (Mon Oct 29, 8:29 pm)
Re: eradicating out of tree modules, linux-os (Dick Johnson), (Tue Oct 30, 9:11 am)
Re: eradicating out of tree modules, Greg KH, (Tue Oct 30, 11:30 am)
Re: eradicating out of tree modules, Xavier Bestel, (Tue Oct 30, 9:19 am)
Re: eradicating out of tree modules, Stefan Richter, (Sun Oct 28, 5:25 am)
Re: eradicating out of tree modules, Tilman Schmidt, (Sun Oct 28, 8:01 am)
Re: eradicating out of tree modules, Stefan Richter, (Sun Oct 28, 10:37 am)
Re: eradicating out of tree modules, Tilman Schmidt, (Sun Oct 28, 12:55 pm)
Re: eradicating out of tree modules, Simon Arlott, (Sun Oct 28, 10:59 am)
Re: eradicating out of tree modules, Stefan Richter, (Sat Oct 27, 1:31 pm)
Re: Linux Security *Module* Framework (Was: LSM conversion t..., Toshiharu Harada, (Mon Oct 29, 11:23 pm)
Re: Linux Security *Module* Framework, Tilman Schmidt, (Sun Oct 28, 3:42 pm)
Re: Linux Security *Module* Framework, Jan Engelhardt, (Sun Oct 28, 4:46 pm)
Re: Linux Security *Module* Framework (Was: LSM conversion t..., Bernd Petrovitsch, (Thu Oct 25, 5:19 am)
Re: Linux Security *Module* Framework (Was: LSM conversion t..., Bernd Petrovitsch, (Tue Oct 30, 5:41 am)
Re: Linux Security *Module* Framework (Was: LSM conversion t..., Peter Dolding, (Sun Oct 28, 7:55 pm)
Re: Linux Security *Module* Framework (Was: LSM conversion t..., Toshiharu Harada, (Mon Oct 29, 11:37 pm)
Re: Linux Security *Module* Framework (Was: LSM conversion t..., Arjan van de Ven, (Wed Oct 24, 10:19 pm)
Re: LSM conversion to static interface [revert patch], Chris Wright, (Tue Oct 23, 8:32 pm)
Re: LSM conversion to static interface [revert patch], Jan Engelhardt, (Tue Oct 23, 5:10 am)
Re: LSM conversion to static interface [revert patch], Chris Wright, (Tue Oct 23, 5:13 am)
Re: LSM conversion to static interface [revert patch], Jan Engelhardt, (Tue Oct 23, 5:14 am)
Re: LSM conversion to static interface, Adrian Bunk, (Sun Oct 21, 6:59 pm)
Re: LSM conversion to static interface, Giacomo Catenazzi, (Tue Oct 23, 1:44 am)
Re: LSM conversion to static interface, Jan Engelhardt, (Tue Oct 23, 4:55 am)
Re: LSM conversion to static interface, Serge E. Hallyn, (Tue Oct 23, 11:20 am)
Re: LSM conversion to static interface, Jan Engelhardt, (Tue Oct 23, 11:28 am)
Re: LSM conversion to static interface, Serge E. Hallyn, (Tue Oct 23, 11:34 am)
Re: LSM conversion to static interface, Giacomo A. Catenazzi, (Tue Oct 23, 5:14 am)
Re: LSM conversion to static interface, Jan Engelhardt, (Tue Oct 23, 5:18 am)