Re: [PATCH 16/18] LSM: Allow arbitrary LSM ordering

2018-09-17 Thread John Johansen
On 09/17/2018 05:45 PM, Kees Cook wrote: > On Mon, Sep 17, 2018 at 5:24 PM, Casey Schaufler > wrote: >> On 9/17/2018 5:00 PM, Kees Cook wrote: >>> The legacy per-LSM >>> enable/disable ordering is the same, but ordering between >>> lsm.enable/disable and the per-LSM options is NOT ordered. i.e. t

Re: [PATCH 16/18] LSM: Allow arbitrary LSM ordering

2018-09-17 Thread Kees Cook
On Mon, Sep 17, 2018 at 5:57 PM, Casey Schaufler wrote: > If I read you correctly, "first exclusive" would suit my needs just fine. > I like the notion of build time ordering because I hate using the boot > command line. Okay, excellent. I think I have enough for a v2 on this. I'll crank it out..

Re: [PATCH 16/18] LSM: Allow arbitrary LSM ordering

2018-09-17 Thread Casey Schaufler
On 9/17/2018 5:45 PM, Kees Cook wrote: > On Mon, Sep 17, 2018 at 5:24 PM, Casey Schaufler > wrote: >> On 9/17/2018 5:00 PM, Kees Cook wrote: >>> The legacy per-LSM >>> enable/disable ordering is the same, but ordering between >>> lsm.enable/disable and the per-LSM options is NOT ordered. i.e. the

Re: [PATCH 16/18] LSM: Allow arbitrary LSM ordering

2018-09-17 Thread Kees Cook
On Mon, Sep 17, 2018 at 5:24 PM, Casey Schaufler wrote: > On 9/17/2018 5:00 PM, Kees Cook wrote: >> The legacy per-LSM >> enable/disable ordering is the same, but ordering between >> lsm.enable/disable and the per-LSM options is NOT ordered. i.e. the >> precedent mentioned in the prior paragraph.

Re: [PATCH 16/18] LSM: Allow arbitrary LSM ordering

2018-09-17 Thread Casey Schaufler
On 9/17/2018 5:00 PM, Kees Cook wrote: > On Mon, Sep 17, 2018 at 3:36 PM, John Johansen > wrote: >> On 09/17/2018 02:57 PM, Casey Schaufler wrote: >>> Modules not listed may go anywhere there is a "*" in the order. >>> An lsm.order= without a "*" is an error, and ignored. >>> If a module is specif

Re: [PATCH 16/18] LSM: Allow arbitrary LSM ordering

2018-09-17 Thread Casey Schaufler
On 9/17/2018 4:47 PM, Mickaël Salaün wrote: > On 9/18/18 01:30, Casey Schaufler wrote: >> On 9/17/2018 4:20 PM, Kees Cook wrote: >>> On Mon, Sep 17, 2018 at 4:10 PM, Mickaël Salaün wrote: Landlock, because it target unprivileged users, should only be called after all other major (access-

Re: [PATCH 16/18] LSM: Allow arbitrary LSM ordering

2018-09-17 Thread Kees Cook
On Mon, Sep 17, 2018 at 3:36 PM, John Johansen wrote: > On 09/17/2018 02:57 PM, Casey Schaufler wrote: >> Modules not listed may go anywhere there is a "*" in the order. >> An lsm.order= without a "*" is an error, and ignored. >> If a module is specified in lsm.order but not built in it is ignored

Re: [PATCH 16/18] LSM: Allow arbitrary LSM ordering

2018-09-17 Thread Mickaël Salaün
On 9/18/18 01:30, Casey Schaufler wrote: > On 9/17/2018 4:20 PM, Kees Cook wrote: >> On Mon, Sep 17, 2018 at 4:10 PM, Mickaël Salaün wrote: >>> Landlock, because it target unprivileged users, should only be called >>> after all other major (access-control) LSMs. The admin or distro must >>> not b

Re: [PATCH 16/18] LSM: Allow arbitrary LSM ordering

2018-09-17 Thread Casey Schaufler
On 9/17/2018 4:28 PM, Kees Cook wrote: > On Mon, Sep 17, 2018 at 4:26 PM, John Johansen > wrote: >> On 09/17/2018 04:20 PM, Kees Cook wrote: >>> On Mon, Sep 17, 2018 at 4:10 PM, Mickaël Salaün wrote: Landlock, because it target unprivileged users, should only be called after all other m

Re: [PATCH 16/18] LSM: Allow arbitrary LSM ordering

2018-09-17 Thread Casey Schaufler
On 9/17/2018 4:20 PM, Kees Cook wrote: > On Mon, Sep 17, 2018 at 4:10 PM, Mickaël Salaün wrote: >> Landlock, because it target unprivileged users, should only be called >> after all other major (access-control) LSMs. The admin or distro must >> not be able to change that order in any way. This con

Re: [PATCH 16/18] LSM: Allow arbitrary LSM ordering

2018-09-17 Thread Kees Cook
On Mon, Sep 17, 2018 at 4:26 PM, John Johansen wrote: > On 09/17/2018 04:20 PM, Kees Cook wrote: >> On Mon, Sep 17, 2018 at 4:10 PM, Mickaël Salaün wrote: >>> Landlock, because it target unprivileged users, should only be called >>> after all other major (access-control) LSMs. The admin or distro

Re: [PATCH 16/18] LSM: Allow arbitrary LSM ordering

2018-09-17 Thread John Johansen
On 09/17/2018 04:20 PM, Kees Cook wrote: > On Mon, Sep 17, 2018 at 4:10 PM, Mickaël Salaün wrote: >> Landlock, because it target unprivileged users, should only be called >> after all other major (access-control) LSMs. The admin or distro must >> not be able to change that order in any way. This c

Re: [PATCH 16/18] LSM: Allow arbitrary LSM ordering

2018-09-17 Thread Casey Schaufler
On 9/17/2018 3:36 PM, John Johansen wrote: > On 09/17/2018 02:57 PM, Casey Schaufler wrote: >> On 9/17/2018 12:55 PM, John Johansen wrote: >>> On 09/17/2018 12:23 PM, Casey Schaufler wrote: On 9/17/2018 11:14 AM, Kees Cook wrote: >> Keep security=$lsm with the existing exclusive behavior.

Re: [PATCH 16/18] LSM: Allow arbitrary LSM ordering

2018-09-17 Thread John Johansen
On 09/17/2018 04:10 PM, Mickaël Salaün wrote: > << snip >> > If "lsm.enable=apparmor lsm.disable=apparmor" is specified the last value > specified is used giving "lsm.disable=apparmor". > makes sense >>> >>> The rules for modification are pretty obvious. The downside is, as >>>

Re: [PATCH 16/18] LSM: Allow arbitrary LSM ordering

2018-09-17 Thread Kees Cook
On Mon, Sep 17, 2018 at 4:10 PM, Mickaël Salaün wrote: > Landlock, because it target unprivileged users, should only be called > after all other major (access-control) LSMs. The admin or distro must > not be able to change that order in any way. This constraint doesn't > apply to current LSMs, tho

Re: [PATCH 16/18] LSM: Allow arbitrary LSM ordering

2018-09-17 Thread Mickaël Salaün
On 9/18/18 00:36, John Johansen wrote: > On 09/17/2018 02:57 PM, Casey Schaufler wrote: >> On 9/17/2018 12:55 PM, John Johansen wrote: >>> On 09/17/2018 12:23 PM, Casey Schaufler wrote: On 9/17/2018 11:14 AM, Kees Cook wrote: >> Keep security=$lsm with the existing exclusive behavior. >>>

Re: [PATCH 16/18] LSM: Allow arbitrary LSM ordering

2018-09-17 Thread John Johansen
On 09/17/2018 02:57 PM, Casey Schaufler wrote: > On 9/17/2018 12:55 PM, John Johansen wrote: >> On 09/17/2018 12:23 PM, Casey Schaufler wrote: >>> On 9/17/2018 11:14 AM, Kees Cook wrote: > Keep security=$lsm with the existing exclusive behavior. > Add lsm=$lsm1,...,$lsmN which requires a fu

Re: [PATCH 16/18] LSM: Allow arbitrary LSM ordering

2018-09-17 Thread Casey Schaufler
On 9/17/2018 12:55 PM, John Johansen wrote: > On 09/17/2018 12:23 PM, Casey Schaufler wrote: >> On 9/17/2018 11:14 AM, Kees Cook wrote: Keep security=$lsm with the existing exclusive behavior. Add lsm=$lsm1,...,$lsmN which requires a full list of modules If you want to be fancy

Re: [PATCH 16/18] LSM: Allow arbitrary LSM ordering

2018-09-17 Thread John Johansen
On 09/17/2018 12:23 PM, Casey Schaufler wrote: > On 9/17/2018 11:14 AM, Kees Cook wrote: >> >>> Keep security=$lsm with the existing exclusive behavior. >>> Add lsm=$lsm1,...,$lsmN which requires a full list of modules >>> >>> If you want to be fancy (I don't!) you could add >>> >>> lsm.add=$lsm1,.

Re: [PATCH 16/18] LSM: Allow arbitrary LSM ordering

2018-09-17 Thread John Johansen
On 09/17/2018 11:14 AM, Kees Cook wrote: > On Mon, Sep 17, 2018 at 10:13 AM, Casey Schaufler > wrote: >> TOMOYO uses the cred blob pointer. When the blob is shared TOMOYO >> has to be allocated a pointer size chunk to store the pointer in. >> Smack has the same behavior on file blobs. > > Oh dang

Re: [PATCH 16/18] LSM: Allow arbitrary LSM ordering

2018-09-17 Thread Casey Schaufler
On 9/17/2018 11:14 AM, Kees Cook wrote: > >> Keep security=$lsm with the existing exclusive behavior. >> Add lsm=$lsm1,...,$lsmN which requires a full list of modules >> >> If you want to be fancy (I don't!) you could add >> >> lsm.add=$lsm1,...,$lsmN which adds the modules to the stack >> lsm.dele

Re: [PATCH 16/18] LSM: Allow arbitrary LSM ordering

2018-09-17 Thread Kees Cook
On Mon, Sep 17, 2018 at 10:13 AM, Casey Schaufler wrote: > TOMOYO uses the cred blob pointer. When the blob is shared TOMOYO > has to be allocated a pointer size chunk to store the pointer in. > Smack has the same behavior on file blobs. Oh dang, yes, I got confused over secid and other "extreme"

Re: [PATCH 16/18] LSM: Allow arbitrary LSM ordering

2018-09-17 Thread Casey Schaufler
On 9/17/2018 9:24 AM, Kees Cook wrote: > On Mon, Sep 17, 2018 at 8:06 AM, Casey Schaufler > wrote: >>> The trailing comma thing gets us some compatibility, but we still have >>> to decide which things should be exclusive-via-"security=" since with >>> blob-sharing it already becomes possible to d

Re: [PATCH 16/18] LSM: Allow arbitrary LSM ordering

2018-09-17 Thread Kees Cook
On Mon, Sep 17, 2018 at 8:06 AM, Casey Schaufler wrote: >> The trailing comma thing gets us some compatibility, but we still have >> to decide which things should be exclusive-via-"security=" since with >> blob-sharing it already becomes possible to do selinux + tomoyo. >> >> The -$lsm style may m

Re: [PATCH 16/18] LSM: Allow arbitrary LSM ordering

2018-09-17 Thread Casey Schaufler
On 9/16/2018 4:00 PM, Kees Cook wrote: > On Sun, Sep 16, 2018 at 11:49 AM, Casey Schaufler > wrote: >> On 9/15/2018 5:30 PM, Kees Cook wrote: >>> To prepare for having a third type of LSM ("shared blob"), this implements >>> dynamic handling of LSM ordering. The visible change here is that the >>>

Re: [PATCH 16/18] LSM: Allow arbitrary LSM ordering

2018-09-16 Thread Tetsuo Handa
On 2018/09/17 8:00, Kees Cook wrote: > On Sun, Sep 16, 2018 at 11:49 AM, Casey Schaufler > wrote: >> One solution is to leave security= as is, not affecting "minor" >> modules and only allowing specification of one major module, and adding > > I would much prefer this, yes. > > A question remain

Re: [PATCH 16/18] LSM: Allow arbitrary LSM ordering

2018-09-16 Thread Kees Cook
On Sun, Sep 16, 2018 at 11:49 AM, Casey Schaufler wrote: > On 9/15/2018 5:30 PM, Kees Cook wrote: >> To prepare for having a third type of LSM ("shared blob"), this implements >> dynamic handling of LSM ordering. The visible change here is that the >> "security=" boot commandline is now a comma-se

Re: [PATCH 16/18] LSM: Allow arbitrary LSM ordering

2018-09-16 Thread Casey Schaufler
On 9/15/2018 5:30 PM, Kees Cook wrote: > To prepare for having a third type of LSM ("shared blob"), this implements > dynamic handling of LSM ordering. The visible change here is that the > "security=" boot commandline is now a comma-separated ordered list of > all LSMs, not just the single "exclus

[PATCH 16/18] LSM: Allow arbitrary LSM ordering

2018-09-15 Thread Kees Cook
To prepare for having a third type of LSM ("shared blob"), this implements dynamic handling of LSM ordering. The visible change here is that the "security=" boot commandline is now a comma-separated ordered list of all LSMs, not just the single "exclusive" LSM. This means that the "minor" LSMs can