Bug 1662922
Summary: | SELinux is preventing sensord from 'getattr' accesses on the file /sys/devices/platform/thinkpad_hwmon/hwmon/hwmon2/fan1_input. | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | accounts |
Component: | selinux-policy | Assignee: | Lukas Vrabec <lvrabec> |
Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | medium | Docs Contact: | |
Priority: | high | ||
Version: | 29 | CC: | dwalsh, lvrabec, mgrepl, mmalik, plautrba, zpytela |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | x86_64 | ||
OS: | Linux | ||
Whiteboard: | abrt_hash:939317a1c5c4720ddba9131048377695576c60cc53d8069a23b0e559f1719393; | ||
Fixed In Version: | selinux-policy-3.14.2-46.fc29 | Doc Type: | If docs needed, set a value |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2019-01-17 02:16:57 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
accounts
2019-01-02 12:27:45 UTC
The sensord process should not run as lsmd_t, but it does, because SELinux policy contains an incorrect file context pattern: # semanage fcontext -l | grep sensord-service /usr/libexec/lm_sensors/sensord-service-wrapper regular file system_u:object_r:lsmd_exec_t:s0 # The file context pattern should look this way: # semanage fcontext -l | grep sensord-service /usr/libexec/lm_sensors/sensord-service-wrapper regular file system_u:object_r:sensord_exec_t:s0 # Because lsmd_t is dedicated to lib storage management processes and it has nothing to do with sensord. If it helps, system was originally setup at Fedora 25, upgraded to 27 and now 29. How would I change the SE context of the system service? # semanage fcontext -a -t sensord_exec_t /usr/libexec/lm_sensors/sensord-service-wrapper Unfortunately, above-mentioned file context pattern does not solve the problem completely. Following SELinux rules are needed too: # cat mypolicy.cil ( allow sensord_t passwd_file_t ( file ( getattr open read ))) ( allow sensord_t sensord_exec_t ( file ( execute_no_trans ))) ( allow sensord_t shell_exec_t ( file ( map execute ))) ( allow sensord_t sssd_public_t ( dir ( search ))) ( allow sensord_t sssd_public_t ( file ( getattr open read map ))) ( allow sensord_t sssd_t ( unix_stream_socket ( connectto ))) ( allow sensord_t sssd_var_lib_t ( dir ( search ))) ( allow sensord_t sssd_var_lib_t ( sock_file ( write ))) # semodule -i mypolicy.cil # I'm using this ^^^ until an official fix becomes available. commit 8e8625f44d6144fe70c2c3a335ef622b4052c16a (HEAD -> rawhide) Author: Lukas Vrabec <lvrabec> Date: Wed Jan 9 13:28:28 2019 +0100 Change label of /usr/libexec/lm_sensors/sensord-service-wrapper from lsmd_exec_t to sensord_exec_t BZ(1662922) selinux-policy-3.14.2-46.fc29 has been submitted as an update to Fedora 29. https://bodhi.fedoraproject.org/updates/FEDORA-2019-6a20cfef61 selinux-policy-3.14.2-46.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-6a20cfef61 selinux-policy-3.14.2-46.fc29 has been pushed to the Fedora 29 stable repository. If problems still persist, please make note of it in this bug report. |