SELinux patches for 4.1
Hi James,
Five patches this time around: three patches to improve and enlarge the the avtab hash table, one to cleanup some MLS label import code, and one to cleanup some of the avc code. All of the patches are pretty small and straightforward. The two cleanup patches are trivially understandable and the avtab code is well documented.
As usual, all patches pass the SELinux testsuite.
Enjoy,
-Paul
---
The following changes since commit 6436a123a147db51a0b06024a8350f4c230e73ff:
selinux: fix sel_write_enforce broken return value
(2015-03-25 16:55:06 -0400)
are available in the git repository at:
git://git.infradead.org/users/pcmoore/selinux upstream
for you to fetch changes up to 9b43e04b188a1f715429604cca32b846e5a48cd2:
Merge branch 'next' into upstream in preparation for v4.1 (2015-04-01 22:24:51 -0400)
----------------------------------------------------------------
Jeff Vander Stoep (1):
selinux: remove unnecessary pointer reassignment in
avc_has_perm_noaudit()
John Brooks (1):
selinux: Use a better hash function for avtab
Paul Moore (2):
selinux: reconcile security_netlbl_secattr_to_sid() and
mls_import_netlbl_cat()
Merge branch 'next' into upstream in preparation for v4.1
Stephen Smalley (2):
selinux: convert avtab hash table to flex_array
selinux: increase avtab max buckets
security/selinux/avc.c | 6 ++-- security/selinux/ss/avtab.c | 72 +++++++++++++++++++++++++++++++--------- security/selinux/ss/avtab.h | 8 +++-- security/selinux/ss/mls.c | 10 ++---- security/selinux/ss/services.c | 6 +--- 5 files changed, 67 insertions(+), 35 deletions(-)
Signature · 2 lines
paul moore security @ redhat
Quoted 19 lines · Paul Moore
Hi James,
Five patches this time around: three patches to improve and enlarge the the avtab hash table, one to cleanup some MLS label import code, and one to cleanup some of the avc code. All of the patches are pretty small and straightforward. The two cleanup patches are trivially understandable and the avtab code is well documented.
As usual, all patches pass the SELinux testsuite.
Enjoy,
-Paul---
The following changes since commit6436a123a147db51a0b06024a8350f4c230e73ff:selinux: fix
sel_write_enforcebroken return value(2015-03-25 16:55:06 -0400)
Quoted 9 lines
are available in the git repository at:
git://git.infradead.org/users/pcmoore/selinuxupstreamfor you to fetch changes up to
9b43e04b188a1f715429604cca32b846e5a48cd2:Merge branch 'next' into upstream in preparation for v4.1 (2015-04-01 22:24:51 -0400)
Is this branch downstream from my -next?
Signature · 2 lines
James Morris <[email protected]>
Paul Moore
Acked-by Stephen SmalleyQuoted 10 lines · James Morris
Quoted 9 lines · Paul Moore
Hi James,
Five patches this time around: three patches to improve and enlarge the the
avtab hash table, one to cleanup some MLS label import code, and one to cleanup some of the avc code. All of the patches are pretty small and straightforward. The two cleanup patches are trivially understandable and the avtab code is well documented.
Quoted 8 lines
Quoted 8 lines
As usual, all patches pass the SELinux testsuite.
Enjoy,
-Paul---
The following changes since commit
6436a123a147db51a0b06024a8350f4c230e73ff:
Quoted 4 lines
Quoted 4 lines
selinux: fix
sel_write_enforcebroken return value(2015-03-25 16:55:06 -0400)
Quoted 8 lines
Quoted 6 lines
are available in the git repository at:
git://git.infradead.org/users/pcmoore/selinuxupstreamfor you to fetch changes up to
9b43e04b188a1f715429604cca32b846e5a48cd2:
Merge branch 'next' into upstream in preparation for v4.1 (2015-04-01 22:24:51 -0400)Is this branch downstream from my -next?
It should be, although likely an older version as I try not to pull unless necessary to resolve conflicts. When I do a test merge into your next branch I see the following:
#git pull selinux next
From git://git.infradead.org/users/pcmoore/selinux
* branch next -> FETCH_HEAD
Auto-merging security/selinux/selinuxfs.c Merge made by the 'recursive' strategy.
security/selinux/avc.c | 6 ++-- security/selinux/selinuxfs.c | 2 +- security/selinux/ss/avtab.c | 72 +++++++++++++++++++++++++++++--------- security/selinux/ss/avtab.h | 8 +++-- security/selinux/ss/mls.c | 10 ++---- security/selinux/ss/services.c | 6 +--- 6 files changed, 68 insertions(+), 36 deletions(-)
The merge diffstat looks as I would expect, the only odd thing is selinuxfs.c, but it looks like that is simply because your next branch doesn't include the error code fix I sent you for v4.0:
commit 6436a123a147db51a0b06024a8350f4c230e73ff
Author: Joe Perches <[email protected]>
Date: Mon Mar 23 18:01:35 2015 -0700
selinux: fix sel_write_enforce broken return value
Return a negative error value like the rest of the entries in this function.
Are you asking because you ran into a problem, or just to check?
Signature · 2 lines
paul moore security @ redhat
Quoted 29 lines · Paul Moore
necessary to resolve conflicts. When I do a test merge into your next branch I see the following:
#git pull selinux next
Fromgit://git.infradead.org/users/pcmoore/selinux
* branch next ->FETCH_HEAD
Auto-mergingsecurity/selinux/selinuxfs.cMerge made by the 'recursive' strategy.security/selinux/avc.c | 6 ++-- security/selinux/selinuxfs.c | 2 +- security/selinux/ss/avtab.c | 72 +++++++++++++++++++++++++++++--------- security/selinux/ss/avtab.h | 8 +++-- security/selinux/ss/mls.c | 10 ++---- security/selinux/ss/services.c | 6 +--- 6 files changed, 68 insertions(+), 36 deletions(-)The merge diffstat looks as I would expect, the only odd thing is
selinuxfs.c, but it looks like that is simply because your next branch doesn't include the error code fix I sent you for v4.0:commit
6436a123a147db51a0b06024a8350f4c230e73ff
Author: Joe Perches <[email protected]>
Date: Mon Mar 23 18:01:35 2015 -0700selinux: fix
sel_write_enforcebroken return valueReturn a negative error value like the rest of the entries in this function.
Quoted 7 lines
Cc <[email protected]>Signed-off-by Joe Perches <[email protected]>Acked-by Stephen Smalley <[email protected]>[PM: tweaked subject line]Signed-off-by Paul Moore <[email protected]>Are you asking because you ran into a problem, or just to check?
Yep, I saw that and some backmerge strangeness. Did you rebase your tree after I created a fresh branch?
Signature · 2 lines
James Morris <[email protected]>
Paul Moore
maintainerQuoted 37 lines · James Morris
Quoted 35 lines · Paul Moore
necessary to resolve conflicts. When I do a test merge into your next branch I see the following:
#git pull selinux next
Fromgit://git.infradead.org/users/pcmoore/selinux
* branch next ->FETCH_HEAD
Auto-mergingsecurity/selinux/selinuxfs.cMerge made by the 'recursive' strategy.security/selinux/avc.c | 6 ++-- security/selinux/selinuxfs.c | 2 +- security/selinux/ss/avtab.c | 72 +++++++++++++++++++++++++++++--------- security/selinux/ss/avtab.h | 8 +++-- security/selinux/ss/mls.c | 10 ++---- security/selinux/ss/services.c | 6 +--- 6 files changed, 68 insertions(+), 36 deletions(-)The merge diffstat looks as I would expect, the only odd thing is
selinuxfs.c, but it looks like that is simply because your next branch doesn't include the error code fix I sent you for v4.0:commit
6436a123a147db51a0b06024a8350f4c230e73ff
Author: Joe Perches <[email protected]>
Date: Mon Mar 23 18:01:35 2015 -0700selinux: fix
sel_write_enforcebroken return valueReturn a negative error value like the rest of the entries in this function.
Cc <[email protected]>Signed-off-by Joe Perches <[email protected]>Acked-by Stephen Smalley <[email protected]>[PM: tweaked subject line]Signed-off-by Paul Moore <[email protected]>
Quoted 4 lines
Quoted 1 line
Are you asking because you ran into a problem, or just to check?
Yep, I saw that and some backmerge strangeness. Did you rebase your tree after I created a fresh branch?
It looks like I'm based off your tree from Feb 1st, the last commit from your tree looks to be: 11cd64a234d5a1a7111627ef947beb0e5fad9e71.
Do you need me to rebase?
Signature · 2 lines
paul moore www.paul-moore.com
Quoted 8 lines · Paul Moore
Quoted 2 lines
Yep, I saw that and some backmerge strangeness. Did you rebase your tree after I created a fresh branch?
It looks like I'm based off your tree from Feb 1st, the last commit from your tree looks to be:
11cd64a234d5a1a7111627ef947beb0e5fad9e71.Do you need me to rebase?
Yep, see if that fixes things.
Signature · 2 lines
James Morris <[email protected]>
Paul Moore
maintainerQuoted 5 lines · James Morris
Quoted 3 lines · Paul Moore
Quoted 2 lines
Yep, I saw that and some backmerge strangeness. Did you rebase your tree after I created a fresh branch?
Quoted 7 lines
Quoted 5 lines
It looks like I'm based off your tree from Feb 1st, the last commit from your tree looks to be:
11cd64a234d5a1a7111627ef947beb0e5fad9e71.Do you need me to rebase?
Yep, see if that fixes things.
Okay, try it now; I rebased selinux#upstream against your latest next branch. The same patches are included, just in a slightly different order, and I included the error code fix for -stable since it isn't in your next branch or Linus' current.
# git pull git://git.infradead.org/users/pcmoore/selinux upstream From git://git.infradead.org/users/pcmoore/selinux * branch upstream -> FETCH_HEAD Updating 4f9a60f..6ad2606 Fast-forward security/selinux/avc.c | 6 ++-- security/selinux/selinuxfs.c | 2 +- security/selinux/ss/avtab.c | 72 ++++++++++++++++++++++++++++++++---------- security/selinux/ss/avtab.h | 8 +++-- security/selinux/ss/mls.c | 10 ++---- security/selinux/ss/services.c | 6 +--- 6 files changed, 68 insertions(+), 36 deletions(-)
Signature · 2 lines
paul moore www.paul-moore.com
Quoted 12 lines · Paul Moore
Quoted 11 lines · James Morris
Quoted 8 lines · Paul Moore
Quoted 2 lines
Yep, I saw that and some backmerge strangeness. Did you rebase your tree after I created a fresh branch?
It looks like I'm based off your tree from Feb 1st, the last commit from your tree looks to be:
11cd64a234d5a1a7111627ef947beb0e5fad9e71.Do you need me to rebase?
Quoted 7 lines
Quoted 1 line
Yep, see if that fixes things.
Okay, try it now; I rebased selinux#upstream against your latest next branch. The same patches are included, just in a slightly different order, and I included the error code fix for -stable since it isn't in your next branch or Linus' current.
It's in Linus' current as 6436a123a147db51a
Signature · 2 lines
James Morris <[email protected]>
Paul Moore
maintainerI'll have to look closer when I'm back in front of a system, perhaps I missed it.
More importantly, did you pull from the SELinux upstream branch?
--
paul moore
www.paul-moore.com
Quoted 29 lines · James Morris
Quoted 4 lines · Paul Moore
Quoted 3 lines · James Morris
Quoted 1 line · Paul Moore
Quoted 1 line
Yep, I saw that and some backmerge strangeness. Did you rebase your
tree
Quoted 8 lines
Quoted 8 lines
Quoted 7 lines
Quoted 1 line
after I created a fresh branch?
It looks like I'm based off your tree from Feb 1st, the last commit from your tree looks to be:
11cd64a234d5a1a7111627ef947beb0e5fad9e71.Do you need me to rebase?
Quoted 7 lines
Quoted 1 line
Yep, see if that fixes things.
Okay, try it now; I rebased selinux#upstream against your latest next branch. The same patches are included, just in a slightly different order, and I included the error code fix for -stable since it isn't in your next branch or Linus' current.
It's in Linus' current as
6436a123a147db51a--
James Morris
<[email protected]>
Quoted 5 lines · Paul Moore
I'll have to look closer when I'm back in front of a system, perhaps I missed it.
More importantly, did you pull from the SELinux upstream branch?
Nope.
Quoted 39 lines
--
paul moore
www.paul-moore.comQuoted 29 lines · James Morris
Quoted 4 lines · Paul Moore
Quoted 3 lines · James Morris
Quoted 1 line · Paul Moore
Quoted 1 line
Yep, I saw that and some backmerge strangeness. Did you rebase your
tree
Quoted 8 lines
Quoted 8 lines
Quoted 7 lines
Quoted 1 line
after I created a fresh branch?
It looks like I'm based off your tree from Feb 1st, the last commit from your tree looks to be:
11cd64a234d5a1a7111627ef947beb0e5fad9e71.Do you need me to rebase?
Quoted 7 lines
Quoted 1 line
Yep, see if that fixes things.
Okay, try it now; I rebased selinux#upstream against your latest next branch. The same patches are included, just in a slightly different order, and I included the error code fix for -stable since it isn't in your next branch or Linus' current.
It's in Linus' current as
6436a123a147db51a--
James Morris
<[email protected]>
Signature · 2 lines
James Morris <[email protected]>
Paul Moore
maintainerYou know James, we could probably shorten this process tremendously if you could respond with a sentence or two instead of a single word :-)
So you didn't pull the SELinux tree, is that because you simply haven't had time yet? Or is it because you don't like something in the tree? If the latter, can you expand upon what you don't like so I can remedy it?
--
paul moore
www.paul-moore.com
Quoted 55 lines · James Morris
Quoted 5 lines · Paul Moore
I'll have to look closer when I'm back in front of a system, perhaps I missed it.
More importantly, did you pull from the SELinux upstream branch?
Nope.
Quoted 6 lines
--
paul moore
www.paul-moore.comQuoted 8 lines
Quoted 6 lines · James Morris
Quoted 4 lines · Paul Moore
Quoted 3 lines · James Morris
Quoted 1 line · Paul Moore
Quoted 1 line
Yep, I saw that and some backmerge strangeness. Did you rebase
your
Quoted 17 lines
Quoted 17 lines
tree
Quoted 15 lines
Quoted 9 lines
Quoted 7 lines
Quoted 1 line
after I created a fresh branch?
It looks like I'm based off your tree from Feb 1st, the last commit from your tree looks to be:
11cd64a234d5a1a7111627ef947beb0e5fad9e71.Do you need me to rebase?
Yep, see if that fixes things.
Okay, try it now; I rebased selinux#upstream against your latest next branch. The same patches are included, just in a slightly different order, and I included the error code fix for -stable since it isn't in your next branch or Linus' current.
Quoted 8 lines
Quoted 6 lines
It's in Linus' current as
6436a123a147db51a--
James Morris
<[email protected]>--
James Morris
<[email protected]>
Quoted 7 lines · Paul Moore
You know James, we could probably shorten this process tremendously if you could respond with a sentence or two instead of a single word :-)
So you didn't pull the SELinux tree, is that because you simply haven't had time yet? Or is it because you don't like something in the tree? If the latter, can you expand upon what you don't like so I can remedy it?
I haven't pulled from it because you still have a patch in there which is in Linus' tree.
Quoted 69 lines
--
paul moore
www.paul-moore.comQuoted 59 lines · James Morris
Quoted 6 lines · Paul Moore
I'll have to look closer when I'm back in front of a system, perhaps I missed
it.More importantly, did you pull from the SELinux upstream branch?
Nope.
Quoted 6 lines
--
paul moore
www.paul-moore.comQuoted 9 lines
Quoted 7 lines · James Morris
Quoted 5 lines · Paul Moore
Quoted 3 lines · James Morris
Quoted 1 line · Paul Moore
Quoted 1 line
Yep, I saw that and some backmerge strangeness. Did you rebase
your
Quoted 19 lines
Quoted 19 lines
tree
Quoted 17 lines
Quoted 11 lines
Quoted 9 lines
Quoted 1 line
after I created a fresh branch?
It looks like I'm based off your tree from Feb 1st, the last commit
from your tree looks to be:11cd64a234d5a1a7111627ef947beb0e5fad9e71.Do you need me to rebase?
Yep, see if that fixes things.
Okay, try it now; I rebased selinux#upstream against your latest next branch. The same patches are included, just in a slightly different order, and I included the error code fix for -stable since it isn't in your next branch or Linus' current.
Quoted 8 lines
Quoted 6 lines
It's in Linus' current as
6436a123a147db51a--
James Morris
<[email protected]>--
James Morris
<[email protected]>
Signature · 2 lines
James Morris <[email protected]>
Quoted 5 lines · James Morris
Quoted 3 lines · Paul Moore
You know James, we could probably shorten this process tremendously if you could respond with a sentence or two instead of a single word :-)
Quoted 7 lines
Quoted 4 lines
So you didn't pull the SELinux tree, is that because you simply haven't had time yet? Or is it because you don't like something in the tree? If the latter, can you expand upon what you don't like so I can remedy it?
I haven't pulled from it because you still have a patch in there which is in Linus' tree.
You should be working downstream from my next branch. When I pull from you, it should merge cleanly.
Signature · 2 lines
James Morris <[email protected]>
Paul Moore
maintainerQuoted 10 lines · James Morris
Quoted 6 lines · Paul Moore
You know James, we could probably shorten this process tremendously if you could respond with a sentence or two instead of a single word :-)
So you didn't pull the SELinux tree, is that because you simply haven't had time yet? Or is it because you don't like something in the tree? If the latter, can you expand upon what you don't like so I can remedy it?
I haven't pulled from it because you still have a patch in there which is in Linus' tree.
See, that wasn't so hard to type out :)
Removed the patch, it should now just contain the five patches described at the start, and shown again below. It's based again the current security#next branch so there should be no problems, at least there haven't been in my test pulls.
Quoted 2 lines · James Morris
You should be working downstream from my next branch. When I pull from you, it should merge cleanly.
I am working downstream from your next branch (the selinux#upstream branch is based on security#next), I have been for some time now. I've posted online how I manage the SELinux tree (and audit tree if that matters) and if there are any changes I post updates; here it is in case you're curious:
1. Create a new branch, stable-X.XX, set to the upstream branch that was sent during the merge window.
2. Reset the next branch to the upstream branch that was sent during the merge window.
3. Accept new features into the next branch and fixes into the stable-X.XX branch.
4. As necessary, merge stable-X.XX into upstream and send pull requests upstream.
5. When vX.XX is released, merge next into upstream and send a pull request for the upstream branch. Leave stable-3.XX untouched for future stable fixes.
6. Goto step #1.
It might be helpful if you posted how you manage the security tree.
---
The following changes since commit 4f9a60f5c7e74f3e413a1ede1e8b959d01df4e57:
Merge branch 'smack-for-4.1' of git://github.com/cschaufler/smack-next into
next (2015-04-02 11:03:58 +1100)
are available in the git repository at:
git://git.infradead.org/users/pcmoore/selinux upstream
for you to fetch changes up to cf7b6c0205f11cdb015384244c0b423b00e35c69:
selinux: increase avtab max buckets (2015-04-06 20:16:23 -0400)
----------------------------------------------------------------
Jeff Vander Stoep (1):
selinux: remove unnecessary pointer reassignment
John Brooks (1):
selinux: Use a better hash function for avtab
Paul Moore (1):
selinux: reconcile security_netlbl_secattr_to_sid() and
mls_import_netlbl_cat()
Stephen Smalley (2):
selinux: convert avtab hash table to flex_array
selinux: increase avtab max buckets
security/selinux/avc.c | 6 ++-- security/selinux/ss/avtab.c | 72 ++++++++++++++++++++++++++++++--------- security/selinux/ss/avtab.h | 8 +++-- security/selinux/ss/mls.c | 10 ++---- security/selinux/ss/services.c | 6 +--- 5 files changed, 67 insertions(+), 35 deletions(-)
Signature · 2 lines
paul moore www.paul-moore.com
Quoted 4 lines · Paul Moore
Removed the patch, it should now just contain the five patches described at the start, and shown again below. It's based again the current security#next branch so there should be no problems, at least there haven't been in my test pulls.
Ok, I'll pull it on the weekend when I get back from PTO.
Signature · 2 lines
James Morris <[email protected]>
Paul Moore
maintainerQuoted 8 lines · James Morris
Quoted 4 lines · Paul Moore
Removed the patch, it should now just contain the five patches described at the start, and shown again below. It's based again the current security#next branch so there should be no problems, at least there haven't been in my test pulls.
Ok, I'll pull it on the weekend when I get back from PTO.
Okay, thanks. When you get back I'd still be curious to hear how you manage the security tree; my process works *ok* but I'm always looking for new approaches that may work better.
Signature · 2 lines
paul moore www.paul-moore.com
Quoted 8 lines · Paul Moore
Quoted 7 lines · James Morris
Quoted 4 lines · Paul Moore
Removed the patch, it should now just contain the five patches described at the start, and shown again below. It's based again the current security#next branch so there should be no problems, at least there haven't been in my test pulls.
Quoted 5 lines
Quoted 1 line
Ok, I'll pull it on the weekend when I get back from PTO.
Okay, thanks. When you get back I'd still be curious to hear how you manage the security tree; my process works *ok* but I'm always looking for new approaches that may work better.
Currently I merge my next branch with Linus at -rc1 or -rc2, after experimenting with other approaches. I pull into that from security subsystems and push to Linus during the merge window. Do you need any more info? Not sure what else there is to add.
For urgent fixes, I branch from Linus current (e.g. for-linus) and use that to push to Linus. This is a volatile branch which should not be tracked.
Signature · 2 lines
James Morris <[email protected]>
Paul Moore
maintainerQuoted 16 lines · James Morris
Quoted 8 lines · Paul Moore
Quoted 7 lines · James Morris
Quoted 4 lines · Paul Moore
Removed the patch, it should now just contain the five patches described at the start, and shown again below. It's based again the current security#next branch so there should be no problems, at least there haven't been in my test pulls.
Quoted 5 lines
Quoted 1 line
Ok, I'll pull it on the weekend when I get back from PTO.
Okay, thanks. When you get back I'd still be curious to hear how you manage the security tree; my process works *ok* but I'm always looking for new approaches that may work better.
Quoted 8 lines
Currently I merge my next branch with Linus at -rc1 or -rc2, after experimenting with other approaches. I pull into that from security subsystems and push to Linus during the merge window. Do you need any more info? Not sure what else there is to add.
For urgent fixes, I branch from Linus current (e.g. for-linus) and use that to push to Linus. This is a volatile branch which should not be tracked.
So no long running branches then? You simply recreate your next branch every release?
Signature · 2 lines
paul moore www.paul-moore.com
Quoted 22 lines · Paul Moore
Quoted 21 lines · James Morris
Quoted 8 lines · Paul Moore
Quoted 7 lines · James Morris
Quoted 4 lines · Paul Moore
Removed the patch, it should now just contain the five patches described at the start, and shown again below. It's based again the current security#next branch so there should be no problems, at least there haven't been in my test pulls.
Quoted 5 lines
Quoted 1 line
Ok, I'll pull it on the weekend when I get back from PTO.
Okay, thanks. When you get back I'd still be curious to hear how you manage the security tree; my process works *ok* but I'm always looking for new approaches that may work better.
Currently I merge my next branch with Linus at -rc1 or -rc2, after experimenting with other approaches. I pull into that from security subsystems and push to Linus during the merge window. Do you need any more info? Not sure what else there is to add.
Quoted 6 lines
Quoted 3 lines
For urgent fixes, I branch from Linus current (e.g. for-linus) and use that to push to Linus. This is a volatile branch which should not be tracked.
So no long running branches then? You simply recreate your next branch every release?
The next branch is long running.
Signature · 2 lines
James Morris <[email protected]>
Paul Moore
maintainerQuoted 24 lines · James Morris
Quoted 22 lines · Paul Moore
Quoted 21 lines · James Morris
Quoted 8 lines · Paul Moore
Quoted 7 lines · James Morris
Quoted 4 lines · Paul Moore
Removed the patch, it should now just contain the five patches described at the start, and shown again below. It's based again the current security#next branch so there should be no problems, at least there haven't been in my test pulls.
Quoted 5 lines
Quoted 1 line
Ok, I'll pull it on the weekend when I get back from PTO.
Okay, thanks. When you get back I'd still be curious to hear how you manage the security tree; my process works *ok* but I'm always looking for new approaches that may work better.
Currently I merge my next branch with Linus at -rc1 or -rc2, after experimenting with other approaches. I pull into that from security subsystems and push to Linus during the merge window. Do you need any more info? Not sure what else there is to add.
Quoted 8 lines
Quoted 6 lines
Quoted 3 lines
For urgent fixes, I branch from Linus current (e.g. for-linus) and use that to push to Linus. This is a volatile branch which should not be tracked.
So no long running branches then? You simply recreate your next branch every release?
The next branch is long running.
I guess I misunderstood your merge with -rc1/-rc2 comment, I thought you meant you rebased at each -rc1/-rc2.
Signature · 2 lines
paul moore www.paul-moore.com
Quoted 22 lines · Paul Moore
Quoted 21 lines · James Morris
Quoted 19 lines · Paul Moore
Quoted 18 lines · James Morris
Quoted 11 lines · Paul Moore
Quoted 7 lines · James Morris
Quoted 4 lines · Paul Moore
Removed the patch, it should now just contain the five patches described at the start, and shown again below. It's based again the current security#next branch so there should be no problems, at least there haven't been in my test pulls.
Ok, I'll pull it on the weekend when I get back from PTO.
Okay, thanks. When you get back I'd still be curious to hear how you manage the security tree; my process works *ok* but I'm always looking for new approaches that may work better.
Currently I merge my next branch with Linus at -rc1 or -rc2, after experimenting with other approaches. I pull into that from security subsystems and push to Linus during the merge window. Do you need any more info? Not sure what else there is to add.
Quoted 9 lines
Quoted 6 lines
Quoted 5 lines
Quoted 3 lines
For urgent fixes, I branch from Linus current (e.g. for-linus) and use that to push to Linus. This is a volatile branch which should not be tracked.
So no long running branches then? You simply recreate your next branch every release?
The next branch is long running.
I guess I misunderstood your merge with -rc1/-rc2 comment, I thought you meant you rebased at each -rc1/-rc2.
James, do you suppose you could send an announcement when you do your merge? That would make it easier on the sub-tree maintainers. Just a quick "I merged the next branch to XXXX" to the LSM list.
Paul Moore
maintainerQuoted 3 lines · Casey Schaufler
James, do you suppose you could send an announcement when you do your merge? That would make it easier on the sub-tree maintainers. Just a quick "I merged the next branch to XXXX" to the LSM list.
That would definitely make my life a little easier.
Signature · 2 lines
paul moore www.paul-moore.com
Quoted 4 lines · Paul Moore
Quoted 1 line
The next branch is long running.
I guess I misunderstood your merge with -rc1/-rc2 comment, I thought you meant you rebased at each -rc1/-rc2.
Yep, it's a merge, not a rebase.
Signature · 2 lines
James Morris <[email protected]>
Quoted 6 lines · Paul Moore
Quoted 3 lines · Casey Schaufler
James, do you suppose you could send an announcement when you do your merge? That would make it easier on the sub-tree maintainers. Just a quick "I merged the next branch to XXXX" to the LSM list.
That would definitely make my life a little easier.
Ok, sure.
Signature · 2 lines
James Morris <[email protected]>
Quoted 10 lines · James Morris
Quoted 6 lines · Paul Moore
Quoted 3 lines · Casey Schaufler
James, do you suppose you could send an announcement when you do your merge? That would make it easier on the sub-tree maintainers. Just a quick "I merged the next branch to XXXX" to the LSM list.
That would definitely make my life a little easier.
Ok, sure.
After posting the integrity patches here, I tried applying them to Linus' 4.1.0-rc1 branch to make sure they'll apply cleanly. Looks like commit c6f439d "VFS: security/: d_backing_inode() annotations" affects all of the security subsystems.
Mimi
secilc bug
Today i hit an bug in secilc, when compiled by policy with some modules excluded.
My policy is rather complex, and so i find the issue hard to explain but i will try:
In my github.com/doverride/laptop policy (the auth.cil module to be precise) i have a auth_pam_config_object_type() macro that essentially associates the calling type with the auth_pam_config_object_type type attribute, which in turn is associated with the auth_object_type attribute that is used to grant auth_admin() access to all "auth object types"
The auth_pam_config_object_type() macro is called in various modules for various third party pam config files.
For example, xserver maintains /etc/pam.d/xserver, which is associated with xserver_pam_config_t, and xserver_pam_config_t is associated with auth_pam_config_object_type.
This is just one example.
By excluding the xserver.cil module, the whole auth_pam_config_object_type, and all rules associated with it vanishes. I noticed today that on a system where i excluded xserver.cil i no longer had access to /etc/security/access.conf (which is associated with pam_config_t, and pam_config_t is associated with auth_pam_config_object_type)
By reincluding the xserver.cil module , the rules that allow auth_admin() to maintain auth_object_type files reappeared.
To reproduce:
clone my "laptop" policy and build it
use "sesearch -A -s auth_admin_subject_type | grep auth_object_type" to confirm that auth_admin_subject_type is allowed to maintain file objects associated with auth_object_type
Now exclude the xserver.cil module
use above sesearch command again and notice how the rules granting auth_admin_subject_type access to maintain file objects associated with auth_object_type have vanished.
P.S:
Another really strange thing i noticed is that i have a compiled policy with a bunch of modules excluded that is bigger than a policy with little or no modules excluded.
Signature · 4 lines
02DFF788 4D30 903A 1CF3 B756 FB48 1514 3148 83A2 02DF F788 http://keys.gnupg.net/pks/lookup?op=vindex&search=0x314883A202DFF788 Dominick Grift
Re: secilc bug
Quoted 1 line · Dominick Grift
Today i hit an bug in secilc, when compiled by policy with some modules excluded.
<snip>
I suspect the issue is something like the following:
There are currently no rules associated with the pam_auth_config_object_type type attribute thus it will be removed from the policy by secilc
However this may or may not change. I do have macros with rules assoc. with pam_auth_config_object_type, they are currently just not called by anything
In my policy, the pam_auth_config_object_type type attribute currently only acts as a bridge to auth_object_type type attribute
Example: pam_config_t (and many other types) is/are assoc. with auth_pam_config_object_type, auth_pam_config_object_type is associated with auth_object_type, and there are rules assoc. with auth_object_type
(for example: auth_admin_subject_type auth_object_type (all_file_objects (all_file_perms_except)))
The question remains, how does me exluding the xserver.cil affects all this. I actually commented out the only call to the auth.cil module ( (call auth_pam_config_object_type (xserver_pam_config_t)) ) from the xserver module and it turns out to not affect it. So it is not that macro call.
It may instead be another ordering issue...
E.g. excluding the xserver.cil module may mess up the ordering of the modules to process in such a way that this rule vanishes
Because that is what this issue boils down to: rules vanishing for no reason
I made a screencast that tries to explain the issue:
https://www.youtube.com/watch?v=XRp5z9aqLDo
Signature · 4 lines
02DFF788 4D30 903A 1CF3 B756 FB48 1514 3148 83A2 02DF F788 http://keys.gnupg.net/pks/lookup?op=vindex&search=0x314883A202DFF788 Dominick Grift
Re: secilc bug
Quoted 16 lines · Dominick Grift
Quoted 1 line · Dominick Grift
Today i hit an bug in secilc, when compiled by policy with some modules excluded.
<snip>
I suspect the issue is something like the following:
There are currently no rules associated with the
pam_auth_config_object_typetype attribute thus it will be removed from the policy by secilcHowever this may or may not change. I do have macros with rules assoc. with
pam_auth_config_object_type, they are currently just not called by anythingIn my policy, the
pam_auth_config_object_typetype attribute currently only acts as a bridge toauth_object_typetype attributeExample:
pam_config_t(and many other types) is/are assoc. withauth_pam_config_object_type,auth_pam_config_object_typeis associated withauth_object_type, and there are rules assoc. withauth_object_type
Quoted 8 lines
(for example:
auth_admin_subject_typeauth_object_type(all_file_objects(all_file_perms_except)))The question remains, how does me exluding the xserver.cil affects all this. I actually commented out the only call to the auth.cil module ( (call
auth_pam_config_object_type(xserver_pam_config_t)) ) from the xserver module and it turns out to not affect it. So it is not that macro call.It may instead be another ordering issue...
There doesn't seem to be ordering issues related to typeattributeset statements. See attached test policy if you're interested.
Quoted 9 lines
E.g. excluding the xserver.cil module may mess up the ordering of the modules to process in such a way that this rule vanishes
Because that is what this issue boils down to: rules vanishing for no reason
I made a screencast that tries to explain the issue:
I think that it would be more helpful to me if I could see the policy. Is it available anywhere? If not, could you send me at least the auth.cil and xserver.cil modules?
Signature · 2 lines
James Carter <[email protected]> National Security Agency
Re: secilc bug
Quoted 47 lines · James Carter
Quoted 26 lines · Dominick Grift
Quoted 2 lines · Dominick Grift
Today i hit an bug in secilc, when compiled by policy with some modules excluded.
<snip>
I suspect the issue is something like the following:
There are currently no rules associated with the
pam_auth_config_object_typetype attribute thus it will be removed from the policy by secilcHowever this may or may not change. I do have macros with rules assoc. with
pam_auth_config_object_type, they are currently just not called by anythingIn my policy, the
pam_auth_config_object_typetype attribute currently only acts as a bridge toauth_object_typetype attributeExample:
pam_config_t(and many other types) is/are assoc. withauth_pam_config_object_type,auth_pam_config_object_typeis associated withauth_object_type, and there are rules assoc. withauth_object_type(for example:
auth_admin_subject_typeauth_object_type(all_file_objects(all_file_perms_except)))Quoted 8 lines
The question remains, how does me exluding the xserver.cil affects all this. I actually commented out the only call to
the auth.cil module ( (callauth_pam_config_object_type(xserver_pam_config_t)) ) from the xserver module and it turns out to not affect it. So it is not that macro call.It may instead be another ordering issue...
There doesn't seem to be ordering issues related to typeattributeset statements. See attached test policy if you're interested.
Quoted 8 lines
E.g. excluding the xserver.cil module may mess up the ordering of the modules to process in such a way that this rule vanishes
Because that is what this issue boils down to: rules vanishing for no reason
I made a screencast that tries to explain the issue:
Quoted 8 lines
Quoted 3 lines
I think that it would be more helpful to me if I could see the policy. Is it available anywhere? If not, could you send me at least the auth.cil and xserver.cil modules?
I think this might be a reset issue, with classmappings or something related to classmappings not getting reset/re-resolved correctly. I've noticed that with xserver.cil removed, some optional fails and causes a re-resolve. Then when writing to the binary, the allow rule mentioned ends up with all perms being empty, and so the allow rule is never added.
Note I also needed to modify EXCLUDE to exclude a handful of files due to dependencies with xserver. I've attached that file.
- Steve
tests/ sources/modules/contrib/applications/setbacklight.cil sources/modules/contrib/applications/b43fwcutter.cil sources/modules/contrib/services/bluetooth.cil sources/modules/contrib/system/myqemu.cil sources/modules/contrib/system/tunctl.cil sources/modules/contrib/system/bridgeutil.cil sources/modules/contrib/applications/firefox.cil sources/modules/contrib/applications/qiv.cil sources/modules/contrib/applications/xpdf.cil sources/modules/contrib/applications/xutil.cil sources/modules/contrib/applications/dunst.cil sources/modules/contrib/applications/xlock.cil sources/modules/contrib/applications/xterm.cil sources/modules/contrib/applications/xbindkeys.cil sources/modules/contrib/applications/rp.cil sources/modules/contrib/applications/dbuslaunch.cil sources/modules/contrib/applications/ffmpeg.cil sources/modules/contrib/applications/mplayer.cil sources/modules/contrib/applications/cowsay.cil sources/modules/contrib/applications/atspi2.cil
Re: secilc bug
In reply to James CarterQuoted 5 lines · James Carter
I think that it would be more helpful to me if I could see the policy. Is it available anywhere? If not, could you send me at least the auth.cil and xserver.cil modules?
Sure, It is available at: http://www.github.com/doverride/laptop
Re: secilc bug
In reply to Steve LawrenceQuoted 10 lines · Steve Lawrence
I think this might be a reset issue, with classmappings or something related to classmappings not getting reset/re-resolved correctly. I've noticed that with xserver.cil removed, some optional fails and causes a re-resolve. Then when writing to the binary, the allow rule mentioned ends up with all perms being empty, and so the allow rule is never added.
Note I also needed to modify EXCLUDE to exclude a handful of files due to dependencies with xserver. I've attached that file.
Yes, indeed. My policy infrastructure support local changes though
One can create an EXCLUDE.local file in the root and in there add the modules one wishes to exclude
This file should not conflict with the "upstream" EXCLUDE file
So EXCLUDE is used by upstream and EXCLUDE.local is for local exclusions
Similarly seusers and seusers.local
Basically the repository has a local and upstream side, so that one can make local changes without breaking the repository by for example updating it with git pull
Re: secilc bug
Quoted 16 lines · Dominick Grift
Quoted 10 lines · Steve Lawrence
I think this might be a reset issue, with classmappings or something related to classmappings not getting reset/re-resolved correctly. I've noticed that with xserver.cil removed, some optional fails and causes a re-resolve. Then when writing to the binary, the allow rule mentioned ends up with all perms being empty, and so the allow rule is never added.
Note I also needed to modify EXCLUDE to exclude a handful of files due to dependencies with xserver. I've attached that file.
Yes, indeed. My policy infrastructure support local changes though
One can create an EXCLUDE.local file in the root and in there add the modules one wishes to exclude
Quoted 7 lines
This file should not conflict with the "upstream" EXCLUDE file
So EXCLUDE is used by upstream and EXCLUDE.local is for local exclusions
Similarly seusers and seusers.local
Basically the repository has a local and upstream side, so that one can make local changes without breaking the repository by for example updating it with git pull
Running ./laptop --help explains the options a bit
Signature · 4 lines
02DFF788 4D30 903A 1CF3 B756 FB48 1514 3148 83A2 02DF F788 http://keys.gnupg.net/pks/lookup?op=vindex&search=0x314883A202DFF788 Dominick Grift
Re: secilc bug
In reply to Dominick GriftQuoted 28 lines · Dominick Grift
Today i hit an bug in secilc, when compiled by policy with some modules excluded.
My policy is rather complex, and so i find the issue hard to explain but i will try:
In my github.com/doverride/laptop policy (the auth.cil module to be precise) i have a
auth_pam_config_object_type()macro that essentially associates the calling type with theauth_pam_config_object_typetype attribute, which in turn is associated with theauth_object_typeattribute that is used to grantauth_admin()access to all "auth object types"The
auth_pam_config_object_type()macro is called in various modules for various third party pam config files.For example, xserver maintains
/etc/pam.d/xserver, which is associated withxserver_pam_config_t, andxserver_pam_config_tis associated withauth_pam_config_object_type.This is just one example.
By excluding the xserver.cil module, the whole
auth_pam_config_object_type, and all rules associated with it vanishes. I noticed today that on a system where i excluded xserver.cil i no longer had access to/etc/security/access.conf(which is associated withpam_config_t, andpam_config_tis associated withauth_pam_config_object_type)By reincluding the xserver.cil module , the rules that allow
auth_admin()to maintainauth_object_typefiles reappeared.To reproduce:
clone my "laptop" policy and build it
use "sesearch -A -s
auth_admin_subject_type| grepauth_object_type" to confirm thatauth_admin_subject_typeis allowed to maintain file objects associated withauth_object_type
Quoted 9 lines
Now exclude the xserver.cil module
use above sesearch command again and notice how the rules granting
auth_admin_subject_typeaccess to maintain file objects associated withauth_object_typehave vanished.
P.S:
Another really strange thing i noticed is that i have a compiled policy with a bunch of modules excluded that is bigger than a policy with little or no modules excluded.
I want to retract this. This was most likely a parens issue to begin with. Today i hit a similar issue and i decided to dig a little deeper. Granted the issue i hit today was much simpler to track down.
Anyhow it turned out to be a misplaced parens which resulted in secilc removing a lot of policy that it thought was in one optional block.
in reality they were many optional blocks but the first one wasnt closed properly!
Yes, the secilc warning about "open without close" or "close without open" are annoying. but take my word for it. its much better to have secilc identify these issues then to have it not identify them and then when you decide to exclude a module a whole load of policy gets removed because secilc thought it was part of the single block!
anyhow sorry for thinking this was a bug in secilc. it was my mistake. in my defense though: my policy is pretty complex and sometimes its not easy to identify the issue. Also parens arent that friendly to humans...