Bug 1309604 - SELinux is preventing systemctl from using the 'setrlimit' accesses on a process.
SELinux is preventing systemctl from using the 'setrlimit' accesses on a proc...
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: selinux-policy (Show other bugs)
23
x86_64 Unspecified
high Severity high
: ---
: ---
Assigned To: Lukas Vrabec
Fedora Extras Quality Assurance
abrt_hash:0be585da5cabd6b7c468e0a2b66...
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-02-18 04:29 EST by Stefan Joosten
Modified: 2016-03-24 21:24 EDT (History)
5 users (show)

See Also:
Fixed In Version: selinux-policy-3.13.1-158.11.fc23
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-03-24 21:24:09 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Stefan Joosten 2016-02-18 04:29:53 EST
Description of problem:
SELinux is preventing systemctl from using the 'setrlimit' accesses on a process.

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

If you believe that systemctl should be allowed setrlimit access on processes labeled logrotate_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:
# grep systemctl /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:logrotate_t:s0-s0:c0.c1023
Target Context                system_u:system_r:logrotate_t:s0-s0:c0.c1023
Target Objects                Unknown [ process ]
Source                        systemctl
Source Path                   systemctl
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.3.5-300.fc23.x86_64 #1 SMP Mon
                              Feb 1 03:18:41 UTC 2016 x86_64 x86_64
Alert Count                   1
First Seen                    2016-02-18 10:06:01 CET
Last Seen                     2016-02-18 10:06:01 CET
Local ID                      d3e3b4ff-1d09-4a85-917a-6d266689dba6

Raw Audit Messages
type=AVC msg=audit(1455786361.502:635): avc:  denied  { setrlimit } for  pid=3536 comm="systemctl" scontext=system_u:system_r:logrotate_t:s0-s0:c0.c1023 tcontext=system_u:system_r:logrotate_t:s0-s0:c0.c1023 tclass=process permissive=0


Hash: systemctl,logrotate_t,logrotate_t,process,setrlimit


Additional info:
reporter:       libreport-2.6.4
hashmarkername: setroubleshoot
kernel:         4.3.5-300.fc23.x86_64
type:           libreport

Potential duplicate: bug 1185621
Comment 1 Miroslav Grepl 2016-02-18 07:53:04 EST
Any chance, you  are running low on system resources?
Comment 2 Daniel Walsh 2016-02-20 06:28:07 EST
This should be just dontaudited.  I believe anyone calling systemctl will trigger this avc.
Comment 3 Lukas Vrabec 2016-03-16 11:21:10 EDT
commit d903b0a352346bca034239c8aad46a3b88e31784
Author: Lukas Vrabec <lvrabec@redhat.com>
Date:   Wed Mar 16 16:19:30 2016 +0100

    Dontaudit logrotate to setrlimit itself. rhbz#1309604
Comment 4 Fedora Update System 2016-03-16 16:42:52 EDT
selinux-policy-3.13.1-158.11.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2016-b9df861e78
Comment 5 Fedora Update System 2016-03-18 21:26:09 EDT
selinux-policy-3.13.1-158.11.fc23 has been pushed to the Fedora 23 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-2016-b9df861e78
Comment 6 Fedora Update System 2016-03-24 21:24:04 EDT
selinux-policy-3.13.1-158.11.fc23 has been pushed to the Fedora 23 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.