Re: [PATCH v12 0/9] LSM: Multiple concurrent LSMs

From: Eric W. Biederman
Date: Fri Jan 11 2013 - 14:35:11 EST


Casey Schaufler <casey@xxxxxxxxxxxxxxxx> writes:

>> When a distro is run in a container it is desirable to be able to run
>> the distro's security policy in that container. Ideally this will get
>> addressed by being able to do some level of per user namespace stacking.
>> Say selinux outside and apparmor inside a container.
>>
>> I think this would take a little more work than what Casey has currently
>> devised but I am hopeful an additional layer of stacking can be added
>> after Casey has merged the basic layer of stacking.
>
> Would that be per-container LSM lists? I hadn't thought about
> doing that, and don't know how you might implement it, but I
> suppose it could work.

Essentially per-container LSM lists. The semantics would be that
first you perform the global LSM list checks, and then you perform
the container LSM list checks (with additional layers if containers are
nested). For LSM modules that depend on security labels I think there
would be a conflict that would prevent nesting.

This is already implemented for capabilities. Something is already
happening with apparmor.

In practice it may just be a matter of getting the LSMs to be aware of
the containers rather than having per container LSM lists. Especially
as all of the hooks are called every time for every LSM.

The important part is that the effect be nested policy. Having nested calls
is likely to be unnecessary and inefficient if there is much nesting of
containers going on.

Eric

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/