Bug 1249322

Summary: SELinux is preventing systemd-hostnam from 'read' accesses on the file /memfd:sd-system-systemd-hostnam (deleted).
Product: [Fedora] Fedora Reporter: Igor Gnatenko <ignatenko>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 24CC: dominick.grift, dwalsh, lvrabec, mgrepl, plautrba
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:2de9899028a73318b9885e5f4055e9243e8493b53dbeca0ca1c6ec1052695786
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-07-07 09:31:40 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:    
Bug Blocks: 1254238    

Description Igor Gnatenko 2015-08-01 15:08:32 UTC
Description of problem:
kdbus=1
SELinux is preventing systemd-hostnam from 'read' accesses on the file /memfd:sd-system-systemd-hostnam (deleted).

*****  Plugin restorecon (99.5 confidence) suggests   ************************

If you want to fix the label. 
/memfd:sd-system-systemd-hostnam (deleted) default label should be etc_runtime_t.
Then you can run restorecon.
Do
# /sbin/restorecon -v /memfd:sd-system-systemd-hostnam (deleted)

*****  Plugin catchall (1.49 confidence) suggests   **************************

If you believe that systemd-hostnam should be allowed read access on the memfd:sd-system-systemd-hostnam (deleted) file 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-hostnam /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:systemd_hostnamed_t:s0
Target Context                system_u:object_r:tmpfs_t:s0
Target Objects                /memfd:sd-system-systemd-hostnam (deleted) [ file
                              ]
Source                        systemd-hostnam
Source Path                   systemd-hostnam
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.13.1-138.fc24.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Host Name                     (removed)
Platform                      Linux (removed) 4.2.0-0.rc4.git4.1.fc24.x86_64 #1
                              SMP Fri Jul 31 16:32:22 UTC 2015 x86_64 x86_64
Alert Count                   4
First Seen                    2015-08-01 13:52:40 MSK
Last Seen                     2015-08-01 16:43:54 MSK
Local ID                      73c92544-45d3-4159-a550-45a400e68cff

Raw Audit Messages
type=AVC msg=audit(1438436634.726:3169816): avc:  denied  { read } for  pid=30548 comm="systemd-hostnam" path=2F6D656D66643A73642D73797374656D2D73797374656D642D686F73746E616D202864656C6574656429 dev="tmpfs" ino=3396943 scontext=system_u:system_r:systemd_hostnamed_t:s0 tcontext=system_u:object_r:tmpfs_t:s0 tclass=file permissive=1


Hash: systemd-hostnam,systemd_hostnamed_t,tmpfs_t,file,read

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

Additional info:
reporter:       libreport-2.6.2
hashmarkername: setroubleshoot
kernel:         4.2.0-0.rc4.git4.1.fc24.x86_64
type:           libreport

Comment 1 Jan Kurik 2016-02-24 13:30:55 UTC
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 2 Igor Gnatenko 2016-07-07 09:31:40 UTC
kdbus issue,