Bug 1291940 - SELinux is preventing systemd from 'create' accesses on the unix_stream_socket Unknown.
SELinux is preventing systemd from 'create' accesses on the unix_stream_socke...
Status: ASSIGNED
Product: Fedora
Classification: Fedora
Component: selinux-policy (Show other bugs)
26
x86_64 Unspecified
high Severity high
: ---
: ---
Assigned To: Lukas Vrabec
Fedora Extras Quality Assurance
AcceptedBlocker abrt_hash:3105d14f21e...
: Reopened
: 1293722 1296309 1299805 (view as bug list)
Depends On:
Blocks: F24FinalBlocker 1290357 1325503
  Show dependency treegraph
 
Reported: 2015-12-15 17:45 EST by Vít Ondruch
Modified: 2018-05-03 04:10 EDT (History)
30 users (show)

See Also:
Fixed In Version: selinux-policy-3.13.1-167.fc24 selinux-policy-3.13.1-179.fc24
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-08-08 08:31:50 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Vít Ondruch 2015-12-15 17:45:15 EST
Description of problem:
SELinux is preventing systemd from 'create' accesses on the unix_stream_socket Unknown.

*****  Plugin catchall (100. confidence) suggests   **************************

If you believe that systemd should be allowed create access on the Unknown unix_stream_socket by default.
Then you should report this as a bug.
You can generate a local policy module to allow this access.
Do
allow this access for now by executing:
# grep systemd /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:init_t:s0
Target Context                system_u:system_r:unconfined_service_t:s0
Target Objects                Unknown [ unix_stream_socket ]
Source                        systemd
Source Path                   systemd
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.13.1-163.fc24.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 4.3.0-1.fc24.x86_64 #1 SMP Mon Nov
                              2 16:27:20 UTC 2015 x86_64 x86_64
Alert Count                   1
First Seen                    2015-12-15 23:42:46 CET
Last Seen                     2015-12-15 23:42:46 CET
Local ID                      feac16a5-8fa5-410f-b3bc-24a512ae44f7

Raw Audit Messages
type=AVC msg=audit(1450219366.938:83): avc:  denied  { create } for  pid=1 comm="systemd" scontext=system_u:system_r:init_t:s0 tcontext=system_u:system_r:unconfined_service_t:s0 tclass=unix_stream_socket permissive=0


Hash: systemd,init_t,unconfined_service_t,unix_stream_socket,create

Version-Release number of selected component:
selinux-policy-3.13.1-163.fc24.noarch

Additional info:
reporter:       libreport-2.6.3
hashmarkername: setroubleshoot
kernel:         4.3.0-1.fc24.x86_64
type:           libreport
Comment 1 Miroslav Grepl 2015-12-15 17:54:30 EST
After boot?

What does show

rpm -q systemd

ps -efZ |grep unconfined_service_t

?
Comment 2 Vít Ondruch 2015-12-17 10:04:17 EST
(In reply to Miroslav Grepl from comment #1)
> After boot?

Yes, always

> rpm -q systemd

$ rpm -q systemd
systemd-228-6.gite35a787.fc24.x86_64

> ps -efZ |grep unconfined_service_t

$ ps -efZ |grep unconfined_service_t
system_u:system_r:unconfined_service_t:s0 root 1770 1  0 16:01 ?       00:00:00 /usr/libexec/udisks2/udisksd --no-debug
unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 vondruch 3113 2720  0 16:03 pts/0 00:00:00 grep --color=auto unconfined_service_t
Comment 3 Jared Smith 2015-12-28 08:13:14 EST
Description of problem:
Not sure...

Version-Release number of selected component:
selinux-policy-3.13.1-164.fc24.noarch

Additional info:
reporter:       libreport-2.6.3
hashmarkername: setroubleshoot
kernel:         4.4.0-0.rc6.git1.1.fc24.x86_64
type:           libreport
Comment 4 Adam Williamson 2016-01-04 20:04:26 EST
Description of problem:
I believe this happened at startup of a recently updated Rawhide system.


Additional info:
reporter:       libreport-2.6.3
hashmarkername: setroubleshoot
kernel:         4.4.0-0.rc6.git1.2.fc24.x86_64
type:           libreport
Comment 5 Adam Williamson 2016-01-12 18:58:51 EST
Description of problem:
This happens when trying to start the new virtlogd.socket from libvirt, which is required for virtlogd.service , which is required (per RHBZ #1290357) in order to start virtual machines, now.


Additional info:
reporter:       libreport-2.6.3
hashmarkername: setroubleshoot
kernel:         4.4.0-1.fc24.x86_64
type:           libreport
Comment 6 Adam Williamson 2016-01-12 19:26:16 EST
Proposing as a Final blocker, criterion "All system services present after installation with one of the release-blocking package sets must start properly, unless they require hardware which is not present." - https://fedoraproject.org/wiki/Fedora_24_Final_Release_Criteria#System_services . This bug results in virtlogd.service failing to start after install of Workstation, per openQA tests, e.g. https://openqa.stg.fedoraproject.org/tests/4307 .
Comment 7 Stephen Gallagher 2016-01-14 09:13:30 EST
Description of problem:
I attempted to create a new virtual machine using virt-manager. It failed with the error:

Unable to complete install: 'Failed to connect socket to '/var/run/libvirt/virtlogd-sock': No such file or directory'

Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/asyncjob.py", line 90, in cb_wrapper
    callback(asyncjob, *args, **kwargs)
  File "/usr/share/virt-manager/virtManager/create.py", line 2277, in _do_async_install
    guest.start_install(meter=meter)
  File "/usr/share/virt-manager/virtinst/guest.py", line 501, in start_install
    noboot)
  File "/usr/share/virt-manager/virtinst/guest.py", line 416, in _create_guest
    dom = self.conn.createLinux(start_xml or final_xml, 0)
  File "/usr/lib64/python2.7/site-packages/libvirt.py", line 3595, in createLinux
    if ret is None:raise libvirtError('virDomainCreateLinux() failed', conn=self)
libvirtError: Failed to connect socket to '/var/run/libvirt/virtlogd-sock': No such file or directory

When I went and attempted to start virtlogd.socket manually with systemctl, I got the error:

Jan 14 09:10:28 sgallagh540.sgallagh.rht systemd[1]: virtlogd.socket: Failed to listen on sockets: Permission denied
Jan 14 09:10:28 sgallagh540.sgallagh.rht systemd[1]: Failed to listen on Virtual machine log manager socket.

Examining the SELinux errors, it seems that this denial is to blame.

Version-Release number of selected component:
selinux-policy-3.13.1-165.fc24.noarch

Additional info:
reporter:       libreport-2.6.3
hashmarkername: setroubleshoot
kernel:         4.4.0-1.fc24.x86_64
type:           libreport
Comment 8 Petr Schindler 2016-01-18 12:48:24 EST
Discussed at 2016-01-18 blocker review meeting: [1]. 

This bug was accepted as a Final blocker: This bug violates the final criterion "All system services present after installation with one of the release-blocking package sets must start properly, unless they require hardware which is not present."

[1] http://meetbot.fedoraproject.org/fedora-blocker-review/2016-01-18/f24-blocker-review.2016-01-18-17.02.html
Comment 9 Lukas Vrabec 2016-01-19 09:04:43 EST
*** Bug 1299805 has been marked as a duplicate of this bug. ***
Comment 10 Lukas Vrabec 2016-01-19 09:12:48 EST
Hi, 

Could anyone test this issue with this reproducer:

1. #semanage fcontext -a -t virtd_exec_t /usr/sbin/virtlogd
2. #restorecon -v /usr/sbin/virtlogd
3. reboot system

It looks like this working on my Rawhide system. 

Thank you!
Comment 11 Joachim Frieben 2016-01-19 15:43:33 EST
(In reply to Lukas Vrabec from comment #10)
The suggested action enables virtlogd to start up correctly, thanks!
Comment 12 Jason Taylor 2016-01-19 20:24:16 EST
Description of problem:
Launched virt-manager from GNOME desktop session.

Version-Release number of selected component:
selinux-policy-3.13.1-167.fc24.noarch

Additional info:
reporter:       libreport-2.6.3
hashmarkername: setroubleshoot
kernel:         4.3.3-300.fc23.x86_64
type:           libreport
Comment 13 Elvir Kuric 2016-01-20 03:46:12 EST
(In reply to Lukas Vrabec from comment #10)
> Hi, 
> 
> Could anyone test this issue with this reproducer:
> 
> 1. #semanage fcontext -a -t virtd_exec_t /usr/sbin/virtlogd
> 2. #restorecon -v /usr/sbin/virtlogd
> 3. reboot system
> 
> It looks like this working on my Rawhide system. 
> 
> Thank you!

yes, this works on Rawhide. Tested
Comment 14 Lukas Vrabec 2016-01-20 04:10:35 EST
commit 18f7e12057c5a676209736396b95ece0fdae9faf
Author: Lukas Vrabec <lvrabec@redhat.com>
Date:   Wed Jan 20 10:09:40 2016 +0100

    Label virtlogd binary as virtd_exec_t. BZ(1291940)
Comment 15 Lukas Vrabec 2016-01-20 04:15:15 EST
*** Bug 1296309 has been marked as a duplicate of this bug. ***
Comment 16 Lukas Vrabec 2016-01-20 09:50:01 EST
*** Bug 1293722 has been marked as a duplicate of this bug. ***
Comment 17 Jan Kurik 2016-02-24 10:46:48 EST
This bug appears to have been reported against 'rawhide' during the Fedora 24 development cycle.
Changing version to '24'.

More information and reason for this action is here:
https://fedoraproject.org/wiki/Fedora_Program_Management/HouseKeeping/Fedora24#Rawhide_Rebase
Comment 18 Fedora Update System 2016-03-11 04:56:22 EST
selinux-policy-3.13.1-178.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-1350c96015
Comment 19 Fedora Update System 2016-03-11 14:26:01 EST
selinux-policy-3.13.1-178.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-1350c96015
Comment 20 Fedora Update System 2016-03-16 09:42:28 EDT
selinux-policy-3.13.1-179.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-8f142bb969
Comment 21 Fedora Update System 2016-03-18 10:58:53 EDT
selinux-policy-3.13.1-179.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-8f142bb969
Comment 22 Fedora Update System 2016-03-23 12:54:58 EDT
selinux-policy-3.13.1-179.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.
Comment 23 Anass Ahmed 2016-09-04 10:37:32 EDT
Description of problem:
Always happens after any upgrade (using DNF), SELinux Violation by Systemd.


Additional info:
reporter:       libreport-2.7.2
hashmarkername: setroubleshoot
kernel:         4.6.7-300.fc24.x86_64
type:           libreport
Comment 24 Anass Ahmed 2016-09-04 10:38:56 EDT
This just started to happen recently (3 days ago max.)
Comment 25 Stephen Gallagher 2017-02-06 08:15:19 EST
I'm reopening this, as it's happening to me on a fully-updated Rawhide system right now (selinux-policy-3.13.1-236.fc26.noarch) and attempting to report it via the SELinux Troubleshooter keeps marking it as duplicate of this issue.
Comment 26 Amnon Harel 2017-03-06 08:02:53 EST
Same selinux report on RH25, with Policy RPM:
selinux-policy-3.13.1-224.fc25.noarch 
selinux-policy-3.13.1-225.6.fc25.noarch
Comment 27 Fedora End Of Life 2017-07-25 15:38:42 EDT
This message is a reminder that Fedora 24 is nearing its end of life.
Approximately 2 (two) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 24. 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 '24'.

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 24 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 28 Fedora End Of Life 2017-08-08 08:31:50 EDT
Fedora 24 changed to end-of-life (EOL) status on 2017-08-08. Fedora 24 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.
Comment 29 Adam Williamson 2017-08-10 21:06:25 EDT
Re-opening per #c25; it may not *really* be the same bug, but still.
Comment 30 Айфф 2017-09-05 11:26:10 EDT
Description of problem:
I turn on the computer.

Version-Release number of selected component:
selinux-policy-3.13.1-224.fc25.noarch

Additional info:
reporter:       libreport-2.9.1
hashmarkername: setroubleshoot
kernel:         4.12.9-300.fc26.x86_64
type:           libreport
Comment 31 poikilos 2017-10-28 22:51:34 EDT
Description of problem:
After upgrading from Fedora 25 to 26, this AVC denial message appears. Clicking the details shows that systemd is being blocked from create, read, and unlink. This happens at every login, even after full update of all packges via dnf update.

Version-Release number of selected component:
selinux-policy-3.13.1-224.fc25.noarch

Additional info:
reporter:       libreport-2.9.1
hashmarkername: setroubleshoot
kernel:         4.13.9-200.fc26.x86_64
type:           libreport
Comment 32 Fedora End Of Life 2018-05-03 04:10:14 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.