Bug 1847545

Summary: SELinux is preventing systemd-machine from 'search' accesses on the directory 39170.
Product: [Fedora] Fedora Reporter: Matteo Croce <rootkit85>
Component: selinux-policyAssignee: Zdenek Pytela <zpytela>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: low    
Version: 32CC: dwalsh, grepl.miroslav, lvrabec, mmalik, plautrba, vmojzis, zpytela
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:d634ee467e95822e32bc0fdc7e7f36bce5d31a0b5821e7406dc3ab6673cff7e9;
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-03-09 19:40:30 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1812955    
Bug Blocks:    

Description Matteo Croce 2020-06-16 15:24:35 UTC
Description of problem:
Just `systemctl start systemd-nspawn@distroname`
SELinux is preventing systemd-machine from 'search' accesses on the directory 39170.

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

If you believe that systemd-machine should be allowed search access on the 39170 directory 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:
# ausearch -c 'systemd-machine' --raw | audit2allow -M my-systemdmachine
# semodule -X 300 -i my-systemdmachine.pp

Additional Information:
Source Context                system_u:system_r:systemd_machined_t:s0
Target Context                system_u:system_r:unconfined_service_t:s0
Target Objects                39170 [ dir ]
Source                        systemd-machine
Source Path                   systemd-machine
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
SELinux Policy RPM            selinux-policy-targeted-3.14.5-40.fc32.noarch
Local Policy RPM              selinux-policy-targeted-3.14.5-40.fc32.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Host Name                     (removed)
Platform                      Linux (removed) 5.7.0 #35 SMP Tue Jun 2 01:23:20
                              CEST 2020 x86_64 x86_64
Alert Count                   19
First Seen                    2020-06-12 10:22:01 CEST
Last Seen                     2020-06-16 17:19:58 CEST
Local ID                      e18e0952-8289-4986-9e47-09e0ecc91805

Raw Audit Messages
type=AVC msg=audit(1592320798.71:344): avc:  denied  { search } for  pid=37283 comm="systemd-machine" name="39170" dev="proc" ino=913050 scontext=system_u:system_r:systemd_machined_t:s0 tcontext=system_u:system_r:unconfined_service_t:s0 tclass=dir permissive=0


Hash: systemd-machine,systemd_machined_t,unconfined_service_t,dir,search

Version-Release number of selected component:
selinux-policy-targeted-3.14.5-40.fc32.noarch

Additional info:
component:      selinux-policy
reporter:       libreport-2.13.1
hashmarkername: setroubleshoot
kernel:         5.7.0
type:           libreport

Comment 1 Zdenek Pytela 2021-03-09 19:40:30 UTC

*** This bug has been marked as a duplicate of bug 1900869 ***