This bug has been migrated to another issue tracking site. It has been closed here and may no longer be being monitored.

If you would like to get updates for this issue, or to participate in it, you may do so at Red Hat Issue Tracker .
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 2236056 - SELinux denies to process samba-dceprcd during connection to LDAP server.
Summary: SELinux denies to process samba-dceprcd during connection to LDAP server.
Keywords:
Status: CLOSED MIGRATED
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: selinux-policy
Version: 8.8
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Zdenek Pytela
QA Contact: BaseOS QE Security Team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-08-30 09:07 UTC by kyoneyama
Modified: 2023-09-23 18:01 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-08-30 11:54:40 UTC
Type: Bug
Target Upstream Version:
Embargoed:
pm-rhel: mirror+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker   RHEL-1831 0 None Migrated None 2023-08-30 11:54:34 UTC
Red Hat Issue Tracker RHELPLAN-166924 0 None None None 2023-08-30 09:10:26 UTC

Description kyoneyama 2023-08-30 09:07:20 UTC
Description of problem:

On RHEL8, SELinux denies to process samba-dceprcd during connection to LDAP server.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
type=AVC msg=audit(1693385544.691:838): avc:  denied  { name_connect } for  pid=6591 comm="samba-dcerpcd" dest=636 scontext=system_u:system_r:winbind_rpcd_t:s0 tcontext=system_u:object_r:ldap_port_t:s0 tclass=tcp_socket permissive=0
----
type=AVC msg=audit(1693385545.693:839): avc:  denied  { name_connect } for  pid=6591 comm="samba-dcerpcd" dest=636 scontext=system_u:system_r:winbind_rpcd_t:s0 tcontext=system_u:object_r:ldap_port_t:s0 tclass=tcp_socket permissive=0
----
type=AVC msg=audit(1693385546.701:840): avc:  denied  { name_connect } for  pid=6591 comm="samba-dcerpcd" dest=636 scontext=system_u:system_r:winbind_rpcd_t:s0 tcontext=system_u:object_r:ldap_port_t:s0 tclass=tcp_socket permissive=0
...

setroubleshoot[6462]: SELinux is preventing /usr/libexec/samba/samba-dcerpcd from name_connect access on the tcp_socket port 636.

*****  Plugin catchall (100. confidence) suggests   **************************
If you believe that samba-dcerpcd should be allowed name_connect access on the port 636 tcp_socket 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:
# ausearch -c 'samba-dcerpcd' --raw | audit2allow -M my-sambadcerpcd
# semodule -X 300 -i my-sambadcerpcd.pp
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


# ausearch -c 'samba-dcerpcd' --raw | audit2allow -M my-pol
# cat my-pol.te 

module my-pol 1.0;

require {
	type winbind_rpcd_t;
	type ldap_port_t;
	class tcp_socket name_connect;
}

#============= winbind_rpcd_t ==============

#!!!! This avc is allowed in the current policy
allow winbind_rpcd_t ldap_port_t:tcp_socket name_connect;





Version-Release number of selected component (if applicable):

  Red Hat Enterprise Linux 8
  samba-4.17.5-3.el8_8
  selinux-policy-targeted-3.14.3-108.el8


How reproducible:

Always

Steps to Reproduce:

1. As per https://access.redhat.com/solutions/337073, setup samba to use a ldap server.

        passdb backend = ldapsam:ldap://rhds.ad.example.com

2. Start winbind.service

  # systemctl start winbind

3. Look at journal log and audit log

Actual results:

samba services cannot connect to the LDAP server.

Comment 1 RHEL Program Management 2023-08-30 10:37:51 UTC
Issue migration from Bugzilla to Jira is in process at this time. This will be the last message in Jira copied from the Bugzilla bug.

Comment 2 RHEL Program Management 2023-08-30 11:54:40 UTC
This BZ has been automatically migrated to the issues.redhat.com Red Hat Issue Tracker. All future work related to this report will be managed there.

To find the migrated issue, look in the "Links" section for a direct link to the new issue location. The issue key will have an icon of 2 footprints next to it, and begin with "RHEL-" followed by an integer.  You can also find this issue by visiting https://issues.redhat.com/issues/?jql= and searching the "Bugzilla Bug" field for this BZ's number, e.g. a search like:

"Bugzilla Bug" = 1234567

In the event you have trouble locating or viewing this issue, you can file an issue by sending mail to rh-issues.


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