Created attachment 1104949 [details] syslog of lirc failing to start Description of problem: Trying to start lircd using systemctl results in an AVC denial in a clean Fedora 23 install. AVC avc: denied { dac_override } for pid=3353 comm="lircd" capability=1 scontext=system_u:system_r:lircd_t:s0 Version-Release number of selected component (if applicable): lirc-core-0.9.3a-2.fc23.x86_64 selinux-policy-3.13.1-155.fc23.noarch selinux-policy-targeted-3.13.1-155.fc23.noarch How reproducible: Always Steps to Reproduce: 1. start lirc via systemctl Actual results: lircd fails to start. Full log is in attachment lirc-avc-log.txt Expected results: lirc starts normally Additional info: audit2allow suggests the following. I have not yet edited my local selinux policy to allow this: #============= lircd_t ============== allow lircd_t self:capability dac_override;
This is fixed in selinux-policy upstream (in branch rawhide-contrib). Moving to selinux component to be handled once the upstream changes trickles down. Thanks for reporting!
For completeness, here are all the AVCs created when lircd is started in permissive mode: type=SERVICE_START msg=audit(1450269314.936:626): pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=lircd comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success' type=AVC msg=audit(1450269315.037:627): avc: denied { write } for pid=4728 comm="lircd" name="protocols" dev="sysfs" ino=20593 scontext=system_u:system_r:lircd_t:s0 tcontext=system_u:object_r:sysfs_t:s0 tclass=file permissive=0 type=AVC msg=audit(1450269315.038:628): avc: denied { write } for pid=4728 comm="lircd" name="protocols" dev="sysfs" ino=20593 scontext=system_u:system_r:lircd_t:s0 tcontext=system_u:object_r:sysfs_t:s0 tclass=file permissive=0 type=AVC msg=audit(1450269315.039:629): avc: denied { dac_override } for pid=4728 comm="lircd" capability=1 scontext=system_u:system_r:lircd_t:s0 tcontext=system_u:system_r:lircd_t:s0 tclass=capability permissive=0 type=SERVICE_STOP msg=audit(1450269315.044:630): pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=lircd comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=failed' type=SERVICE_START msg=audit(1450269519.262:633): pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=lircd comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success' type=AVC msg=audit(1450269519.298:634): avc: denied { write } for pid=5036 comm="lircd" name="protocols" dev="sysfs" ino=20593 scontext=system_u:system_r:lircd_t:s0 tcontext=system_u:object_r:sysfs_t:s0 tclass=file permissive=1 type=AVC msg=audit(1450269519.300:635): avc: denied { dac_override } for pid=5036 comm="lircd" capability=1 scontext=system_u:system_r:lircd_t:s0 tcontext=system_u:system_r:lircd_t:s0 tclass=capability permissive=1 type=AVC msg=audit(1450269519.301:636): avc: denied { read } for pid=5036 comm="lircd" name="passwd" dev="sda1" ino=806190 scontext=system_u:system_r:lircd_t:s0 tcontext=system_u:object_r:passwd_file_t:s0 tclass=file permissive=1 type=AVC msg=audit(1450269519.301:637): avc: denied { open } for pid=5036 comm="lircd" path="/etc/passwd" dev="sda1" ino=806190 scontext=system_u:system_r:lircd_t:s0 tcontext=system_u:object_r:passwd_file_t:s0 tclass=file permissive=1 type=AVC msg=audit(1450269519.301:638): avc: denied { getattr } for pid=5036 comm="lircd" path="/etc/passwd" dev="sda1" ino=806190 scontext=system_u:system_r:lircd_t:s0 tcontext=system_u:object_r:passwd_file_t:s0 tclass=file permissive=1 type=AVC msg=audit(1450269519.303:639): avc: denied { setgid } for pid=5036 comm="lircd" capability=6 scontext=system_u:system_r:lircd_t:s0 tcontext=system_u:system_r:lircd_t:s0 tclass=capability permissive=1 type=AVC msg=audit(1450269519.303:640): avc: denied { setuid } for pid=5036 comm="lircd" capability=7 scontext=system_u:system_r:lircd_t:s0 tcontext=system_u:system_r:lircd_t:s0 tclass=capability permissive=1 type=SERVICE_STOP msg=audit(1450269662.765:641): pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=lircd comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
It's been several months since this was fixed upstream, but it's still an issue in current F23 packages. Did this possibly get missed? This is what I've seen today, based on feedback from a user on IRC when attempting to start lircd # ausearch -m avc -ts recent ---- time->Thu Mar 31 08:57:17 2016 type=AVC msg=audit(1459429037.814:488): avc: denied { dac_override } for pid=16867 comm="lircd" capability=1 scontext=system_u:system_r:lircd_t:s0 tcontext=system_u:system_r:lircd_t:s0 tclass=capability permissive=0 ---- time->Thu Mar 31 08:58:57 2016 type=AVC msg=audit(1459429137.590:501): avc: denied { read } for pid=17116 comm="lircd" name="passwd" dev="dm-1" ino=144985 scontext=system_u:system_r:lircd_t:s0 tcontext=system_u:object_r:passwd_file_t:s0 tclass=file permissive=0 ---- time->Thu Mar 31 08:58:57 2016 type=AVC msg=audit(1459429137.591:502): avc: denied { search } for pid=17116 comm="lircd" name="sss" dev="dm-1" ino=144792 scontext=system_u:system_r:lircd_t:s0 tcontext=system_u:object_r:sssd_var_lib_t:s0 tclass=dir permissive=0 ---- time->Thu Mar 31 08:58:57 2016 type=AVC msg=audit(1459429137.591:503): avc: denied { search } for pid=17116 comm="lircd" name="sss" dev="dm-1" ino=144792 scontext=system_u:system_r:lircd_t:s0 tcontext=system_u:object_r:sssd_var_lib_t:s0 tclass=dir permissive=0 ---- time->Thu Mar 31 08:58:57 2016 type=AVC msg=audit(1459429137.591:504): avc: denied { search } for pid=17116 comm="lircd" name="sss" dev="dm-1" ino=144792 scontext=system_u:system_r:lircd_t:s0 tcontext=system_u:object_r:sssd_var_lib_t:s0 tclass=dir permissive=0
This message is a reminder that Fedora 23 is nearing its end of life. Approximately 4 (four) weeks from now Fedora will stop maintaining and issuing updates for Fedora 23. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a Fedora 'version' of '23'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 23 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete.
Fedora 23 changed to end-of-life (EOL) status on 2016-12-20. Fedora 23 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora please feel free to reopen this bug against that version. If you are unable to reopen this bug, please file a new report against the current release. If you experience problems, please add a comment to this bug. Thank you for reporting this bug and we are sorry it could not be fixed.