Bug 1230726 - SELinux is preventing /usr/sbin/winbindd from using the 'signull' accesses on a process.
Summary: SELinux is preventing /usr/sbin/winbindd from using the 'signull' accesses on...
Keywords:
Status: CLOSED DUPLICATE of bug 1269193
Alias: None
Product: Fedora
Classification: Fedora
Component: samba
Version: 21
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Guenther Deschner
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:189d34bb74fec4679745bbf82b6...
: 1230729 1230730 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-06-11 13:02 UTC by Brian J. Murrell
Modified: 2015-10-09 10:19 UTC (History)
12 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2015-10-09 10:19:10 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Brian J. Murrell 2015-06-11 13:02:00 UTC
Description of problem:
SELinux is preventing /usr/sbin/winbindd from using the 'signull' accesses on a process.

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

If you believe that winbindd should be allowed signull access on processes labeled svirt_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 winbindd /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:winbind_t:s0
Target Context                system_u:system_r:svirt_t:s0:c833,c864
Target Objects                Unknown [ process ]
Source                        winbindd
Source Path                   /usr/sbin/winbindd
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           samba-winbind-4.1.17-1.x.fc21.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.13.1-105.13.fc21.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 3.19.5-200.fc21.x86_64 #1 SMP Mon
                              Apr 20 19:51:56 UTC 2015 x86_64 x86_64
Alert Count                   1
First Seen                    2015-06-09 14:06:02 EDT
Last Seen                     2015-06-09 14:06:02 EDT
Local ID                      ad6b47ee-8eb5-4900-ab8d-927c529f7e0a

Raw Audit Messages
type=AVC msg=audit(1433873162.64:151177): avc:  denied  { signull } for  pid=22164 comm="winbindd" scontext=system_u:system_r:winbind_t:s0 tcontext=system_u:system_r:svirt_t:s0:c833,c864 tclass=process permissive=0


type=SYSCALL msg=audit(1433873162.64:151177): arch=x86_64 syscall=kill success=no exit=EACCES a0=1786 a1=0 a2=0 a3=46203d20656e696c items=0 ppid=1 pid=22164 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm=winbindd exe=/usr/sbin/winbindd subj=system_u:system_r:winbind_t:s0 key=(null)

Hash: winbindd,winbind_t,svirt_t,process,signull

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:         3.19.5-200.fc21.x86_64
type:           libreport

Comment 1 Miroslav Grepl 2015-06-17 12:26:37 UTC
*** Bug 1230729 has been marked as a duplicate of this bug. ***

Comment 2 Miroslav Grepl 2015-06-17 12:26:38 UTC
*** Bug 1230730 has been marked as a duplicate of this bug. ***

Comment 3 Miroslav Grepl 2015-06-17 12:29:17 UTC
Any idea why winbindd send a signull to processes?

Comment 4 Alexander Bokovoy 2015-06-17 13:49:14 UTC
This is valid behavior in POSIX, see kill(2):

"If sig is 0, then no signal is sent, but error checking is still performed; this can be used to check for the existence of a process ID or process group ID."

Samba uses this behavior to find out whether a particular process already exists. In particular, winbindd fires off a DC probe and since it doesn't need to have multiple of them for the single DC check, it uses this method to check if the probe is there.

_PUBLIC_ bool process_exists_by_pid(pid_t pid)
{
        /* Doing kill with a non-positive pid causes messages to be
         * sent to places we don't want. */
        if (pid <= 0) {
                return false;
        }
        return(kill(pid,0) == 0 || errno != ESRCH);
}

...

        if (domain->dc_probe_pid != (pid_t)-1) {
                /*
                 * We might already have a DC probe
                 * child working, check.
                 */
                if (process_exists_by_pid(domain->dc_probe_pid)) {
                        DEBUG(10,("fork_child_dc_connect: pid %u already "
                                "checking for DC's.\n",
                                (unsigned int)domain->dc_probe_pid));
                        return true;
                }
                domain->dc_probe_pid = (pid_t)-1;
        }

        domain->dc_probe_pid = fork();

Comment 5 Andreas Schneider 2015-10-09 10:19:10 UTC

*** This bug has been marked as a duplicate of bug 1269193 ***


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