Bug 1469021 - SELinux blocks systemd-nspawn
Summary: SELinux blocks systemd-nspawn
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 27
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
Assignee: Lukas Vrabec
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-07-10 09:30 UTC by Ferry Huberts
Modified: 2018-11-30 22:35 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-11-30 22:35:45 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Ferry Huberts 2017-07-10 09:30:22 UTC
Description of problem:
SELinux blocks systemd-nspawn

I have a Fedora 25 x64 Jenkins build machine.
It builds RPMs with mock, which uses systemd-nspawn.
These builds fail under the current policy, while they succeeded under a previous policy.



Version-Release number of selected component (if applicable):
selinux-policy-3.13.1-225.18.fc25.noarch
selinux-policy-targeted-3.13.1-225.18.fc25.noarch
systemd-231-17.fc25.x86_64
mock-1.4.2-1.fc25.noarch


How reproducible:
always


Steps to Reproduce:
1. see description
2.
3.

Actual results:
fail

DEBUG util.py:606:  child environment: None
DEBUG util.py:533:  Executing command: ['/usr/bin/systemd-nspawn', '-q', '-M', '61d6d0878d144554837f64551aa1f62c', '-D', '/var/lib/mock/fedora-25-x86_64-gradle-upstream.5JzSZZVEsj/root', '-a', '--setenv=PATH=/usr/bin:/bin:/usr/sbin:/sbin', '--setenv=PROMPT_COMMAND=printf "\\033]0;<mock-chroot>\\007"', '--setenv=SHELL=/bin/bash', '--setenv=PS1=<mock-chroot> \\s-\\v\\$ ', '--setenv=HOSTNAME=mock', '--setenv=HOME=/builddir', '--setenv=TERM=vt100', '--setenv=LANG=en_US.UTF-8', '/usr/sbin/userdel', '-r', '-f', 'mockbuild'] with env {'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;<mock-chroot>\\007"', 'SHELL': '/bin/bash', 'PS1': '<mock-chroot> \\s-\\v\\$ ', 'HOSTNAME': 'mock', 'HOME': '/builddir', 'TERM': 'vt100', 'LANG': 'en_US.UTF-8'} and shell False
DEBUG util.py:307:  Unsharing. Flags: 134217728
DEBUG util.py:450:  Failed to register machine: Connection timed out
DEBUG util.py:450:  Parent died too early
DEBUG util.py:588:  Child return code was: 1

No AVCs


Expected results:
success

Additional info:

# groups jenkins
jenkins : jenkins mock

Comment 1 Ferry Huberts 2017-07-10 09:31:33 UTC
Setting 'setenforce 0' fixes the build, but is obviously not preferred

Comment 2 Ferry Huberts 2017-07-12 09:13:02 UTC
Might also be systemd-nspawn itself.
I did see some (parts of) jobs succeed and other fail while SELinux was in enforcing.

Comment 3 Ferry Huberts 2017-07-12 12:55:49 UTC
strange things are happening.
closing until I have a better idea of what is going on.

Comment 4 Ferry Huberts 2017-07-27 09:11:11 UTC
Ok, there might be a bad interaction here between systemd-nspawn and SELinux.
It failed again for me and setting SELinux to NOT enforcing fixed it again.

Comment 7 Fedora End Of Life 2017-11-16 19:31:11 UTC
This message is a reminder that Fedora 25 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 25. 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 '25'.

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 25 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.

Comment 8 Ben Cotton 2018-11-27 14:36:03 UTC
This message is a reminder that Fedora 27 is nearing its end of life.
On 2018-Nov-30  Fedora will stop maintaining and issuing updates for
Fedora 27. 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 '27'.

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 27 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.

Comment 9 Ben Cotton 2018-11-30 22:35:45 UTC
Fedora 27 changed to end-of-life (EOL) status on 2018-11-30. Fedora 27 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.


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