Description of problem: SELinux is preventing /usr/libexec/upowerd from using the 'nnp_transition' accesses on a process. ***** Plugin catchall (100. confidence) suggests ************************** If you believe that upowerd should be allowed nnp_transition access on processes labeled devicekit_power_t 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:system_r:devicekit_power_t:s0 Target Objects /lib64/ld-linux-x86-64.so.2 [ process2 ] Source upowerd Source Path /usr/libexec/upowerd Port <Unknown> Host (removed) Source RPM Packages upower-0.99.8-1.fc29.x86_64 Target RPM Packages glibc-2.27.9000-27.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.16.16-300.fc28.x86_64 #1 SMP Sun Jun 17 03:02:42 UTC 2018 x86_64 x86_64 Alert Count 1 First Seen 2018-06-26 12:26:44 CEST Last Seen 2018-06-26 12:26:44 CEST Local ID bec01f5f-c953-4517-bcc7-8c90358a5496 Raw Audit Messages type=AVC msg=audit(1530008804.387:316): avc: denied { nnp_transition } for pid=2754 comm="(upowerd)" scontext=system_u:system_r:init_t:s0 tcontext=system_u:system_r:devicekit_power_t:s0 tclass=process2 permissive=0 type=SYSCALL msg=audit(1530008804.387:316): arch=x86_64 syscall=execve success=yes exit=0 a0=558e17e5f0a0 a1=558e17d3a6a0 a2=558e17e6c6d0 a3=558e17e6db40 items=2 ppid=1 pid=2754 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm=upowerd exe=/usr/libexec/upowerd subj=system_u:system_r:init_t:s0 key=(null) type=CWD msg=audit(1530008804.387:316): cwd=/ type=PATH msg=audit(1530008804.387:316): item=0 name=/usr/libexec/upowerd inode=12334059 dev=00:29 mode=0100755 ouid=0 ogid=0 rdev=00:00 obj=system_u:object_r:devicekit_power_exec_t:s0 nametype=NORMAL cap_fp=0000000000000000 cap_fi=0000000000000000 cap_fe=0 cap_fver=0 type=PATH msg=audit(1530008804.387:316): item=1 name=/lib64/ld-linux-x86-64.so.2 inode=12293406 dev=00:29 mode=0100755 ouid=0 ogid=0 rdev=00:00 obj=system_u:object_r:ld_so_t:s0 nametype=NORMAL cap_fp=0000000000000000 cap_fi=0000000000000000 cap_fe=0 cap_fver=0 Hash: upowerd,init_t,devicekit_power_t,process2,nnp_transition 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.16.16-300.fc28.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
This bug appears to have been reported against 'rawhide' during the Fedora 29 development cycle. Changing version to '29'.
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.