Bug 1574355 - SELinux is preventing loadkeys from 'open' accesses on the chr_file /dev/tty2.
Summary: SELinux is preventing loadkeys from 'open' accesses on the chr_file /dev/tty2.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 28
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Lukas Vrabec
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:f1a7cd4d9b2a7537426f1edf49b...
: 1478492 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-05-03 06:30 UTC by Sandro Bonazzola
Modified: 2018-11-12 16:48 UTC (History)
6 users (show)

Fixed In Version: selinux-policy-3.14.1-29.fc28
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-05-26 20:45:12 UTC
Type: ---


Attachments (Terms of Use)

Description Sandro Bonazzola 2018-05-03 06:30:33 UTC
Description of problem:
SELinux is preventing loadkeys from 'open' accesses on the chr_file /dev/tty2.

*****  Plugin catchall_boolean (89.3 confidence) suggests   ******************

If you want to allow all daemons the ability to read/write terminals
Then รจ necessario informare SELinux abilitando il booleano 'daemons_use_tty' .
Per maggiori informazioni consultare le pagina man di 'loadkeys_selinux'.
Do
setsebool -P daemons_use_tty 1

*****  Plugin catchall (11.6 confidence) suggests   **************************

If you believe that loadkeys should be allowed open access on the tty2 chr_file by default.
Then si dovrebbe riportare il problema come bug.
E' possibile generare un modulo di politica locale per consentire questo accesso.
Do
allow this access for now by executing:
# ausearch -c 'loadkeys' --raw | audit2allow -M my-loadkeys
# semodule -X 300 -i my-loadkeys.pp

Additional Information:
Source Context                system_u:system_r:loadkeys_t:s0
Target Context                unconfined_u:object_r:user_tty_device_t:s0
Target Objects                /dev/tty2 [ chr_file ]
Source                        loadkeys
Source Path                   loadkeys
Port                          <Sconosciuto>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.14.1-24.fc28.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Host Name                     (removed)
Platform                      Linux (removed) 4.16.6-300.fc28.x86_64 #1 SMP Mon
                              Apr 30 14:27:38 UTC 2018 x86_64 x86_64
Alert Count                   1
First Seen                    2018-05-03 08:22:36 CEST
Last Seen                     2018-05-03 08:22:36 CEST
Local ID                      d5bd9662-cb97-4f51-8fc2-e120cf768128

Raw Audit Messages
type=AVC msg=audit(1525328556.928:368): avc:  denied  { open } for  pid=6450 comm="loadkeys" path="/dev/tty2" dev="devtmpfs" ino=3094 scontext=system_u:system_r:loadkeys_t:s0 tcontext=unconfined_u:object_r:user_tty_device_t:s0 tclass=chr_file permissive=1


Hash: loadkeys,loadkeys_t,user_tty_device_t,chr_file,open

Version-Release number of selected component:
selinux-policy-3.14.1-24.fc28.noarch

Additional info:
component:      selinux-policy
reporter:       libreport-2.9.5
hashmarkername: setroubleshoot
kernel:         4.16.6-300.fc28.x86_64
type:           libreport

Potential duplicate: bug 1478492

Comment 1 Lukas Vrabec 2018-05-22 10:11:33 UTC
*** Bug 1478492 has been marked as a duplicate of this bug. ***

Comment 2 Fedora Update System 2018-05-24 14:37:24 UTC
selinux-policy-3.14.1-29.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2018-a74875b364

Comment 3 Fedora Update System 2018-05-25 18:43:24 UTC
selinux-policy-3.14.1-29.fc28 has been pushed to the Fedora 28 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-a74875b364

Comment 4 Fedora Update System 2018-05-26 20:45:12 UTC
selinux-policy-3.14.1-29.fc28 has been pushed to the Fedora 28 stable repository. If problems still persist, please make note of it in this bug report.


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