Bug 671067 - SELinux is preventing /bin/loadkeys from 'open' accesses on the fifo_file Unknown.
Summary: SELinux is preventing /bin/loadkeys from 'open' accesses on the fifo_file Unk...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 14
Hardware: x86_64
OS: Linux
low
medium
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: setroubleshoot_trace_hash:8112a20dbda...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-01-20 06:47 UTC by Mark Harig
Modified: 2011-02-04 08:29 UTC (History)
2 users (show)

Fixed In Version: selinux-policy-3.9.7-28.fc14
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-02-03 20:26:03 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Mark Harig 2011-01-20 06:47:24 UTC
SELinux is preventing /bin/loadkeys from 'open' accesses on the fifo_file Unknown.

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

If you believe that loadkeys should be allowed open access on the Unknown fifo_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 loadkeys /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:loadkeys_t:s0
Target Context                system_u:system_r:initrc_t:s0
Target Objects                Unknown [ fifo_file ]
Source                        loadkeys
Source Path                   /bin/loadkeys
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           kbd-1.15-11.fc14
Target RPM Packages           
Policy RPM                    selinux-policy-3.9.7-20.fc14
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 2.6.35.10-74.fc14.x86_64
                              #1 SMP Thu Dec 23 16:04:50 UTC 2010 x86_64 x86_64
Alert Count                   1
First Seen                    Wed 19 Jan 2011 10:47:39 PM EST
Last Seen                     Wed 19 Jan 2011 10:47:39 PM EST
Local ID                      ef7403a8-844c-4963-b1ca-d673ce96a0e1

Raw Audit Messages
type=AVC msg=audit(1295495259.462:8): avc:  denied  { open } for  pid=1525 comm="loadkeys" dev=pipefs ino=14618 scontext=system_u:system_r:loadkeys_t:s0 tcontext=system_u:system_r:initrc_t:s0 tclass=fifo_file

loadkeys,loadkeys_t,initrc_t,fifo_file,open
type=SYSCALL msg=audit(1295495259.462:8): arch=x86_64 syscall=open success=no exit=EACCES a0=40aa3e a1=0 a2=1a a3=0 items=0 ppid=1517 pid=1525 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm=loadkeys exe=/bin/loadkeys subj=system_u:system_r:loadkeys_t:s0 key=(null)
loadkeys,loadkeys_t,initrc_t,fifo_file,open

#============= loadkeys_t ==============
allow loadkeys_t initrc_t:fifo_file open;

Comment 1 Mark Harig 2011-01-20 06:50:22 UTC
Please let me know if there is more information that I can provide.

Comment 2 Miroslav Grepl 2011-01-20 09:04:44 UTC
Could you add output of

# ps -eZ | grep initrc

Comment 3 Daniel Walsh 2011-01-20 14:42:46 UTC
What application were you running when this happened?  Could be something started by dbus?

Comment 4 Mark Harig 2011-01-20 18:28:28 UTC
(In reply to comment #2)
> Could you add output of
> 
> # ps -eZ | grep initrc

$ ps -eZ|grep initrc
system_u:system_r:initrc_t:s0    1020 ?        00:00:00 system-setup-ke

Comment 5 Mark Harig 2011-01-20 18:36:13 UTC
(In reply to comment #3)
> What application were you running when this happened?  Could be something
> started by dbus?

This occurred shortly after I logged onto Gnome.  I have a Gnome terminal in my Start-up applications, so it had been started automatically (running a bash session).

/bin/loadkeys is included in my /etc/rc.local, so it is run automatically during the booting process.  I have been using this for several years across multiple Fedora releases, only modifying the keyboard map file that I use.

Comment 6 Daniel Walsh 2011-01-20 20:40:58 UTC
There is no problems, it looks like we need policy for system-setup-keyboard.

This avc is reporting that load_keys was opening a fifo_file connection to system-setup-keyboard.

Comment 7 Miroslav Grepl 2011-01-21 09:50:01 UTC
I added this policy to Rawhide sometime ago. I will backport it to F14.

Comment 8 Miroslav Grepl 2011-01-27 15:26:05 UTC
Fixed in selinux-policy-3.9.7-26.fc14

Comment 9 Mark Harig 2011-01-27 18:27:09 UTC
(In reply to comment #8)
> Fixed in selinux-policy-3.9.7-26.fc14

Thank you.  I have selinux-policy-3.9.7-25 installed.  I will check for this fix when the next update is available.

I am assuming that this change will automatically override the local policy that I installed.  Is this assumption correct?

Comment 10 Daniel Walsh 2011-01-27 21:05:39 UTC
Well it will just add the same allow rules again.  After you udpate you should remove your local customizations, to see if they are in the base package.

Comment 11 Fedora Update System 2011-02-02 12:57:49 UTC
selinux-policy-3.9.7-28.fc14 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/selinux-policy-3.9.7-28.fc14

Comment 12 Fedora Update System 2011-02-02 19:31:02 UTC
selinux-policy-3.9.7-28.fc14 has been pushed to the Fedora 14 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update selinux-policy'.  You can provide feedback for this update here: https://admin.fedoraproject.org/updates/selinux-policy-3.9.7-28.fc14

Comment 13 Fedora Update System 2011-02-03 20:25:11 UTC
selinux-policy-3.9.7-28.fc14 has been pushed to the Fedora 14 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 14 Mark Harig 2011-02-04 06:48:39 UTC
(In reply to comment #10)
> Well it will just add the same allow rules again.  After you udpate you should
> remove your local customizations, to see if they are in the base package.

$ sudo semodule -l |grep mypol
mypol  1.0

$ sudo semodule -r mypol
$ sudo semodule -l |grep mypol

After installing 'selinux-policy-3.9.7-28' from the updates-testing repository and rebooting, the problem originally reported no longer occurs.

Comment 15 Miroslav Grepl 2011-02-04 08:29:09 UTC
Great. Thank you.


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