Bug 1542903 - SELinux is preventing hostname from read, write access on the chr_file /dev/ttyUSB1.
Summary: SELinux is preventing hostname from read, write access on the chr_file /dev/t...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 27
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Lukas Vrabec
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:117cc0ced4e1a27f51ee21e5679...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-02-07 10:17 UTC by Jonas Jonsson
Modified: 2018-03-20 18:17 UTC (History)
5 users (show)

Fixed In Version: selinux-policy-3.13.1-283.28.fc27
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-03-20 18:17:59 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Jonas Jonsson 2018-02-07 10:17:58 UTC
Description of problem:
SELinux is preventing hostname from read, write access on the chr_file /dev/ttyUSB1.

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

If you believe that hostname should be allowed read write access on the ttyUSB1 chr_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:
# ausearch -c 'hostname' --raw | audit2allow -M my-hostname
# semodule -X 300 -i my-hostname.pp

Additional Information:
Source Context                unconfined_u:system_r:hostname_t:s0
Target Context                system_u:object_r:usbtty_device_t:s0
Target Objects                /dev/ttyUSB1 [ chr_file ]
Source                        hostname
Source Path                   hostname
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    <Unknown>
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 4.12.8-300.fc26.x86_64 #1 SMP Thu
                              Aug 17 15:30:20 UTC 2017 x86_64 x86_64
Alert Count                   2054
First Seen                    2017-09-11 20:28:14 CEST
Last Seen                     2017-09-13 20:02:19 CEST
Local ID                      d3c84549-37ba-4a6a-81db-c1840c5b7ece

Raw Audit Messages
type=AVC msg=audit(1505325739.477:57721): avc:  denied  { read write } for  pid=21108 comm="hostname" path="/dev/ttyUSB1" dev="devtmpfs" ino=7550467 scontext=unconfined_u:system_r:hostname_t:s0 tcontext=system_u:object_r:usbtty_device_t:s0 tclass=chr_file permissive=0


Hash: hostname,hostname_t,usbtty_device_t,chr_file,read,write


Additional info:
component:      selinux-policy
reporter:       libreport-2.9.3
hashmarkername: setroubleshoot
kernel:         4.14.14-300.fc27.x86_64
type:           libreport

Comment 1 Fedora Update System 2018-03-12 18:13:50 UTC
selinux-policy-3.13.1-283.28.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2018-32ebae3424

Comment 2 Fedora Update System 2018-03-12 18:19:53 UTC
selinux-policy-3.13.1-283.28.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2018-32ebae3424

Comment 3 Fedora Update System 2018-03-14 01:36:27 UTC
selinux-policy-3.13.1-283.28.fc27 has been pushed to the Fedora 27 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-32ebae3424

Comment 4 Fedora Update System 2018-03-20 18:17:59 UTC
selinux-policy-3.13.1-283.28.fc27 has been pushed to the Fedora 27 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.