Bug 1265362 - SELinux is preventing /usr/bin/loginctl from 'open' accesses on the file /var/log/journal/07db66c8a9d149c7b7e5a668602ae8aa/system~.
Summary: SELinux is preventing /usr/bin/loginctl from 'open' accesses on the file /var...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 22
Hardware: x86_64
OS: Unspecified
high
medium
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:79b00e833741bb70e61fdb9c69f...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-09-22 18:27 UTC by Ben Cardoen
Modified: 2016-02-09 10:23 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-02-09 10:23:06 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
systemd-logind log output after pressing power button (882 bytes, text/html)
2015-10-13 19:41 UTC, Ben Cardoen
no flags Details

Description Ben Cardoen 2015-09-22 18:27:27 UTC
Description of problem:
Shutdown initiated by pressing power button freezes system for 1-2s, then shows selinux denial.
SELinux is preventing /usr/bin/loginctl from 'open' accesses on the file /var/log/journal/07db66c8a9d149c7b7e5a668602ae8aa/system~.

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

If you believe that loginctl should be allowed open access on the system~ 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:
# grep loginctl /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:apmd_t:s0
Target Context                system_u:object_r:var_log_t:s0
Target Objects                /var/log/journal/07db66c8a9d149c7b7e5a668602ae8aa/
                              system~
                              [ file ]
Source                        loginctl
Source Path                   /usr/bin/loginctl
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.13.1-128.13.fc22.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 4.1.6-201.fc22.x86_64 #1 SMP Fri
                              Sep 4 17:49:24 UTC 2015 x86_64 x86_64
Alert Count                   8
First Seen                    2015-09-22 20:24:59 CEST
Last Seen                     2015-09-22 20:24:59 CEST
Local ID                      c4d7ed43-b3f6-4dfb-b54b-053ff884f327

Raw Audit Messages
type=AVC msg=audit(1442946299.617:982): avc:  denied  { open } for  pid=2431 comm="loginctl" path="/var/log/journal/07db66c8a9d149c7b7e5a668602ae8aa/system~" dev="dm-2" ino=1579595 scontext=system_u:system_r:apmd_t:s0 tcontext=system_u:object_r:var_log_t:s0 tclass=file permissive=0


Hash: loginctl,apmd_t,var_log_t,file,open

Version-Release number of selected component:
selinux-policy-3.13.1-128.13.fc22.noarch

Additional info:
reporter:       libreport-2.6.2
hashmarkername: setroubleshoot
kernel:         4.1.6-201.fc22.x86_64
type:           libreport

Comment 1 Miroslav Grepl 2015-10-12 11:35:38 UTC
Dominick,
do you have a policy for /var/log/journal?

Comment 2 Ben Cardoen 2015-10-13 19:41:42 UTC
Created attachment 1082617 [details]
systemd-logind log output after pressing power button

Comment 3 Ben Cardoen 2015-10-13 19:44:37 UTC
The issue remains after updating selinux-policy to 
selinux-policy-3.13.1-128.16.fc22.noarch
Poweroff, hibernate work from the shell and the xfce log out menu, only pressing the power button triggers the behaviour.

Comment 4 Ben Cardoen 2015-10-13 20:09:02 UTC
Using selinux-policy-3.13.1-128.18.fc22.noarch from f22 testing does not solve the problem.

Comment 5 spochybo 2015-11-10 06:23:18 UTC
Description of problem:
it just randomly happens so far I can see

Version-Release number of selected component:
selinux-policy-3.13.1-128.18.fc22.noarch

Additional info:
reporter:       libreport-2.6.3
hashmarkername: setroubleshoot
kernel:         4.2.5-201.fc22.x86_64
type:           libreport

Comment 6 Lukas Vrabec 2015-12-08 16:30:22 UTC
Dominick, 
Could you help us? Check comment 1

Thank you.

Comment 7 Ben Cardoen 2015-12-08 16:50:06 UTC
Issue is still present with (updated) packages:
Source RPM Packages           systemd-219-25.fc22.x86_64
Policy RPM                    selinux-policy-3.13.1-128.21.fc22.noarch

Comment 8 Ben Cardoen 2016-02-05 12:20:30 UTC
With the upgrade to Fedora 23, the issue seems to have been resolved (for me at least)
Systemd systemd-222-19
Policy  selinux-policy-3.13.1-158.2

For my part, this bug can be closed.

Comment 9 Lukas Vrabec 2016-02-09 10:23:06 UTC
Looks like this is fixed in systemd package. Closing this as NOTABUG. Feel free to re-open this issue if you see this AVC again.


Note You need to log in before you can comment on or make changes to this bug.