Bug 1595889 - SELinux is preventing upowerd from 'read' accesses on the file /var/lib/upower/history-time-empty-DELL_GR5D371-71-47253.dat.
Summary: SELinux is preventing upowerd from 'read' accesses on the file /var/lib/upowe...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 28
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Lukas Vrabec
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:a788a24e7279e3a8bdb925c02ff...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-06-27 16:51 UTC by Pavel Roskin
Modified: 2018-07-29 03:23 UTC (History)
6 users (show)

Fixed In Version: selinux-policy-3.14.1-36.fc28
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-07-29 03:23:15 UTC
Type: ---


Attachments (Terms of Use)

Description Pavel Roskin 2018-06-27 16:51:23 UTC
Description of problem:
I saw it after reboot. I'm using Dell Precision 7510.
SELinux is preventing upowerd from 'read' accesses on the file /var/lib/upower/history-time-empty-DELL_GR5D371-71-47253.dat.

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

If you believe that upowerd should be allowed read access on the history-time-empty-DELL_GR5D371-71-47253.dat 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 '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/history-time-empty-
                              DELL_GR5D371-71-47253.dat [ file ]
Source                        upowerd
Source Path                   upowerd
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.14.1-32.fc28.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 4.17.2-200.fc28.x86_64 #1 SMP Mon
                              Jun 18 20:09:31 UTC 2018 x86_64 x86_64
Alert Count                   4
First Seen                    2018-06-27 09:34:31 PDT
Last Seen                     2018-06-27 09:34:31 PDT
Local ID                      3527409e-2af5-4774-b892-4f1f7b1cb8b2

Raw Audit Messages
type=AVC msg=audit(1530117271.608:158): avc:  denied  { read } for  pid=1037 comm="upowerd" name="history-time-empty-DELL_GR5D371-71-47253.dat" dev="nvme0n1p4" ino=8126814 scontext=system_u:system_r:init_t:s0 tcontext=system_u:object_r:devicekit_var_lib_t:s0 tclass=file permissive=0


Hash: upowerd,init_t,devicekit_var_lib_t,file,read

Version-Release number of selected component:
selinux-policy-3.14.1-32.fc28.noarch

Additional info:
component:      selinux-policy
reporter:       libreport-2.9.5
hashmarkername: setroubleshoot
kernel:         4.17.2-200.fc28.x86_64
type:           libreport

Potential duplicate: bug 1593820

Comment 1 Franco Geller 2018-06-27 17:16:17 UTC
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

Comment 2 Fedora Update System 2018-07-25 22:29:01 UTC
selinux-policy-3.14.1-36.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2018-1050fb248b

Comment 3 Fedora Update System 2018-07-26 16:31:22 UTC
selinux-policy-3.14.1-36.fc28 has been pushed to the Fedora 28 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-1050fb248b

Comment 4 Fedora Update System 2018-07-29 03:23:15 UTC
selinux-policy-3.14.1-36.fc28 has been pushed to the Fedora 28 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.