Description of problem: Using a USB->serial console SELinux is preventing systemd-getty-g from read, write access on the chr_file ttyUSB0. ***** Plugin catchall (100. confidence) suggests ************************** If you believe that systemd-getty-g should be allowed read write access on the ttyUSB0 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 'systemd-getty-g' --raw | audit2allow -M my-systemdgettyg # semodule -X 300 -i my-systemdgettyg.pp Additional Information: Source Context system_u:system_r:init_t:s0 Target Context system_u:object_r:usbtty_device_t:s0 Target Objects ttyUSB0 [ chr_file ] Source systemd-getty-g Source Path systemd-getty-g Port <Unknown> Host (removed) Source RPM Packages Target RPM Packages Policy RPM selinux-policy-3.14.2-42.fc29.noarch Selinux Enabled True Policy Type targeted Enforcing Mode Enforcing Host Name (removed) Platform Linux (removed) 4.18.16-300.fc29.x86_64 #1 SMP Sat Oct 20 23:24:08 UTC 2018 x86_64 x86_64 Alert Count 26 First Seen 2018-11-01 13:54:07 EDT Last Seen 2018-12-02 17:42:02 EST Local ID 9fa5ce61-6e63-42e5-9a0d-7b10d1c1cdc0 Raw Audit Messages type=AVC msg=audit(1543790522.268:8177): avc: denied { read write } for pid=24046 comm="systemd-getty-g" name="ttyUSB0" dev="devtmpfs" ino=19115 scontext=system_u:system_r:init_t:s0 tcontext=system_u:object_r:usbtty_device_t:s0 tclass=chr_file permissive=0 Hash: systemd-getty-g,init_t,usbtty_device_t,chr_file,read,write Version-Release number of selected component: selinux-policy-3.14.2-42.fc29.noarch Additional info: component: selinux-policy reporter: libreport-2.9.7 hashmarkername: setroubleshoot kernel: 4.19.13-300.fc29.x86_64 type: libreport
Opened a pull request granting granting the missing permission: https://github.com/fedora-selinux/selinux-policy/pull/239
Merged. commit db4a060a02e6caa5bbf89f8f08d521831b80f771 (HEAD -> rawhide, origin/rawhide) Author: Zdenek Pytela <zpytela> Date: Fri Jan 11 16:58:54 2019 +0100 Allow init_t domain access to USB ttys BZ(1663620) Character device files for USB terminals have a particular usbtty_device_t type. When a USB device is used as a serial console, systemd-getty-generator running in init_t domain needs to have access to it, similar to terminals with a different type. Fedoras 29 and 28 are affected. Signed-off-by: Zdenek Pytela <zpytela>
selinux-policy-3.14.2-53.fc29 has been submitted as an update to Fedora 29. https://bodhi.fedoraproject.org/updates/FEDORA-2019-bf377d92c7
selinux-policy-3.14.2-53.fc29 has been pushed to the Fedora 29 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-2019-bf377d92c7
selinux-policy-3.14.2-53.fc29 has been pushed to the Fedora 29 stable repository. If problems still persist, please make note of it in this bug report.