Bug 912387

Summary: SELinux is preventing /usr/lib/systemd/systemd-localed from 'write' accesses on the chr_file kmsg.
Product: [Fedora] Fedora Reporter: Michal Nowak <mnowak>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 18CC: dominick.grift, dwalsh, metanoite, mgrepl, mitr, piyota1976, zalatik
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:bb87aac47931c41fb01dbfcedfe6a0c5611a6270d1eac71602754ffb280ae4d1
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-02-20 04:01: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:

Description Michal Nowak 2013-02-18 15:15:37 UTC
Description of problem:
Returned from hibernation, started LO Writer, and fiddled with System Settings via GNOME tool.
SELinux is preventing /usr/lib/systemd/systemd-localed from 'write' accesses on the chr_file kmsg.

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

If you believe that systemd-localed should be allowed write access on the kmsg chr_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-localed /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:systemd_localed_t:s0
Target Context                system_u:object_r:kmsg_device_t:s0
Target Objects                kmsg [ chr_file ]
Source                        systemd-localed
Source Path                   /usr/lib/systemd/systemd-localed
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           systemd-197-1.fc18.1.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.11.1-78.fc18.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 3.7.6-201.fc18.x86_64 #1 SMP Mon
                              Feb 4 15:54:08 UTC 2013 x86_64 x86_64
Alert Count                   1
First Seen                    2013-02-18 16:13:21 CET
Last Seen                     2013-02-18 16:13:21 CET
Local ID                      686cb5d4-9387-4206-b1fe-64795c3ab4fb

Raw Audit Messages
type=AVC msg=audit(1361200401.798:164): avc:  denied  { write } for  pid=27813 comm="systemd-localed" name="kmsg" dev="devtmpfs" ino=1034 scontext=system_u:system_r:systemd_localed_t:s0 tcontext=system_u:object_r:kmsg_device_t:s0 tclass=chr_file


type=SYSCALL msg=audit(1361200401.798:164): arch=x86_64 syscall=open success=no exit=EACCES a0=7f47551e2846 a1=80101 a2=0 a3=7f47543fb960 items=0 ppid=1 pid=27813 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 ses=4294967295 tty=(none) comm=systemd-localed exe=/usr/lib/systemd/systemd-localed subj=system_u:system_r:systemd_localed_t:s0 key=(null)

Hash: systemd-localed,systemd_localed_t,kmsg_device_t,chr_file,write

audit2allow

#============= systemd_localed_t ==============
allow systemd_localed_t kmsg_device_t:chr_file write;

audit2allow -R

#============= systemd_localed_t ==============
allow systemd_localed_t kmsg_device_t:chr_file write;


Additional info:
hashmarkername: setroubleshoot
kernel:         3.7.6-201.fc18.x86_64
type:           libreport

Comment 1 Daniel Walsh 2013-02-18 15:52:17 UTC
6599aee52b2f3b4965bdad395cf7d74c2ecb5d27 fixes this in Rawhide.

Comment 2 Miroslav Grepl 2013-02-18 17:51:02 UTC
Backported.

Comment 3 Fedora Update System 2013-02-19 09:29:57 UTC
selinux-policy-3.11.1-79.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/selinux-policy-3.11.1-79.fc18

Comment 4 Miloslav Trmač 2013-02-19 12:13:29 UTC
Tried to edit keyboard layout in GNOME control center

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

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