Message ID | d15ee1ccfb91bda67d248b3ec70f0475@paul-moore.com (mailing list archive) |
---|---|
State | Accepted |
Delegated to: | Paul Moore |
Headers | show |
Series | [GIT,PULL] lsm/lsm-pr-20240911 | expand |
On 2024/09/13 10:29, Paul Moore wrote: > Linus, > > We've got a reasonably large pull request for the LSM framework this > time (at least it's large for us), here are the highlights: > > * Move the LSM framework to static calls > > Based on some of our exchanges over the summer, it sounds like you > are already familiar with the effort to convert the LSM callbacks > from function pointers to static calls. This pull request includes > that work and transitions the vast majority of the LSM callbacks into > static calls. Those callbacks which haven't been converted were > left as-is due to the general ugliness of the changes required to > support the static call conversion; we can revisit those callbacks > at a future date. > > It is worth mentioning that Tetsuo Handa is opposed to the static call > patches, some even carry his NACK, as they make it more difficult to > dynamically load out-of-tree LSMs, or unsupported LSMs on distro kernels. > Many of us have tried to explain that out-of-tree LSMs are not a > concern for the upstream LSM framework, or the Linux kernel in general, > and that decisions around what LSMs are enabled in distro kernels is > a distro issue, not an upstream issue, but unfortunately Tetsuo > continues to disregard these arguments. No, this is not only a distro issue but also an upstream issue! Because the upstream cannot afford accepting whatever proposed LSMs ( https://lkml.kernel.org/r/8ac2731c-a1db-df7b-3690-dac2b371e431@I-love.SAKURA.ne.jp ). That is, out-of-tree LSMs cannot become in-tree and obtain stable LSM ID is partially due to upstream (e.g. out of resources for review, or failure to pass patent examination because upstream does not think it adds a new value). Making out-of-tree (or in-tree but not built-in) LSMs harder to use is a penalty imposed by "Permanent members are exercising veto". At least, assigning stable LSM ID to whatever proposed LSM has absolutely zero cost. Current policy is a clear intention to lock out out-of-tree LSMs. If you say "I don't have intention to lock out out-of-tree LSMs", please don't go with just NACK added.
On Fri, Sep 13, 2024 at 8:28 AM Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp> wrote: > On 2024/09/13 10:29, Paul Moore wrote: > > Linus, > > > > We've got a reasonably large pull request for the LSM framework this > > time (at least it's large for us), here are the highlights: > > > > * Move the LSM framework to static calls > > > > Based on some of our exchanges over the summer, it sounds like you > > are already familiar with the effort to convert the LSM callbacks > > from function pointers to static calls. This pull request includes > > that work and transitions the vast majority of the LSM callbacks into > > static calls. Those callbacks which haven't been converted were > > left as-is due to the general ugliness of the changes required to > > support the static call conversion; we can revisit those callbacks > > at a future date. > > > > It is worth mentioning that Tetsuo Handa is opposed to the static call > > patches, some even carry his NACK, as they make it more difficult to > > dynamically load out-of-tree LSMs, or unsupported LSMs on distro kernels. > > Many of us have tried to explain that out-of-tree LSMs are not a > > concern for the upstream LSM framework, or the Linux kernel in general, > > and that decisions around what LSMs are enabled in distro kernels is > > a distro issue, not an upstream issue, but unfortunately Tetsuo > > continues to disregard these arguments. > > No, this is not only a distro issue but also an upstream issue! > Because the upstream cannot afford accepting whatever proposed LSMs > ( https://lkml.kernel.org/r/8ac2731c-a1db-df7b-3690-dac2b371e431@I-love.SAKURA.ne.jp ). I find it somewhat amusing that you are complaining about the LSM framework not accepting new LSMs in the same pull request where we are adding a new LSM (IPE). As a reminder, we have documented guidelines regarding the addition of new LSMs: https://github.com/LinuxSecurityModule/kernel/blob/main/README.md ... these guidelines were discussed quite a bit on-list some time ago, and are essentially the same undocumented guidelines the LSM framework has been following for quite some time now (I will admit the doc and testing bullet points are likely new). [SIDE NOTE: Eventually this doc will move over into the kernel tree, but I still consider it too much of a work-in-progress/draft to merge into mainline. We probably also need to do a bit of tidying up in the kernel doc area relating to LSMs.] > That is, out-of-tree LSMs cannot become in-tree and obtain stable LSM ID ... We've discussed this many times before, obtaining stable magic numbers (e.g. syscall numbers, LSM IDs, etc.) isn't possible until the associated code appears in a tagged released from Linus' tree. Of course there are workarounds which we've discussed, and Kees even put together a toy LSM demonstrating these workarounds. You've heard my stance on this several times in the past, but I'll repeat myself one more time for the sake of the wider audience. My focus is on the upstream Linux kernel and ensuring that the upstream, in-tree LSMs have the best framework possible to ensure their proper operation and ease of development/maintenance. While I have no intention to negatively impact out-of-tree LSMs, I will not harm the upstream code base solely to support out-of-tree LSMs. Further, if improvements to the upstream LSM framework are determined to harm out-of-tree LSMs, that shall be no reason to reject the upstream improvements. I believe this policy is not only consistent with that of previous LSM maintainers, but of the general Linux kernel as well.
On 2024/09/14 0:28, Paul Moore wrote: > I find it somewhat amusing that you are complaining about the LSM > framework not accepting new LSMs in the same pull request where we are > adding a new LSM (IPE). As a reminder, we have documented guidelines > regarding the addition of new LSMs: > > https://github.com/LinuxSecurityModule/kernel/blob/main/README.md (...snipped...) > While I have no intention to negatively impact out-of-tree LSMs, What I call "patent examination" is "New LSM Guidelines" section within that link. That section includes "here are a list of requirements for new LSM submissions:" and "The new LSM must be sufficiently unique", and out-of-tree LSMs which cannot satisfy it won't be able to become in-tree. If we apply this requirement to userspace program, this requirement means you are declaring that "postfix" (or anything except "sendmail") cannot become in-tree because "sendmail" is already in-tree. This is a clear intention of negatively impact out-of-tree LSMs. People have the right to use whatever subsets/alternatives. Even if a new LSM has were completely a subset of existing in-tree LSMs, people have the right to use such LSM. While I consider that some of out-of-tree LSMs being unable to become in-tree is inevitable, the requirement that any LSM has to be built-in is a barrier for LSMs which cannot be built-in. The "static call" changes in this pull request is saying something like "any kernel code has to be built into vmlinux, for CONFIG_MODULES=y is harmful", similar to "any software which is not included in this distribution must not be run, for software which is not included in this distribution is harmful". People have the right to install whatever userspace software / kernel modules they need. Making it difficult to use userspace software / kernel modules which the in-tree and built-in kernel code cannot provide is an abuse of dominant position, as well as removing CONFIG_MODULES=y support from the kernel. > My focus is on the upstream Linux kernel and ensuring that the upstream, > in-tree LSMs have the best framework possible to ensure their proper > operation and ease of development/maintenance. While I have no > intention to negatively impact out-of-tree LSMs, I will not harm the > upstream code base solely to support out-of-tree LSMs. Further, if > improvements to the upstream LSM framework are determined to harm > out-of-tree LSMs, that shall be no reason to reject the upstream > improvements. I have been asking you for a solution for "in-tree but not built-in" LSM (namely TOMOYO). You are refusing to provide a solution for the sake of "in-tree and built-in" LSMs. The "static call" changes fails to ensure that the upstream, in-tree TOMOYO to have the best framework. The "static call" changes makes the upstream, in-tree TOMOYO to have a worse framework than now. I'm not against "static call" changes itself as long as "in-tree but not built-in" LSMs can remain as easily usable as now. https://lkml.kernel.org/r/caafb609-8bef-4840-a080-81537356fc60@I-love.SAKURA.ne.jp is a recovery for avoid having worse framework than now. > We've discussed this many times before, obtaining stable magic numbers > (e.g. syscall numbers, LSM IDs, etc.) isn't possible until the > associated code appears in a tagged released from Linus' tree. Think about a hardware device. A stable device ID (e.g. PCI device ID) is assigned as soon as a new hardware device is developed; whether a device driver for Windows, Linux, MacOS are provided by upstream OS manufactures is irrelevant. Stable LSM ID has to be a property of any LSM. Not allowing out-of-tree LSMs to have stable LSM ID makes it difficult to use userspace software which depends on LSM ID. Again, this is an abuse of dominant position. > I believe this policy is not only consistent with that > of previous LSM maintainers, but of the general Linux kernel as well. The Linux kernel is a servant for users and userspace programs. Your policy is based on "benefits for in-tree and built-in Linux kernel code". Your policy lacks "benefits for users and userspace programs".
On Sun, Sep 15, 2024 at 8:38 PM Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp> wrote: > On 2024/09/14 0:28, Paul Moore wrote: > > I find it somewhat amusing that you are complaining about the LSM > > framework not accepting new LSMs in the same pull request where we are > > adding a new LSM (IPE). As a reminder, we have documented guidelines > > regarding the addition of new LSMs: > > > > https://github.com/LinuxSecurityModule/kernel/blob/main/README.md > (...snipped...) > > While I have no intention to negatively impact out-of-tree LSMs, > > What I call "patent examination" is "New LSM Guidelines" section within > that link. That section includes "here are a list of requirements for > new LSM submissions:" and "The new LSM must be sufficiently unique", and > out-of-tree LSMs which cannot satisfy it won't be able to become in-tree. > If we apply this requirement to userspace program, this requirement means > you are declaring that "postfix" (or anything except "sendmail") cannot > become in-tree because "sendmail" is already in-tree. This is a clear > intention of negatively impact out-of-tree LSMs. People have the right to > use whatever subsets/alternatives. Even if a new LSM has were completely a > subset of existing in-tree LSMs, people have the right to use such LSM. Comparing userspace applications to kernel code isn't a fair comparison as a userspace application can generally be added without impacting the other applications on the system. > While I consider that some of out-of-tree LSMs being unable to become in-tree > is inevitable, the requirement that any LSM has to be built-in is a barrier > for LSMs which cannot be built-in. Anyone is always free to build their own kernel with whatever code changes they like, this is the beauty of the kernel source being available and licensed as Open Source. You are free to build a kernel with whatever LSM you like included and enabled. You have been shown examples on how to do this in previous threads. > People have the right to install whatever userspace software / kernel modules > they need. Anyone is free to build their own kernel with whatever LSMs they want, either in-tree or out-of-tree; the static call changes do not prevent that. > > My focus is on the upstream Linux kernel and ensuring that the upstream, > > in-tree LSMs have the best framework possible to ensure their proper > > operation and ease of development/maintenance. While I have no > > intention to negatively impact out-of-tree LSMs, I will not harm the > > upstream code base solely to support out-of-tree LSMs. Further, if > > improvements to the upstream LSM framework are determined to harm > > out-of-tree LSMs, that shall be no reason to reject the upstream > > improvements. > > I have been asking you for a solution for "in-tree but not built-in" LSM > (namely TOMOYO). You are refusing to provide a solution for the sake of > "in-tree and built-in" LSMs. The "static call" changes fails to ensure that > the upstream, in-tree TOMOYO to have the best framework. The "static call" > changes makes the upstream, in-tree TOMOYO to have a worse framework than > now. As mentioned so many times before, the "in-tree but not built-in" LSM problem is entirely a distribution/binary-kernel problem. The upstream kernel community is not responsible for the choices and individual build configurations of the different Linux distros. Support for mechanisms which allow for dynamic LSMs in pre-built distro kernels is something we could consider, but so far everything that has been proposed has had a negative impact on the upstream kernel sources and has been rejected as a result.
The pull request you sent on Thu, 12 Sep 2024 21:29:54 -0400:
> https://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/lsm.git tags/lsm-pr-20240911
has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/a430d95c5efa2b545d26a094eb5f624e36732af0
Thank you!
On Mon, Sep 16, 2024 at 04:08:11AM -0400, Paul Moore wrote: Good morning, I hope the end of the week is going well for everyone. > On Sun, Sep 15, 2024 at 8:38???PM Tetsuo Handa > <penguin-kernel@i-love.sakura.ne.jp> wrote: > > On 2024/09/14 0:28, Paul Moore wrote: > > > I find it somewhat amusing that you are complaining about the LSM > > > framework not accepting new LSMs in the same pull request where we are > > > adding a new LSM (IPE). As a reminder, we have documented guidelines > > > regarding the addition of new LSMs: > > > > > > https://github.com/LinuxSecurityModule/kernel/blob/main/README.md > > (...snipped...) > > > While I have no intention to negatively impact out-of-tree LSMs, > > > > What I call "patent examination" is "New LSM Guidelines" section within > > that link. That section includes "here are a list of requirements for > > new LSM submissions:" and "The new LSM must be sufficiently unique", and > > out-of-tree LSMs which cannot satisfy it won't be able to become in-tree. > > If we apply this requirement to userspace program, this requirement means > > you are declaring that "postfix" (or anything except "sendmail") cannot > > become in-tree because "sendmail" is already in-tree. This is a clear > > intention of negatively impact out-of-tree LSMs. People have the right to > > use whatever subsets/alternatives. Even if a new LSM has were completely a > > subset of existing in-tree LSMs, people have the right to use such LSM. > Comparing userspace applications to kernel code isn't a fair > comparison as a userspace application can generally be added without > impacting the other applications on the system. Tetsuo's comparison may be a bit strained, but it remains relevant. Linux was founded on a concept of choice, the current LSM architecture struggles with the ability to facilitate generalized choice and flexibility. > > While I consider that some of out-of-tree LSMs being unable to > > become in-tree is inevitable, the requirement that any LSM has to > > be built-in is a barrier for LSMs which cannot be built-in. > Anyone is always free to build their own kernel with whatever code > changes they like, this is the beauty of the kernel source being > available and licensed as Open Source. You are free to build a > kernel with whatever LSM you like included and enabled. You have > been shown examples on how to do this in previous threads. > > People have the right to install whatever userspace software / > > kernel modules they need. > Anyone is free to build their own kernel with whatever LSMs they want, > either in-tree or out-of-tree; the static call changes do not prevent > that. This line of reasoning represents a bit of an indulgence in a false binary logic fallacy. Anyone reading this forum is certainly capable of building a kernel in any configuration they want to. That being said, the general Linux technical community now represents a cohort far larger than individuals who have the ability to build and platform a kernel of their choosing. From a security perspective, Linux will benefit from providing a better means to serve a middle ground where alternate security models and architectures can be implemented without building a kernel from scratch. > > > My focus is on the upstream Linux kernel and ensuring that the upstream, > > > in-tree LSMs have the best framework possible to ensure their proper > > > operation and ease of development/maintenance. While I have no > > > intention to negatively impact out-of-tree LSMs, I will not harm the > > > upstream code base solely to support out-of-tree LSMs. Further, if > > > improvements to the upstream LSM framework are determined to harm > > > out-of-tree LSMs, that shall be no reason to reject the upstream > > > improvements. > > > > I have been asking you for a solution for "in-tree but not built-in" LSM > > (namely TOMOYO). You are refusing to provide a solution for the sake of > > "in-tree and built-in" LSMs. The "static call" changes fails to ensure that > > the upstream, in-tree TOMOYO to have the best framework. The "static call" > > changes makes the upstream, in-tree TOMOYO to have a worse framework than > > now. > As mentioned so many times before, the "in-tree but not built-in" > LSM problem is entirely a distribution/binary-kernel problem. The > upstream kernel community is not responsible for the choices and > individual build configurations of the different Linux distros. > Support for mechanisms which allow for dynamic LSMs in pre-built > distro kernels is something we could consider, but so far everything > that has been proposed has had a negative impact on the upstream > kernel sources and has been rejected as a result. Not everything. As of the TSEM V4 release, which is now a month old, we have proposed a middle ground that provides multiple mechanisms for the mainsteam kernel to support alternate security models in an orthogonal manner, but it has struggled to receive any significant review. The V4 release now includes the ability to use loadable modules to implement customized security models. The premise for this support is to replace the need for a dynamic LSM with an LSM that has dynamic configurability. Bandwidth is always in short supply, but some internal investigation by our team has demonstrated that the TSEM architecture can implement Tomoyo as a loadable security model. TSEM also provides a framework for servicing the needs of Endpoint Detection and Response systems without having to write any kernel code at all. This same mechanism also facilitates the ability to apply machine learning detection and intervention models, a capability that is notably absent from any of the existing LSM's. For the record and everyone reading along at home, here are the links to the four releases: V1: https://lore.kernel.org/linux-security-module/20230204050954.11583-1-greg@enjellic.com/T/#t V2: https://lore.kernel.org/linux-security-module/20230710102319.19716-1-greg@enjellic.com/T/#t V3: https://lore.kernel.org/linux-security-module/20240401105015.27614-1-greg@enjellic.com/T/#t V4: https://lore.kernel.org/linux-security-module/20240826103728.3378-1-greg@enjellic.com/T/#t We believe that making some forward progress with review and inclusion of TSEM would positively impact the issues under discussion. > paul-moore.com Have a good weekend. As always, Dr. Greg The Quixote Project - Flailing at the Travails of Cybersecurity https://github.com/Quixote-Project
On 9/27/2024 1:58 AM, Dr. Greg wrote: > On Mon, Sep 16, 2024 at 04:08:11AM -0400, Paul Moore wrote: > > Good morning, I hope the end of the week is going well for everyone. > >> On Sun, Sep 15, 2024 at 8:38???PM Tetsuo Handa >> <penguin-kernel@i-love.sakura.ne.jp> wrote: >>> On 2024/09/14 0:28, Paul Moore wrote: >>>> I find it somewhat amusing that you are complaining about the LSM >>>> framework not accepting new LSMs in the same pull request where we are >>>> adding a new LSM (IPE). As a reminder, we have documented guidelines >>>> regarding the addition of new LSMs: >>>> >>>> https://github.com/LinuxSecurityModule/kernel/blob/main/README.md >>> (...snipped...) >>>> While I have no intention to negatively impact out-of-tree LSMs, >>> What I call "patent examination" is "New LSM Guidelines" section within >>> that link. That section includes "here are a list of requirements for >>> new LSM submissions:" and "The new LSM must be sufficiently unique", and >>> out-of-tree LSMs which cannot satisfy it won't be able to become in-tree. >>> If we apply this requirement to userspace program, this requirement means >>> you are declaring that "postfix" (or anything except "sendmail") cannot >>> become in-tree because "sendmail" is already in-tree. This is a clear >>> intention of negatively impact out-of-tree LSMs. People have the right to >>> use whatever subsets/alternatives. Even if a new LSM has were completely a >>> subset of existing in-tree LSMs, people have the right to use such LSM. >> Comparing userspace applications to kernel code isn't a fair >> comparison as a userspace application can generally be added without >> impacting the other applications on the system. > Tetsuo's comparison may be a bit strained, but it remains relevant. > > Linux was founded on a concept of choice, the current LSM architecture > struggles with the ability to facilitate generalized choice and > flexibility. > >>> While I consider that some of out-of-tree LSMs being unable to >>> become in-tree is inevitable, the requirement that any LSM has to >>> be built-in is a barrier for LSMs which cannot be built-in. >> Anyone is always free to build their own kernel with whatever code >> changes they like, this is the beauty of the kernel source being >> available and licensed as Open Source. You are free to build a >> kernel with whatever LSM you like included and enabled. You have >> been shown examples on how to do this in previous threads. >>> People have the right to install whatever userspace software / >>> kernel modules they need. >> Anyone is free to build their own kernel with whatever LSMs they want, >> either in-tree or out-of-tree; the static call changes do not prevent >> that. > This line of reasoning represents a bit of an indulgence in a false > binary logic fallacy. > > Anyone reading this forum is certainly capable of building a kernel in > any configuration they want to. That being said, the general Linux > technical community now represents a cohort far larger than > individuals who have the ability to build and platform a kernel of > their choosing. > > From a security perspective, Linux will benefit from providing a > better means to serve a middle ground where alternate security models > and architectures can be implemented without building a kernel from > scratch. Ye Gads. One can create SELinux policy to support just about any security model you can think of, although I was the first to decry its complexity. Smack access rules can be configured to support a wide variety of models, including Bell & LaPadula, Biba and rings of trust. AppArmor is very useful for targeted application security model enforcement. And then there's BPF. It seems to me that the problem isn't with the facilities provided to support the implementation of new security models, it is with the definition of those security modules. Or rather, the lack thereof. The ancient Bell & LaPadula sensitivity model can be implemented using Smack rules because it is sufficiently well defined. If the end user can define their policy as clearly as B&P does, its a slam dunk for any of the aforementioned LSMs.
On Fri, Sep 27, 2024 at 09:33:19AM -0700, Casey Schaufler wrote: Good morning Casey, always good to get your reflections, we hope your week is starting well. > On 9/27/2024 1:58 AM, Dr. Greg wrote: > > On Mon, Sep 16, 2024 at 04:08:11AM -0400, Paul Moore wrote: > > > > Good morning, I hope the end of the week is going well for everyone. > > > >> On Sun, Sep 15, 2024 at 8:38???PM Tetsuo Handa > >> <penguin-kernel@i-love.sakura.ne.jp> wrote: > >>> On 2024/09/14 0:28, Paul Moore wrote: > >>>> I find it somewhat amusing that you are complaining about the LSM > >>>> framework not accepting new LSMs in the same pull request where we are > >>>> adding a new LSM (IPE). As a reminder, we have documented guidelines > >>>> regarding the addition of new LSMs: > >>>> > >>>> https://github.com/LinuxSecurityModule/kernel/blob/main/README.md > >>> (...snipped...) > >>>> While I have no intention to negatively impact out-of-tree LSMs, > >>> What I call "patent examination" is "New LSM Guidelines" section > >>> within that link. That section includes "here are a list of > >>> requirements for new LSM submissions:" and "The new LSM must be > >>> sufficiently unique", and out-of-tree LSMs which cannot satisfy > >>> it won't be able to become in-tree. If we apply this > >>> requirement to userspace program, this requirement means you are > >>> declaring that "postfix" (or anything except "sendmail") cannot > >>> become in-tree because "sendmail" is already in-tree. This is a > >>> clear intention of negatively impact out-of-tree LSMs. People > >>> have the right to use whatever subsets/alternatives. Even if a > >>> new LSM has were completely a subset of existing in-tree LSMs, > >>> people have the right to use such LSM. > >> Comparing userspace applications to kernel code isn't a fair > >> comparison as a userspace application can generally be added without > >> impacting the other applications on the system. > > Tetsuo's comparison may be a bit strained, but it remains relevant. > > > > Linux was founded on a concept of choice, the current LSM architecture > > struggles with the ability to facilitate generalized choice and > > flexibility. > >>> While I consider that some of out-of-tree LSMs being unable to > >>> become in-tree is inevitable, the requirement that any LSM has to > >>> be built-in is a barrier for LSMs which cannot be built-in. > >> Anyone is always free to build their own kernel with whatever code > >> changes they like, this is the beauty of the kernel source being > >> available and licensed as Open Source. You are free to build a > >> kernel with whatever LSM you like included and enabled. You have > >> been shown examples on how to do this in previous threads. > >>> People have the right to install whatever userspace software / > >>> kernel modules they need. > >> Anyone is free to build their own kernel with whatever LSMs they want, > >> either in-tree or out-of-tree; the static call changes do not prevent > >> that. > > This line of reasoning represents a bit of an indulgence in a false > > binary logic fallacy. > > > > Anyone reading this forum is certainly capable of building a kernel in > > any configuration they want to. That being said, the general Linux > > technical community now represents a cohort far larger than > > individuals who have the ability to build and platform a kernel of > > their choosing. > > > > From a security perspective, Linux will benefit from providing a > > better means to serve a middle ground where alternate security models > > and architectures can be implemented without building a kernel from > > scratch. > Ye Gads. That certainly dates both of us, the last time I heard that phrase it was from Thurston Howell the III.... > One can create SELinux policy to support just about any security > model you can think of, although I was the first to decry its > complexity. Smack access rules can be configured to support a wide > variety of models, including Bell & LaPadula, Biba and rings of > trust. AppArmor is very useful for targeted application security > model enforcement. And then there's BPF. > > It seems to me that the problem isn't with the facilities provided > to support the implementation of new security models, it is with the > definition of those security modules. Or rather, the lack > thereof. The ancient Bell & LaPadula sensitivity model can be > implemented using Smack rules because it is sufficiently well > defined. If the end user can define their policy as clearly as B&P > does, its a slam dunk for any of the aforementioned LSMs. We certainly wouldn't choose to argue with any of this, given your repertoire in the field of mandatory access controls and security models. But therein lies the rub with respect to the implementation of system security. There are what, maybe 5-6 people in the world like yourself, that have the technical chops to translate the theoretical expressiveness you describe above into functional, let alone maintainable, security implementations? If there was the ability to practically implement just about any security model with SeLinux there would be no need for the LSM, yet its existence has arisen, given the desire to support multiple security schemes. That alone would seem to suggest the lack of technical prowess that is required to translate theoretical expressiveness into practical implementations. A primary challenge to security is scale of skill. In the face of limited advanced security skills, we have hundreds of thousands of people around the world creating and modifying millions of workloads, on a daily basis. I mentioned just recently, in a meeting with technical influencers here in the Great State of North Dakota, that we are never going to train our way out of this security problem. Cisco recognized this with network security and this fact was central to the concept of it's Application Centric Infrastructure (ACI). With respect to scale, ACI is based on the premise that the manageability of network security has to be an artifact of the development process. One of the motivations behind TSEM is to deliver that same concept to system security. The notion of allowing development teams to create a customized, bounded and mandatorily enforced security behavior, specific to a workload, as an extension of the development process. Another tool in the 'Secure By Design' toolbox. A concept that entities like NIST, DHS/CISA and particularly the insurance companies are going to force the industry to translate into practice, particularly in critical infrastructure systems. Have a good week. As always, Dr. Greg The Quixote Project - Flailing at the Travails of Cybersecurity https://github.com/Quixote-Project
On 9/30/2024 3:53 AM, Dr. Greg wrote: > On Fri, Sep 27, 2024 at 09:33:19AM -0700, Casey Schaufler wrote: > > Good morning Casey, always good to get your reflections, we hope your > week is starting well. > >> On 9/27/2024 1:58 AM, Dr. Greg wrote: >>> From a security perspective, Linux will benefit from providing a >>> better means to serve a middle ground where alternate security models >>> and architectures can be implemented without building a kernel from >>> scratch. >> Ye Gads. > That certainly dates both of us, the last time I heard that phrase it > was from Thurston Howell the III.... > >> One can create SELinux policy to support just about any security >> model you can think of, although I was the first to decry its >> complexity. Smack access rules can be configured to support a wide >> variety of models, including Bell & LaPadula, Biba and rings of >> trust. AppArmor is very useful for targeted application security >> model enforcement. And then there's BPF. >> >> It seems to me that the problem isn't with the facilities provided >> to support the implementation of new security models, it is with the >> definition of those security modules. Or rather, the lack >> thereof. The ancient Bell & LaPadula sensitivity model can be >> implemented using Smack rules because it is sufficiently well >> defined. If the end user can define their policy as clearly as B&P >> does, its a slam dunk for any of the aforementioned LSMs. > We certainly wouldn't choose to argue with any of this, given your > repertoire in the field of mandatory access controls and security > models. > > But therein lies the rub with respect to the implementation of system > security. > > There are what, maybe 5-6 people in the world like yourself, that have > the technical chops to translate the theoretical expressiveness you > describe above into functional, let alone maintainable, security > implementations? Flattering, but a touch off the mark. In the 1980's there were at least a dozen UNIX systems that implemented "B1", "B2" and/or "Compartmented Mode Workstation" systems. Five of those even got NSA evaluation certificates. There's plenty of expertise floating around today. The tools for doing security analysis have moved from "grep" to "AI". The original TCB definition for one system was done on paper, with a yellow highlighter, in a bar in Cambridge. Really, it's not that hard. It's messy and unpleasant and you learn things you don't want to know. You find a lot of bugs and discover all kinds of software behaviors that should never have been introduced. You become quite unpopular with your peers with other interests. We were "lucky" in the 1980's to have a US government executive order that drove security into operating systems, giving us the rationale for making changes. What's difficult today is justifying the effort. > If there was the ability to practically implement just about any > security model with SeLinux there would be no need for the LSM, The SELinux team did in fact propose removing the LSM infrastructure and making their code the official extended security mechanism. > yet > its existence has arisen, given the desire to support multiple > security schemes. That alone would seem to suggest the lack of > technical prowess that is required to translate theoretical > expressiveness into practical implementations. Nah, the technical prowess is there. The financial backing isn't. Besides, it's a *lot* more fun to write a filesystem than an SELinux policy (or set of Smack rules) for a distribution. > A primary challenge to security is scale of skill. > > In the face of limited advanced security skills, we have hundreds of > thousands of people around the world creating and modifying millions > of workloads, on a daily basis. Sure. Everyone uses their front door. Very few are locksmiths. > I mentioned just recently, in a meeting with technical influencers > here in the Great State of North Dakota, that we are never going to > train our way out of this security problem. > > Cisco recognized this with network security and this fact was central > to the concept of it's Application Centric Infrastructure (ACI). With > respect to scale, ACI is based on the premise that the manageability > of network security has to be an artifact of the development process. > > One of the motivations behind TSEM is to deliver that same concept to > system security. The notion of allowing development teams to create a > customized, bounded and mandatorily enforced security behavior, > specific to a workload, as an extension of the development process. SELinux + audit2allow. CONFIG_SECURITY_SMACK_BRINGUP. These are helpful, but you're not going to get away without applying some real brain power to your security model. And that's my point. Generated security models are crap. The best they can accomplish is to notice when a system changes behavior. Sometimes that's a security problem, and sometimes it is the system responding to anticipated changes, such as the phase of the moon. The NSA once told me that "A system is secure if it does what it is supposed to do, and nothing else". If you can't say in advance what the system is supposed to do, you can't determine if it is secure. > Another tool in the 'Secure By Design' toolbox. A concept that > entities like NIST, DHS/CISA and particularly the insurance companies > are going to force the industry to translate into practice, > particularly in critical infrastructure systems. > > Have a good week. > > As always, > Dr. Greg > > The Quixote Project - Flailing at the Travails of Cybersecurity > https://github.com/Quixote-Project >