Description of problem: SELinux is preventing (upowerd) from 'mounton' accesses on the directory /var/lib/upower. ***** Plugin catchall (100. confidence) suggests ************************** If you believe that (upowerd) should be allowed mounton access on the upower directory 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 '(upowerd)' --raw | audit2allow -M my-upowerd # semodule -X 300 -i my-upowerd.pp Additional Information: Source Context system_u:system_r:init_t:s0 Target Context system_u:object_r:devicekit_var_lib_t:s0 Target Objects /var/lib/upower [ dir ] Source (upowerd) Source Path (upowerd) Port <Unknown> Host (removed) Source RPM Packages Target RPM Packages upower-0.99.8-1.fc29.x86_64 Policy RPM selinux-policy-3.14.2-25.fc29.noarch Selinux Enabled True Policy Type targeted Enforcing Mode Enforcing Host Name (removed) Platform Linux (removed) 4.18.0-0.rc0.git9.1.fc29.x86_64 #1 SMP Thu Jun 14 18:07:49 UTC 2018 x86_64 x86_64 Alert Count 5 First Seen 2018-06-21 20:30:28 +05 Last Seen 2018-06-21 20:35:57 +05 Local ID 96099458-82a0-42c4-922a-32507b36b150 Raw Audit Messages type=AVC msg=audit(1529595357.75:178): avc: denied { mounton } for pid=1193 comm="(upowerd)" path="/var/lib/upower" dev="sda1" ino=6160594 scontext=system_u:system_r:init_t:s0 tcontext=system_u:object_r:devicekit_var_lib_t:s0 tclass=dir permissive=0 Hash: (upowerd),init_t,devicekit_var_lib_t,dir,mounton Version-Release number of selected component: selinux-policy-3.14.2-25.fc29.noarch Additional info: component: selinux-policy reporter: libreport-2.9.5 hashmarkername: setroubleshoot kernel: 4.18.0-0.rc0.git9.1.fc29.x86_64 type: libreport
Same problem here, since 4.17.2-100.fc27.x86_64 kernel update. The upower.service throws the following log: upowerd[1216]: failed to get data: Failed to open file “/var/lib/upower/history-rate-ASUS_Battery-56.dat”: Permission denied upowerd[1216]: failed to get data: Failed to open file “/var/lib/upower/history-charge-ASUS_Battery-56.dat”: Permission denied upowerd[1216]: failed to get data: Failed to open file “/var/lib/upower/history-time-full-ASUS_Battery-56.dat”: Permission denied upowerd[1216]: failed to get data: Failed to open file “/var/lib/upower/history-time-empty-ASUS_Battery-56.dat”: Permission denied upowerd[1216]: cannot open '/dev/input/event0': Permission denied systemd[1]: Started Daemon for power management. upowerd[1216]: Failed to create object manager for BlueZ: GDBus.Error:org.freedesktop.DBus.Error.AccessDenied: An SELinux policy prevents this sender from sending this message to this recipie upowerd[1216]: failed to set data: Failed to create file “/var/lib/upower/history-rate-ASUS_Battery-56.dat.YG3MLZ”: Permission denied upowerd[1216]: failed to set data: Failed to create file “/var/lib/upower/history-rate-ASUS_Battery-56.dat.MUMMLZ”: Permission denied upowerd[1216]: failed to set data: Failed to create file “/var/lib/upower/history-rate-ASUS_Battery-56.dat.AI59KZ”: Permission denied
Description of problem: On an up-to date rawhide system, after full relabel and another reboot just to be sure Version-Release number of selected component: selinux-policy-3.14.2-26.fc29.noarch Additional info: reporter: libreport-2.9.5 hashmarkername: setroubleshoot kernel: 4.18.0-0.rc2.git3.1.fc29.x86_64 type: libreport
I can still see similar AVC on rawhide type=PROCTITLE msg=audit(08/01/2018 11:20:41.773:4536) : proctitle=(upowerd) type=PATH msg=audit(08/01/2018 11:20:41.773:4536) : item=1 name=/run/systemd/inaccessible/reg inode=16407 dev=00:17 mode=file,000 ouid=root ogid=root rdev=00:00 obj=system_u:object_r:init_var_run_t:s0 nametype=NORMAL cap_fp=none cap_fi=none cap_fe=0 cap_fver=0 type=PATH msg=audit(08/01/2018 11:20:41.773:4536) : item=0 name=/run/systemd/unit-root/proc/kallsyms inode=4026532080 dev=00:04 mode=file,444 ouid=root ogid=root rdev=00:00 obj=system_u:object_r:system_map_t:s0 nametype=NORMAL cap_fp=none cap_fi=none cap_fe=0 cap_fver=0 type=CWD msg=audit(08/01/2018 11:20:41.773:4536) : cwd=/ type=SYSCALL msg=audit(08/01/2018 11:20:41.773:4536) : arch=x86_64 syscall=mount success=yes exit=0 a0=0x7f3ec3ddf845 a1=0x5606937d9f30 a2=0x0 a3=MS_BIND|MS_REC items=2 ppid=1 pid=4185 auid=unset uid=root gid=root euid=root suid=root fsuid=root egid=root sgid=root fsgid=root tty=(none) ses=unset comm=(upowerd) exe=/usr/lib/systemd/systemd subj=system_u:system_r:init_t:s0 key=(null) type=AVC msg=audit(08/01/2018 11:20:41.773:4536) : avc: denied { mounton } for pid=4185 comm=(upowerd) path=/run/systemd/unit-root/proc/kallsyms dev="proc" ino=4026532080 scontext=system_u:system_r:init_t:s0 tcontext=system_u:object_r:system_map_t:s0 tclass=file permissive=1 ---- type=PROCTITLE msg=audit(08/01/2018 11:20:41.788:4537) : proctitle=(upowerd) type=PATH msg=audit(08/01/2018 11:20:41.788:4537) : item=1 name=/run/systemd/unit-root/var/lib/upower inode=100400 dev=00:29 mode=dir,755 ouid=root ogid=root rdev=00:00 obj=system_u:object_r:devicekit_var_lib_t:s0 nametype=NORMAL cap_fp=none cap_fi=none cap_fe=0 cap_fver=0 type=PATH msg=audit(08/01/2018 11:20:41.788:4537) : item=0 name=/run/systemd/unit-root/var/lib/upower inode=100400 dev=00:29 mode=dir,755 ouid=root ogid=root rdev=00:00 obj=system_u:object_r:devicekit_var_lib_t:s0 nametype=NORMAL cap_fp=none cap_fi=none cap_fe=0 cap_fver=0 type=CWD msg=audit(08/01/2018 11:20:41.788:4537) : cwd=/ type=SYSCALL msg=audit(08/01/2018 11:20:41.788:4537) : arch=x86_64 syscall=mount success=yes exit=0 a0=0x56069376d450 a1=0x56069376d450 a2=0x0 a3=MS_BIND|MS_REC items=2 ppid=1 pid=4185 auid=unset uid=root gid=root euid=root suid=root fsuid=root egid=root sgid=root fsgid=root tty=(none) ses=unset comm=(upowerd) exe=/usr/lib/systemd/systemd subj=system_u:system_r:init_t:s0 key=(null) type=AVC msg=audit(08/01/2018 11:20:41.788:4537) : avc: denied { mounton } for pid=4185 comm=(upowerd) path=/run/systemd/unit-root/var/lib/upower dev="dm-1" ino=100400 scontext=system_u:system_r:init_t:s0 tcontext=system_u:object_r:devicekit_var_lib_t:s0 tclass=dir permissive=1 But I cannot see directory /run/systemd/unit-root/var/lib/upower even in permissive mode.
This bug appears to have been reported against 'rawhide' during the Fedora 29 development cycle. Changing version to '29'.
*** Bug 1622112 has been marked as a duplicate of this bug. ***
*** Bug 1622110 has been marked as a duplicate of this bug. ***
*** Bug 1618514 has been marked as a duplicate of this bug. ***
*** Bug 1594018 has been marked as a duplicate of this bug. ***
selinux-policy-3.14.2-34.fc29 has been submitted as an update to Fedora 29. https://bodhi.fedoraproject.org/updates/FEDORA-2018-db240a1726
selinux-policy-3.14.2-34.fc29 has been pushed to the Fedora 29 stable repository. If problems still persist, please make note of it in this bug report.