[RFC v2 PATCH 1/2] security: introduce CONFIG_SECURITY_WRITABLE_HOOKS

2017-02-14 Thread James Morris
Subsequent patches will add RO hardening to LSM hooks, however, SELinux still needs to be able to perform runtime disablement after init to handle architectures where init-time disablement via boot parameters is not feasible. Introduce a new kernel configuration parameter CONFIG_SECURITY_WRITABLE_

Re: [RFC v2 PATCH 1/2] security: introduce CONFIG_SECURITY_WRITABLE_HOOKS

2017-02-14 Thread Tetsuo Handa
James Morris wrote: > > Loadable kernel modules used by antivirus software temporarily modify > > syscall tables > > ( > > http://stackoverflow.com/questions/13876369/system-call-interception-in-linux-kernel-module-kernel-3-5 > > ) > > in order to register hooks for execve()/open()/close(). It i

Re: [RFC v2 PATCH 1/2] security: introduce CONFIG_SECURITY_WRITABLE_HOOKS

2017-02-14 Thread James Morris
On Tue, 14 Feb 2017, Tetsuo Handa wrote: > > diff --git a/security/Kconfig b/security/Kconfig > > index 118f454..f6f90c4 100644 > > --- a/security/Kconfig > > +++ b/security/Kconfig > > @@ -31,6 +31,11 @@ config SECURITY > > > > If you are unsure how to answer this question, answer N. > >

Re: [RFC v2 PATCH 1/2] security: introduce CONFIG_SECURITY_WRITABLE_HOOKS

2017-02-15 Thread Tetsuo Handa
James Morris wrote: > On Tue, 14 Feb 2017, Tetsuo Handa wrote: > > > > diff --git a/security/Kconfig b/security/Kconfig > > > index 118f454..f6f90c4 100644 > > > --- a/security/Kconfig > > > +++ b/security/Kconfig > > > @@ -31,6 +31,11 @@ config SECURITY > > > > > > If you are unsure how to

Re: [RFC v2 PATCH 1/2] security: introduce CONFIG_SECURITY_WRITABLE_HOOKS

2017-02-15 Thread Casey Schaufler
On 2/15/2017 6:42 AM, Tetsuo Handa wrote: > James Morris wrote: >> On Tue, 14 Feb 2017, Tetsuo Handa wrote: >> diff --git a/security/Kconfig b/security/Kconfig index 118f454..f6f90c4 100644 --- a/security/Kconfig +++ b/security/Kconfig @@ -31,6 +31,11 @@ config SECURITY >>>

Re: [RFC v2 PATCH 1/2] security: introduce CONFIG_SECURITY_WRITABLE_HOOKS

2017-02-16 Thread Tetsuo Handa
Casey Schaufler wrote: > I can't say that I'm buying the value of the additional > complexity here. Sure, you're protecting part of the data > all the time, but you're exposing part all the time, too. Will you explain it in detail? As far as I know, __ro_after_init annotation makes the kernel to c

Re: [RFC v2 PATCH 1/2] security: introduce CONFIG_SECURITY_WRITABLE_HOOKS

2017-02-17 Thread Stephen Smalley
On Wed, 2017-02-15 at 00:17 +1100, James Morris wrote: > Subsequent patches will add RO hardening to LSM hooks, however, > SELinux > still needs to be able to perform runtime disablement after init to > handle > architectures where init-time disablement via boot parameters is not > feasible. > > I

Re: [kernel-hardening] Re: [RFC v2 PATCH 1/2] security: introduce CONFIG_SECURITY_WRITABLE_HOOKS

2017-02-16 Thread Casey Schaufler
On 2/16/2017 3:00 AM, Tetsuo Handa wrote: > Casey Schaufler wrote: >> I can't say that I'm buying the value of the additional >> complexity here. Sure, you're protecting part of the data >> all the time, but you're exposing part all the time, too. > Will you explain it in detail? As far as I know,

Re: [kernel-hardening] Re: [RFC v2 PATCH 1/2] security: introduce CONFIG_SECURITY_WRITABLE_HOOKS

2017-02-16 Thread Daniel Micay
> >  At least one antivirus software (which allows > > anonymous download of LKM source code) is using LSM hooks since > > Linux 2.6.32 > > instead of rewriting syscall tables. We are already allowing > > multiple concurrent > > LSM modules (up to one fully armored module which uses "struct > > cre

Re: [kernel-hardening] Re: [RFC v2 PATCH 1/2] security: introduce CONFIG_SECURITY_WRITABLE_HOOKS

2017-02-17 Thread Tetsuo Handa
Casey Schaufler wrote: > On 2/16/2017 3:00 AM, Tetsuo Handa wrote: > > Casey Schaufler wrote: > >> I can't say that I'm buying the value of the additional > >> complexity here. Sure, you're protecting part of the data > >> all the time, but you're exposing part all the time, too. > > Will you expla

Re: [kernel-hardening] Re: [RFC v2 PATCH 1/2] security: introduce CONFIG_SECURITY_WRITABLE_HOOKS

2017-02-17 Thread Casey Schaufler
On 2/17/2017 7:05 AM, Tetsuo Handa wrote: > Casey Schaufler wrote: >> On 2/16/2017 3:00 AM, Tetsuo Handa wrote: >>> Casey Schaufler wrote: I can't say that I'm buying the value of the additional complexity here. Sure, you're protecting part of the data all the time, but you're exposi