Bug 1000665

Summary: SELinux is preventing /usr/lib/systemd/systemd-hostnamed from 'getattr' accesses on the file /proc/cpuinfo.
Product: [Fedora] Fedora Reporter: Moez Roy <moez.roy>
Component: selinux-policyAssignee: Lukas Vrabec <lvrabec>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: dominick.grift, dwalsh, lvrabec, menzinoah, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:ff6815a9338e9389d16c03ec1fd3388540407a286e4290831079fafd6a0ae0d1
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-08-27 10:56: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:

Description Moez Roy 2013-08-24 04:08:56 UTC
Description of problem:
SELinux is preventing /usr/lib/systemd/systemd-hostnamed from 'getattr' accesses on the file /proc/cpuinfo.

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

If you believe that systemd-hostnamed should be allowed getattr access on the cpuinfo 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:proc_t:s0
Target Objects                /proc/cpuinfo [ file ]
Source                        systemd-hostnam
Source Path                   /usr/lib/systemd/systemd-hostnamed
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           systemd-204-9.fc19.x86_64
                              systemd-206-6.fc21.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.12.1-71.fc19.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 3.10.9-200.fc19.x86_64 #1 SMP Wed
                              Aug 21 19:27:58 UTC 2013 x86_64 x86_64
Alert Count                   1
First Seen                    2013-08-23 21:07:02 PDT
Last Seen                     2013-08-23 21:07:02 PDT
Local ID                      095b4c59-1dd7-41b2-ad63-1ef80cdbc757

Raw Audit Messages
type=AVC msg=audit(1377317222.682:42): avc:  denied  { getattr } for  pid=22083 comm="systemd-hostnam" path="/proc/cpuinfo" dev="proc" ino=4026532023 scontext=system_u:system_r:systemd_hostnamed_t:s0 tcontext=system_u:object_r:proc_t:s0 tclass=file


type=SYSCALL msg=audit(1377317222.682:42): arch=x86_64 syscall=fstat success=yes exit=0 a0=5 a1=7fff144cf130 a2=7fff144cf130 a3=0 items=0 ppid=1 pid=22083 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 ses=4294967295 tty=(none) comm=systemd-hostnam exe=/usr/lib/systemd/systemd-hostnamed subj=system_u:system_r:systemd_hostnamed_t:s0 key=(null)

Hash: systemd-hostnam,systemd_hostnamed_t,proc_t,file,getattr

Additional info:
reporter:       libreport-2.1.6
hashmarkername: setroubleshoot
kernel:         3.10.9-200.fc19.x86_64
type:           libreport

Comment 4 Miroslav Grepl 2013-08-27 10:56:30 UTC
Actually this is allowed. I believe this is a problem with not fully upgraded system to rawhide. I see you have


Source RPM Packages           systemd-204-9.fc19.x86_64
                              systemd-206-6.fc21.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.12.1-71.fc19.noarch

Please upgrade your system.

Comment 5 Miroslav Grepl 2013-09-09 18:49:29 UTC
*** Bug 1004921 has been marked as a duplicate of this bug. ***