Bug 1498503

Summary: SELinux is preventing systemd-sleep from 'create' accesses on the file state.
Product: [Fedora] Fedora Reporter: Anass Ahmed <anass.1430>
Component: selinux-policyAssignee: Lukas Vrabec <lvrabec>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 27CC: dwalsh, lsm5, lvrabec, mgrepl, plautrba, pmoore
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:dec254d503744aca63457d80ddf92fd0a235e192d86c013b4cdcb5bc30b5cde9;VARIANT_ID=workstation;
Fixed In Version: selinux-policy-3.13.1-283.14.fc27 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-10-31 15:33:29 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 Anass Ahmed 2017-10-04 13:27:04 UTC
Description of problem:
SELinux is preventing systemd-sleep from 'create' accesses on the file state.

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

If you believe that systemd-sleep should be allowed create access on the state 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-sleep' --raw | audit2allow -M my-systemdsleep
# semodule -X 300 -i my-systemdsleep.pp

Additional Information:
Source Context                system_u:system_r:init_t:s0
Target Context                system_u:object_r:sysfs_t:s0
Target Objects                state [ file ]
Source                        systemd-sleep
Source Path                   systemd-sleep
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    <Unknown>
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 4.12.5-300.fc26.x86_64 #1 SMP Mon
                              Aug 7 15:27:25 UTC 2017 x86_64 x86_64
Alert Count                   1
First Seen                    2017-08-29 04:28:03 EET
Last Seen                     2017-08-29 04:28:03 EET
Local ID                      2ea6e6db-d497-419e-8d49-6b7c93bd8f83

Raw Audit Messages
type=AVC msg=audit(1503973683.214:6802): avc:  denied  { create } for  pid=26086 comm="systemd-sleep" name="state" scontext=system_u:system_r:init_t:s0 tcontext=system_u:object_r:sysfs_t:s0 tclass=file permissive=0


Hash: systemd-sleep,init_t,sysfs_t,file,create


Additional info:
component:      selinux-policy
reporter:       libreport-2.9.2
hashmarkername: setroubleshoot
kernel:         4.13.3-301.fc27.x86_64
type:           libreport

Potential duplicate: bug 1471361

Comment 1 Fedora Update System 2017-10-25 10:10:07 UTC
selinux-policy-3.13.1-283.13.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2017-b5e9ce60d2

Comment 2 Fedora Update System 2017-10-27 18:44:15 UTC
selinux-policy-3.13.1-283.14.fc27 has been pushed to the Fedora 27 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-2017-b5e9ce60d2

Comment 3 Fedora Update System 2017-10-31 15:33:29 UTC
selinux-policy-3.13.1-283.14.fc27 has been pushed to the Fedora 27 stable repository. If problems still persist, please make note of it in this bug report.