Bug 1290962 - lirc fedora 23 AVC denial dac_override
lirc fedora 23 AVC denial dac_override
Status: CLOSED EOL
Product: Fedora
Classification: Fedora
Component: selinux-policy-targeted (Show other bugs)
23
Unspecified Unspecified
medium Severity medium
: ---
: ---
Assigned To: Miroslav Grepl
Ben Levenson
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-12-12 00:55 EST by James Twyford
Modified: 2016-12-20 11:56 EST (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-12-20 11:56:57 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
syslog of lirc failing to start (1.42 KB, text/plain)
2015-12-12 00:55 EST, James Twyford
no flags Details

  None (edit)
Description James Twyford 2015-12-12 00:55:02 EST
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;
Comment 1 Alec Leamas 2015-12-12 02:04:12 EST
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!
Comment 2 Gustavo Maciel Dias Vieira 2015-12-16 14:13:33 EST
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'
Comment 3 Walter Francis 2016-03-31 09:04:38 EDT
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
Comment 4 Fedora End Of Life 2016-11-24 09:11:07 EST
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.
Comment 5 Fedora End Of Life 2016-12-20 11:56:57 EST
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.

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