Bug 913591 - SELinux is preventing /usr/lib/systemd/systemd-hostnamed from 'getattr' accesses on the file /proc/<pid>/stat.
Summary: SELinux is preventing /usr/lib/systemd/systemd-hostnamed from 'getattr' acces...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 18
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:83f7f4f4b9898a26e8d0725f80d...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-02-21 14:36 UTC by Lene Rasstad
Modified: 2013-02-24 09:01 UTC (History)
7 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2013-02-24 09:01:14 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Lene Rasstad 2013-02-21 14:36:16 UTC
Description of problem:
SELinux is preventing /usr/lib/systemd/systemd-hostnamed from 'getattr' accesses on the file /proc/<pid>/stat.

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

If you believe that systemd-hostnamed should be allowed getattr access on the stat 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                unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1
                              023
Target Objects                /proc/<pid>/stat [ file ]
Source                        systemd-hostnam
Source Path                   /usr/lib/systemd/systemd-hostnamed
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           systemd-197-1.fc18.1.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.11.1-79.fc18.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 3.7.8-202.fc18.x86_64 #1 SMP Fri
                              Feb 15 17:33:07 UTC 2013 x86_64 x86_64
Alert Count                   2
First Seen                    2013-02-21 14:27:55 GMT
Last Seen                     2013-02-21 14:28:20 GMT
Local ID                      324332dc-d2ed-42d6-957c-d89de519dd93

Raw Audit Messages
type=AVC msg=audit(1361456900.622:343): avc:  denied  { getattr } for  pid=1804 comm="systemd-hostnam" path="/proc/1785/stat" dev="proc" ino=26091 scontext=system_u:system_r:systemd_hostnamed_t:s0 tcontext=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 tclass=file


type=SYSCALL msg=audit(1361456900.622:343): arch=x86_64 syscall=fstat success=yes exit=0 a0=5 a1=7fffb54a1680 a2=7fffb54a1680 a3=0 items=0 ppid=1 pid=1804 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,unconfined_t,file,getattr

audit2allow

#============= systemd_hostnamed_t ==============
allow systemd_hostnamed_t unconfined_t:file getattr;

audit2allow -R

#============= systemd_hostnamed_t ==============
allow systemd_hostnamed_t unconfined_t:file getattr;


Additional info:
hashmarkername: setroubleshoot
kernel:         3.7.8-202.fc18.x86_64
type:           libreport

Comment 1 Miroslav Grepl 2013-02-21 18:37:04 UTC
Fixed in selinux-policy-3.11.1-80.fc18.noarch

Comment 2 Fedora Update System 2013-02-22 08:22:03 UTC
selinux-policy-3.11.1-81.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/selinux-policy-3.11.1-81.fc18

Comment 3 sshr 2013-02-23 00:38:56 UTC
System Settings -> Details -> Editing Device name

Package: (null)
OS Release: Fedora release 18 (Spherical Cow)

Comment 4 Daniel 2013-02-23 18:04:06 UTC
details in GNOME system settings is VERY slow and does not display the host name

Package: (null)
OS Release: Fedora release 18 (Spherical Cow)

Comment 5 Fedora Update System 2013-02-24 09:01:16 UTC
selinux-policy-3.11.1-81.fc18 has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.