Bug 1922580 - SELinux prevents portablectl attach
Summary: SELinux prevents portablectl attach
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy-targeted
Version: 33
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Zdenek Pytela
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-01-30 11:00 UTC by Grégoire
Modified: 2021-11-30 18:05 UTC (History)
13 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-11-30 18:05:18 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Grégoire 2021-01-30 11:00:11 UTC
Description of problem:

When trying to go through http://0pointer.net/blog/walkthrough-for-portable-services.html on Fedora 33, I found there was an issue between portabled and selinux.

Version-Release number of selected component (if applicable):
$ portablectl --version
systemd 246 (v246.7-2.fc33)
+PAM +AUDIT +SELINUX +IMA -APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +ZSTD +SECCOMP +BLKID +ELFUTILS +KMOD +IDN2 -IDN +PCRE2 default-hierarchy=unified

How reproducible: Probably easy(?)


Steps to Reproduce:
1. Clone the example code from the blog post
2. Build according to instructions
3. Run `portablectl attach ./walkthroughd_1.raw`

Actual results:
Erros with the message "Failed to attach image: Access denied"

Expected results:
Service is attached and can be started with systemctl.

Additional info:
I tried the same steps with setenforce 0 and then it worked fine.

I found a message that might be relevant in the audit log:
type=AVC msg=audit(1612000937.992:3237): avc:  denied  { read write } for  pid=192401 comm="systemd-portabl" name="loop-control" dev="devtmpfs" ino=190 scontext=system_u:system_r:init_t:s0 tcontext=system_u:object_r:loop_control_device_t:s0 tclas
s=chr_file permissive=0

Comment 1 Ben Cotton 2021-11-04 16:01:39 UTC
This message is a reminder that Fedora 33 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora 33 on 2021-11-30.
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 '33'.

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 33 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 2 Ben Cotton 2021-11-30 18:05:18 UTC
Fedora 33 changed to end-of-life (EOL) status on 2021-11-30. Fedora 33 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.