Bug 1483632

Summary: selinux alert against tclass=chr_file
Product: [Fedora] Fedora Reporter: Dominic P Geevarghese <dominicpg>
Component: selinux-policyAssignee: Lukas Vrabec <lvrabec>
Status: CLOSED EOL QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 27CC: dwalsh, lsm5, lvrabec, mgrepl, plautrba
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: selinux-policy-3.13.1-276.fc27 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-11-30 22:36:47 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Dominic P Geevarghese 2017-08-21 14:11:53 UTC
Description of problem:

In a freshly installed machine, noticed following AVC deny message 

type=AVC msg=audit(1503253887.689:150): avc:  denied  { read write } for  pid=1 comm="systemd" path="/dev/dri/card0" dev="devtmpfs" ino=13042 scontext=system_u:system_r:init_t:s0 tcontext=system_u:object_r:dri_d
evice_t:s0 tclass=chr_file permissive=0
type=AVC msg=audit(1503253887.908:179): avc:  denied  { read write } for  pid=1 comm="systemd" path="/dev/input/event0" dev="devtmpfs" ino=11143 scontext=system_u:system_r:init_t:s0 tcontext=system_u:object_r:event_device_t:s0 tclass=chr_file permissive=0
type=AVC msg=audit(1503253887.911:180): avc:  denied  { read write } for  pid=1 comm="systemd" path="/dev/input/event1" dev="devtmpfs" ino=11144 scontext=system_u:system_r:init_t:s0 tcontext=system_u:object_r:event_device_t:s0 tclass=chr_file permissive=0
type=AVC msg=audit(1503253887.912:181): avc:  denied  { read write } for  pid=1 comm="systemd" path="/dev/input/event2" dev="devtmpfs" ino=13728 scontext=system_u:system_r:init_t:s0 tcontext=system_u:object_r:event_device_t:s0 tclass=chr_file permissive=0
type=AVC msg=audit(1503254274.172:105): avc:  denied  { map } for  pid=725 comm="abrt-dump-journ" path="/var/lib/sss/mc/passwd" dev="dm-0" ino=162205 scontext=system_u:system_r:abrt_dump_oops_t:s0 tcontext=syste
m_u:object_r:sssd_public_t:s0 tclass=file permissive=0
type=AVC msg=audit(1503254279.650:217): avc:  denied  { read write } for  pid=1 comm="systemd" path="/dev/input/event3" dev="devtmpfs" ino=25268 scontext=system_u:system_r:init_t:s0 tcontext=system_u:object_r:ev
ent_device_t:s0 tclass=chr_file permissive=0


Version-Release number of selected component (if applicable):

Fedora-Workstation-Live-x86_64-27-20170817.n.3

selinux-policy-3.13.1-272.fc27.noarch
selinux-policy-targeted-3.13.1-272.fc27.noarch
libselinux-utils-2.7-1.fc27.x86_64
libselinux-python3-2.7-1.fc27.x86_64


How reproducible:

Always

Steps to Reproduce:
1. Install Fedora_27_Branched_20170817.n.3
2. Post installation, check audit logs

Actual results:

No AVC deny message 

Expected results:

There shouldn't be any AVC deny message 

Additional info:

I have noticed following selinux warning while installing 

[root@pxeks ~]# pvscan 
/etc/selinux/targeted/contexts/files/file_contexts.bin:  line 1 error due to: Non-ASCII characters found
/etc/selinux/targeted/contexts/files/file_contexts.homedirs.bin:  line 1 error due to: Non-ASCII characters found
  PV /dev/sda2   VG fedora          lvm2 [<9.00 GiB / 0    free]
  Total: 1 [<9.00 GiB] / in use: 1 [<9.00 GiB] / in no VG: 0 [0   ]

[root@pxeks ~]# ls -lZ /dev/dri/card0 
crw-rw----+ 1 root video system_u:object_r:dri_device_t:s0 226, 0 Aug 21 18:01 /dev/dri/card0
[root@pxeks ~]# 
[root@pxeks ~]# ls -lZ /dev/input/event*
crw-rw----. 1 root input system_u:object_r:event_device_t:s0 13, 64 Aug 21 18:01 /dev/input/event0
crw-rw----. 1 root input system_u:object_r:event_device_t:s0 13, 65 Aug 21 18:01 /dev/input/event1
crw-rw----. 1 root input system_u:object_r:event_device_t:s0 13, 66 Aug 21 18:01 /dev/input/event2



Thanks, 
Dominic Geevarghese
4096R/43EACB09

Comment 1 Lukas Vrabec 2017-08-28 08:45:10 UTC
[root@fraw ~]# audit2allow -i avc 


#============= init_t ==============

#!!!! This avc is allowed in the current policy
allow init_t event_device_t:chr_file { read write };

Comment 2 Dominic P Geevarghese 2017-08-28 09:17:14 UTC
(In reply to Lukas Vrabec from comment #1)
That's great new. thanks.

Comment 3 Ben Cotton 2018-11-27 14:35:18 UTC
This message is a reminder that Fedora 27 is nearing its end of life.
On 2018-Nov-30  Fedora will stop maintaining and issuing updates for
Fedora 27. 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 '27'.

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 27 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 4 Ben Cotton 2018-11-30 22:36:47 UTC
Fedora 27 changed to end-of-life (EOL) status on 2018-11-30. Fedora 27 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.