Bug 1374934 - SELinux issues with rkt in rawhide
Summary: SELinux issues with rkt in rawhide
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: rkt
Version: 26
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Lokesh Mandvekar
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-09-10 15:45 UTC by kushaldas@gmail.com
Modified: 2018-05-29 11:44 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-05-29 11:44:58 UTC


Attachments (Terms of Use)
The .te file (1.16 KB, text/plain)
2016-09-10 15:49 UTC, kushaldas@gmail.com
no flags Details

Description kushaldas@gmail.com 2016-09-10 15:45:54 UTC
Description of problem:

rkt is failing to work with SELinux errors in rawhide.


Version-Release number of selected component (if applicable):

# rpm -q rkt
rkt-1.14.0-1.git0d72cd8.fc26.x86_64


How reproducible:

Installed rkt on a Rawhide cloud image.

Steps to Reproduce:
1. sudo rkt --insecure-options=image --debug run hello-0.0.1-linux-amd64.aci

Actual results:

$ sudo rkt --insecure-options=image --debug run hello-0.0.1-linux-amd64.aci
image: using image from local store for image name coreos.com/rkt/stage1-host:1.14.0-1.git0d72cd8.fc26
image: using image from file hello-0.0.1-linux-amd64.aci
stage0: Preparing stage1
stage0: Writing image manifest
stage0: Loading image sha512-86450bda7ae972c9507007bd7dc19a386011a8d865698547f31caba4898d1ebe
stage0: Writing image manifest
stage0: Writing pod manifest
stage0: Setting up stage1
stage0: Wrote filesystem to /var/lib/rkt/pods/run/fa132819-3ea9-464c-9542-4b5f0f5bb25f
stage0: Pivoting to filesystem /var/lib/rkt/pods/run/fa132819-3ea9-464c-9542-4b5f0f5bb25f
stage0: Execing /init
networking: loading networks from /etc/rkt/net.d
networking: loading network default with type ptp
Spawning container rkt-fa132819-3ea9-464c-9542-4b5f0f5bb25f on /var/lib/rkt/pods/run/fa132819-3ea9-464c-9542-4b5f0f5bb25f/stage1/rootfs.
Press ^] three times within 1s to kill container.
systemd 231 running in system mode. (+PAM +AUDIT +SELINUX +IMA -APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD +IDN)
Detected virtualization rkt.
Detected architecture x86-64.
Failed to read os-release file: Permission denied

Welcome to Linux!

Set hostname to <rkt-fa132819-3ea9-464c-9542-4b5f0f5bb25f>.
Failed to build unit path cache, proceeding without: Permission denied
Failed to read directory /usr/lib/systemd/system/default.target.wants: Permission denied
[  OK  ] Created slice system.slice.
[  OK  ] Created slice system-prepare\x2dapp.slice.
[  OK  ] Listening on Journal Socket (/dev/log).
[  OK  ] Listening on Journal Socket.
         Starting Journal Service...
[  OK  ] Started Journal Service.
         Starting Prepare minimum environment for chrooted applications...
[FAILED] Failed to start Prepare minimum environment for chrooted applications.
See 'systemctl status prepare-app@-opt-stage2-hello-rootfs.service' for details.
[DEPEND] Dependency failed for Application=hello Image=example.com/hello.
[  OK  ] Reached target rkt apps target.


[fedora@kushal-rawhide ~]$ sudo rkt list                                                                                                     [634/634]
UUID            APP     IMAGE NAME              STATE   CREATED         STARTED         NETWORKS
649bdd48        hello   example.com/hello:0.0.1 exited  8 minutes ago
bdafddd7        hello   example.com/hello:0.0.1 exited  1 minute ago
fa132819        hello   example.com/hello:0.0.1 running 27 seconds ago  26 seconds ago  default:ip4=172.16.28.4
[fedora@kushal-rawhide ~]$ curl 172.16.28.4:5000
curl: (7) Failed to connect to 172.16.28.4 port 5000: Connection refused

Comment 1 kushaldas@gmail.com 2016-09-10 15:49:36 UTC
Created attachment 1199790 [details]
The .te file

Generated from a rawhide system by the following command.

# ausearch -c 'systemd' --raw | audit2allow -M localrktrawhide

Comment 2 Daniel Walsh 2016-09-13 14:21:35 UTC
rkt uses overlayfs which used to  not work with SELinux.  If you try without overlay does it work?

Also what version of kernel do you have installed?

Comment 3 kushaldas@gmail.com 2016-09-15 08:02:15 UTC
On a fresh updated box today(In reply to Daniel Walsh from comment #2)
> rkt uses overlayfs which used to  not work with SELinux.  If you try without
> overlay does it work?
> 
> Also what version of kernel do you have installed?

# uname -a
Linux kushal-rawhide-temp.novalocal 4.8.0-0.rc6.git1.1.fc26.x86_64 #1 SMP Tue Sep 13 16:51:00 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

It seems this is due to overlayfs as you mentioned.

Comment 4 Fedora End Of Life 2017-02-28 10:14:28 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 26 development cycle.
Changing version to '26'.

Comment 5 Fedora End Of Life 2018-05-03 08:30:35 UTC
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.

Comment 6 Fedora End Of Life 2018-05-29 11:44:58 UTC
Fedora 26 changed to end-of-life (EOL) status on 2018-05-29. Fedora 26
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.