-
Notifications
You must be signed in to change notification settings - Fork 70
Ignore attempts to setLabels "" on SELinux disabled systems #49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Some users of go-selinux attempt to set the SELinux label to "" even on SELinux disabled systems. This can cause these apps to blow up (runc). Rather then complicated these tools API, we can just ignore the attempts to set "" labels. If the caller attempts to set a label != "", then we should continue to attempt and fail appropriately. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
|
@cyphar @mrunalp @vrothberg @runcom PTAL |
|
LGTM -- though there should also be a check for |
|
@cyphar What OS does not support this? RHEL7/Centos7 or something older? |
|
When writing my comment I didn't realise that So having backwards compatibility support probably makes little sense for decade-old kernels -- however several users clearly are using decade-old kernels (hence the reports of |
|
@cyphar I think this PR is a better check, since if those callers are actually pushing in actual labels on Ubuntu, then they should be informed, if this is just pushing "" can causing the issue then this would fix it. |
|
LGTM |
1 similar comment
|
LGTM |
|
@rhatdan I would've suggested doing both checks, but if you're okay with failures on (very) old SELinux systems that's fine. |
full diff: opencontainers/selinux@v1.2...v1.2.1 brings in opencontainers/selinux#49 Ignore attempts to setLabels "" on SELinux disabled systems Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
full diff: opencontainers/selinux@v1.2...v1.2.1 brings in opencontainers/selinux#49 Ignore attempts to setLabels "" on SELinux disabled systems Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
full diff: opencontainers/selinux@v1.2...v1.2.1 brings in opencontainers/selinux#49 Ignore attempts to setLabels "" on SELinux disabled systems Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
full diff: opencontainers/selinux@v1.2...v1.2.1 brings in opencontainers/selinux#49 Ignore attempts to setLabels "" on SELinux disabled systems Signed-off-by: Sebastiaan van Stijn <github@gone.nl> (cherry picked from commit e5d8491) Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
full diff: opencontainers/selinux@v1.2...v1.2.1 brings in opencontainers/selinux#49 Ignore attempts to setLabels "" on SELinux disabled systems Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
full diff: opencontainers/selinux@v1.2...v1.2.1 brings in opencontainers/selinux#49 Ignore attempts to setLabels "" on SELinux disabled systems Signed-off-by: Sebastiaan van Stijn <github@gone.nl> (cherry picked from commit 5e7d59f) Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
full diff: opencontainers/selinux@v1.2...v1.2.1 brings in opencontainers/selinux#49 Ignore attempts to setLabels "" on SELinux disabled systems Signed-off-by: Sebastiaan van Stijn <github@gone.nl> (cherry picked from commit 5e7d59f) Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
full diff: opencontainers/selinux@v1.2...v1.2.1 brings in opencontainers/selinux#49 Ignore attempts to setLabels "" on SELinux disabled systems Signed-off-by: Sebastiaan van Stijn <github@gone.nl> Upstream-commit: 606ac478adb74754597074f5377f4341bc5ea369 Component: engine
full diff: opencontainers/selinux@v1.2...v1.2.1 brings in opencontainers/selinux#49 Ignore attempts to setLabels "" on SELinux disabled systems Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This is somewhat incorrect description. What I am seeing on a SELinux-enabled system is runc fails like this: This is CentOS 7, latest kernel (3.10.0-957.12.2.el7.x86_64) as of now. |
|
You need an updated container-selinux most likely. What AVC are you seeing? |
@rhatdan took me the best part of my day to figure it out, but upgrading (or downgrading) container-selinux makes the bug disappear, until the next reboot (allegedly something in I was also able to reproduce this with a small C proggie, on which container-selinux has no effect. Here's what I see: Now, installation of container-selinux fixes this (although it should definitely not afffect it)! and once this bug disappears, it won't reappear until reboot, and sometimes it's not reappearing after a reboot. |
|
Grab the latest RHEL7.5 branch of container-selinux and build and install the policy. This should allow the access. |
full diff: opencontainers/selinux@v1.2...v1.2.1 brings in opencontainers/selinux#49 Ignore attempts to setLabels "" on SELinux disabled systems Signed-off-by: Sebastiaan van Stijn <github@gone.nl> (cherry picked from commit 606ac47) Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Some users of go-selinux attempt to set the SELinux label to ""
even on SELinux disabled systems. This can cause these apps to blow
up (runc). Rather then complicated these tools API, we can just ignore
the attempts to set "" labels.
If the caller attempts to set a label != "", then we should continue to
attempt and fail appropriately.
Signed-off-by: Daniel J Walsh dwalsh@redhat.com