Bug 1479048 - SELinux errors
SELinux errors
Status: ASSIGNED
Product: Fedora
Classification: Fedora
Component: icecream (Show other bugs)
26
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Michal Schmidt
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2017-08-07 16:07 EDT by Michael Cullen
Modified: 2018-05-03 03:53 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Additional Icecream selinux permissions (560 bytes, text/plain)
2018-03-30 17:47 EDT, Joshua Watt
no flags Details

  None (edit)
Description Michael Cullen 2017-08-07 16:07:20 EDT
Description of problem: I got some SELinux errors. I run in permissive mode right now on this machine, so it didn't actually break, but it could have done.


type=AVC msg=audit(1501852175.489:4275): avc:  denied  { read } for  pid=19873 comm="gcc" name="libm.so.6" dev="sda1" ino=4211665 scontext=system_u:system_r:iceccd_untrusted_t:s0 tcontext=system_u:object_r:iceccd_cache_t:s0 tclass=lnk_file permissive=1
type=AVC msg=audit(1502118101.142:475): avc:  denied  { read } for  pid=19457 comm="gcc" name="libc.so.6" dev="sda1" ino=4199087 scontext=system_u:system_r:iceccd_untrusted_t:s0 tcontext=system_u:object_r:iceccd_cache_t:s0 tclass=lnk_file permissive=1

in this case the "gcc" is the wrapper symlink.
Comment 1 Michal Schmidt 2017-08-09 03:14:30 EDT
(In reply to Michael Cullen from comment #0)
> type=AVC msg=audit(1501852175.489:4275): avc:  denied  { read } for 
> pid=19873 comm="gcc" name="libm.so.6" dev="sda1" ino=4211665
> scontext=system_u:system_r:iceccd_untrusted_t:s0
> tcontext=system_u:object_r:iceccd_cache_t:s0 tclass=lnk_file permissive=1

This indicates icecream was running a compile job on behalf of a remote client.
It's interesting that a symlink was present in the foreign environment, because icecc-create-env creates these environments with "tar -czh ...". The "-h" option would cause symlinks to be dereferenced.

Do you know what distribution and version does the remote client use?
Would you attach the output of "ls -liR /var/cache/icecream" (assuming the environment has not been deleted yet)?

> in this case the "gcc" is the wrapper symlink.

It should not be a symlink in the foreign environment. Did you mean "gcc" is the compilerwrapper binary (for clang)?
Comment 2 Michal Schmidt 2017-12-06 03:13:22 EST
If you can reproduce this, please provide the information requested in comment #1.
Comment 3 Joshua Watt 2018-01-20 17:50:03 EST
I encountered this same problem when attempting to generate a cross compiler toolchain with a custom icecc-create-env script (as part of a Yocto build). My script used symbolic links for many of the tools for various reasons, and when I tried to have a Fedora node be part of the cluster, the toolchain always failed because of this selinux policy (until I enabled permissive mode).

For reference, here is the icecc-create-env script I'm using. Note that it is still a Work in Progress and I have more cleanup to do, but I think it will exercise the bug: https://github.com/JPEWdev/poky/blob/icecc/meta/recipes-devtools/icecc-create-env/icecc-create-env/icecc-create-env
Comment 4 Joshua Watt 2018-03-22 22:21:42 EDT
Any update on this, or any more information I can provide? It would be nice to get this resolved, it is currently preventing and Fedora machines from being able to participate in our Icecream cluster when compiling a Yocto project

Also, FYI the Icecream changes in Yocto were upstreamed, so the finalized environment script can be found here:
https://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/meta/recipes-devtools/icecc-create-env/icecc-create-env/icecc-create-env

Thanks
Comment 5 Joshua Watt 2018-03-30 17:47 EDT
Created attachment 1415304 [details]
Additional Icecream selinux permissions

I used audit2allow to generate the attached SELinux module. Installing this module allowed my Fedora desktop to successfully participate in Icecream compiles when the toolchain contains symbolic links.
Comment 6 Fedora End Of Life 2018-05-03 03:53:40 EDT
This message is a reminder that Fedora 26 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 26. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '26'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 26 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged  change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.

Note You need to log in before you can comment on or make changes to this bug.