Bug 1189357 - SELinux is preventing /usr/bin/systemctl from using the 'sys_resource' capabilities.
Summary: SELinux is preventing /usr/bin/systemctl from using the 'sys_resource' capabi...
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: ipsec-tools
Version: 21
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Paul Wouters
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:2dc715081f0c5a117cb5fb471f2...
: 1243454 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-02-05 05:18 UTC by Jeremy Visser
Modified: 2019-04-29 09:15 UTC (History)
10 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2015-12-02 08:35:13 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Jeremy Visser 2015-02-05 05:18:27 UTC
Description of problem:
I used the NetworkManager-l2tp package and attempted to initiate an L2TP/IPsec connection.
SELinux is preventing /usr/bin/systemctl from using the 'sys_resource' capabilities.

*****  Plugin sys_resource (91.4 confidence) suggests   **********************

If you do not want processes to require capabilities to use up all the system resources on your system;
Then you need to diagnose why your system is running out of system resources and fix the problem.  

According to /usr/include/linux/capability.h, sys_resource is required to:

/* Override resource limits. Set resource limits. */
/* Override quota limits. */
/* Override reserved space on ext2 filesystem */
/* Modify data journaling mode on ext3 filesystem (uses journaling
   resources) */
/* NOTE: ext2 honors fsuid when checking for resource overrides, so
   you can override using fsuid too */
/* Override size restrictions on IPC message queues */
/* Allow more than 64hz interrupts from the real-time clock */
/* Override max number of consoles on console allocation */
/* Override max number of keymaps */
/* Override resource limits. Set resource limits. */
/* Override quota limits. */
/* Override reserved space on ext2 filesystem */
/* Modify data journaling mode on ext3 filesystem (uses journaling
   resources) */
/* NOTE: ext2 honors fsuid when checking for resource overrides, so
   you can override using fsuid too */
/* Override size restrictions on IPC message queues */
/* Allow more than 64hz interrupts from the real-time clock */
/* Override max number of consoles on console allocation */
/* Override max number of keymaps */
/* Override resource limits. Set resource limits. */
/* Override quota limits. */
/* Override reserved space on ext2 filesystem */
/* Modify data journaling mode on ext3 filesystem (uses journaling
   resources) */
/* NOTE: ext2 honors fsuid when checking for resource overrides, so
   you can override using fsuid too */
/* Override size restrictions on IPC message queues */
/* Allow more than 64hz interrupts from the real-time clock */
/* Override max number of consoles on console allocation */
/* Override max number of keymaps */

Do
fix the cause of the SYS_RESOURCE on your system.

*****  Plugin catchall (9.59 confidence) suggests   **************************

If you believe that systemctl should have the sys_resource capability 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:ipsec_mgmt_t:s0
Target Context                system_u:system_r:ipsec_mgmt_t:s0
Target Objects                Unknown [ capability ]
Source                        systemctl
Source Path                   /usr/bin/systemctl
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           systemd-216-17.fc21.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.13.1-105.fc21.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Host Name                     (removed)
Platform                      Linux (removed) 3.18.3-201.fc21.x86_64 #1 SMP Mon
                              Jan 19 15:59:31 UTC 2015 x86_64 x86_64
Alert Count                   4
First Seen                    2015-02-05 16:15:54 AEDT
Last Seen                     2015-02-05 16:16:35 AEDT
Local ID                      7ecdd415-b5ad-43ee-9d59-f9f88bf39267

Raw Audit Messages
type=AVC msg=audit(1423113395.955:26966): avc:  denied  { sys_resource } for  pid=508 comm="systemctl" capability=24  scontext=system_u:system_r:ipsec_mgmt_t:s0 tcontext=system_u:system_r:ipsec_mgmt_t:s0 tclass=capability permissive=1


type=SYSCALL msg=audit(1423113395.955:26966): arch=x86_64 syscall=setrlimit success=yes exit=0 a0=7 a1=7fffc689b4b0 a2=0 a3=415f6e653d474e41 items=0 ppid=503 pid=508 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm=systemctl exe=/usr/bin/systemctl subj=system_u:system_r:ipsec_mgmt_t:s0 key=(null)

Hash: systemctl,ipsec_mgmt_t,ipsec_mgmt_t,capability,sys_resource

Version-Release number of selected component:
selinux-policy-3.13.1-105.fc21.noarch

Additional info:
reporter:       libreport-2.3.0
hashmarkername: setroubleshoot
kernel:         3.18.3-201.fc21.x86_64
type:           libreport

Comment 1 sheepdestroyer 2015-02-17 06:43:07 UTC
Description of problem:
friet to activate newly created L2TP VPN from network manager

Version-Release number of selected component:
selinux-policy-3.13.1-105.3.fc21.noarch

Additional info:
reporter:       libreport-2.3.0
hashmarkername: setroubleshoot
kernel:         3.18.7-200.fc21.x86_64
type:           libreport

Comment 2 Lukas Vrabec 2015-02-17 16:21:01 UTC
Hi,

Is it something broken or just see this AVC?

Comment 3 Fabien Archambault 2015-03-23 08:52:11 UTC
Description of problem:
Activanting l2tp VPN connexion

Version-Release number of selected component:
selinux-policy-3.13.1-105.3.fc21.noarch
selinux-policy-3.13.1-105.6.fc21.noarch

Additional info:
reporter:       libreport-2.3.0
hashmarkername: setroubleshoot
kernel:         3.18.9-200.fc21.x86_64+debug
type:           libreport

Comment 4 sheepdestroyer 2015-03-23 13:49:14 UTC
activation on L2TP VPN mostly fails on first try  (it started to work on first try recently for ~1 week then same pb again soon after and since. Sorry that I can not provide more precise info). It then connects successfully on second try though.

Comment 5 Lukas Vrabec 2015-03-30 14:03:21 UTC
ipsec guys,
Any help here?

Comment 6 Miroslav Grepl 2015-04-09 16:21:55 UTC
This is caused by syscall=setrlimit.

Did you test it in permissive mode?

Comment 7 zcoalminer 2015-04-19 03:23:51 UTC
Description of problem:
I was launching the newest version of chrome, how rediculious to get this blocked!!!!!!!!!!!

Version-Release number of selected component:
selinux-policy-3.13.1-105.11.fc21.noarch

Additional info:
reporter:       libreport-2.3.0
hashmarkername: setroubleshoot
kernel:         3.19.3-200.fc21.x86_64
type:           libreport

Comment 8 Lukas Vrabec 2015-04-20 10:37:56 UTC
zcoalminer, 
I believe, you talking about another issue. 
Could you attach avc? (/var/log/audit/audit.log)

Comment 12 Fabien Archambault 2015-06-15 08:43:24 UTC
Description of problem:
Trying to connect to L2TP/IPSec VPN connexion

Version-Release number of selected component:
selinux-policy-3.13.1-105.13.fc21.noarch

Additional info:
reporter:       libreport-2.3.0
hashmarkername: setroubleshoot
kernel:         4.0.4-202.fc21.x86_64+debug
type:           libreport

Comment 13 Lukas Vrabec 2015-07-27 15:57:41 UTC
*** Bug 1243454 has been marked as a duplicate of this bug. ***

Comment 14 Fedora End Of Life 2015-11-04 15:26:34 UTC
This message is a reminder that Fedora 21 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 21. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '21'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 21 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 15 Fedora End Of Life 2015-12-02 08:35:17 UTC
Fedora 21 changed to end-of-life (EOL) status on 2015-12-01. Fedora 21 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.


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