Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1230896 - SELinux is preventing /usr/libexec/sssd/selinux_child from using the 'setuid' capabilities.
Summary: SELinux is preventing /usr/libexec/sssd/selinux_child from using the 'setuid'...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 22
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:4d3be1bc1943a41f728f2e3d3bf...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-06-11 17:44 UTC by Lukas Slebodnik
Modified: 2015-06-27 22:33 UTC (History)
5 users (show)

Fixed In Version: selinux-policy-3.13.1-128.2.fc22
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-06-27 22:33:59 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Lukas Slebodnik 2015-06-11 17:44:08 UTC
Description of problem:
Authenticate with IPA user and sssd running in non-root mode
SELinux is preventing /usr/libexec/sssd/selinux_child from using the 'setuid' capabilities.

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

If you believe that selinux_child should have the setuid 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 selinux_child /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:sssd_selinux_manager_t:s0
Target Context                system_u:system_r:sssd_selinux_manager_t:s0
Target Objects                Unknown [ capability ]
Source                        selinux_child
Source Path                   /usr/libexec/sssd/selinux_child
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           sssd-ipa-1.12.90-0.20150611.0918.git9b162bf.master
                              .fc22.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.13.1-126.fc22.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 4.0.4-303.fc22.x86_64 #1 SMP Thu
                              May 28 12:37:06 UTC 2015 x86_64 x86_64
Alert Count                   1
First Seen                    2015-06-11 19:40:53 CEST
Last Seen                     2015-06-11 19:40:53 CEST
Local ID                      8ceb6b73-bce0-444f-b50f-bfc2001258d5

Raw Audit Messages
type=AVC msg=audit(1434044453.179:2148): avc:  denied  { setuid } for  pid=24808 comm="selinux_child" capability=7  scontext=system_u:system_r:sssd_selinux_manager_t:s0 tcontext=system_u:system_r:sssd_selinux_manager_t:s0 tclass=capability permissive=0


type=SYSCALL msg=audit(1434044453.179:2148): arch=x86_64 syscall=setuid success=yes exit=0 a0=0 a1=5 a2=7fb0468e07f0 a3=7fb0434df2f0 items=0 ppid=24569 pid=24808 auid=4294967295 uid=983 gid=969 euid=0 suid=0 fsuid=0 egid=969 sgid=969 fsgid=969 tty=(none) ses=4294967295 comm=selinux_child exe=/usr/libexec/sssd/selinux_child subj=system_u:system_r:sssd_selinux_manager_t:s0 key=(null)

Hash: selinux_child,sssd_selinux_manager_t,sssd_selinux_manager_t,capability,setuid

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

Additional info:
reporter:       libreport-2.5.1
hashmarkername: setroubleshoot
kernel:         4.0.4-303.fc22.x86_64
type:           libreport

Comment 1 Lukas Slebodnik 2015-06-11 17:45:38 UTC
And there is also AVC for setgid

SELinux is preventing /usr/libexec/sssd/selinux_child from using the setgid capability.

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

If you believe that selinux_child should have the setgid 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 selinux_child /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:sssd_selinux_manager_t:s0
Target Context                system_u:system_r:sssd_selinux_manager_t:s0
Target Objects                Unknown [ capability ]
Source                        selinux_child
Source Path                   /usr/libexec/sssd/selinux_child
Port                          <Unknown>
Source RPM Packages           sssd-ipa-1.12.90-0.20150611.0918.git9b162bf.master
                              .fc22.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.13.1-126.fc22.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     unused-4-233.brq.redhat.com
Platform                      Linux unused-4-233.brq.redhat.com
                              4.0.4-303.fc22.x86_64 #1 SMP Thu May 28 12:37:06
                              UTC 2015 x86_64 x86_64
Alert Count                   1
First Seen                    2015-06-11 19:40:53 CEST
Last Seen                     2015-06-11 19:40:53 CEST
Local ID                      48b0be94-1ea3-499b-bf5b-54ae721d9972

Raw Audit Messages
type=AVC msg=audit(1434044453.179:2149): avc:  denied  { setgid } for  pid=24808 comm="selinux_child" capability=6  scontext=system_u:system_r:sssd_selinux_manager_t:s0 tcontext=system_u:system_r:sssd_selinux_manager_t:s0 tclass=capability permissive=0


type=SYSCALL msg=audit(1434044453.179:2149): arch=x86_64 syscall=setgid success=no exit=EPERM a0=0 a1=5 a2=7fb0468e07f0 a3=7fb0434df2f0 items=0 ppid=24569 pid=24808 auid=4294967295 uid=983 gid=969 euid=0 suid=0 fsuid=0 egid=969 sgid=969 fsgid=969 tty=(none) ses=4294967295 comm=selinux_child exe=/usr/libexec/sssd/selinux_child subj=system_u:system_r:sssd_selinux_manager_t:s0 key=(null)

Hash: selinux_child,sssd_selinux_manager_t,sssd_selinux_manager_t,capability,setgid

Comment 2 Miroslav Grepl 2015-06-17 12:32:17 UTC
Has been back ported from RHEL7.

Comment 3 Fedora Update System 2015-06-19 07:51:32 UTC
selinux-policy-3.13.1-128.2.fc22 has been submitted as an update for Fedora 22.
https://admin.fedoraproject.org/updates/selinux-policy-3.13.1-128.2.fc22

Comment 4 Fedora Update System 2015-06-21 00:34:18 UTC
Package selinux-policy-3.13.1-128.2.fc22:
* should fix your issue,
* was pushed to the Fedora 22 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing selinux-policy-3.13.1-128.2.fc22'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2015-10299/selinux-policy-3.13.1-128.2.fc22
then log in and leave karma (feedback).

Comment 5 Fedora Update System 2015-06-27 22:33:59 UTC
selinux-policy-3.13.1-128.2.fc22 has been pushed to the Fedora 22 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.