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 2083504 - samba-dcerpcd and samba rpcd programs need selinux-policy permissions
Summary: samba-dcerpcd and samba rpcd programs need selinux-policy permissions
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: selinux-policy
Version: 8.7
Hardware: All
OS: Linux
high
high
Target Milestone: rc
: 8.7
Assignee: Zdenek Pytela
QA Contact: Milos Malik
URL:
Whiteboard:
: 2097629 2097942 (view as bug list)
Depends On:
Blocks: 2083509 2083511
TreeView+ depends on / blocked
 
Reported: 2022-05-10 09:23 UTC by Pavel Filipensky
Modified: 2022-12-15 16:18 UTC (History)
6 users (show)

Fixed In Version: selinux-policy-3.14.3-103.el8
Doc Type: No Doc Update
Doc Text:
Clone Of:
: 2083509 (view as bug list)
Environment:
Last Closed: 2022-11-08 10:44:16 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github fedora-selinux selinux-policy pull 1219 0 None Merged Add support for samba-dcerpcd 2022-06-07 18:26:09 UTC
Github fedora-selinux selinux-policy pull 1227 0 None open Update policy for samba-dcerpcd 2022-06-09 07:52:51 UTC
Red Hat Bugzilla 2096857 1 medium CLOSED policy blocks systemd / sd-mkdcreds from creating service credentials on tmpfs 2023-10-24 13:51:00 UTC
Red Hat Issue Tracker RHELPLAN-121540 0 None None None 2022-05-10 09:30:19 UTC
Red Hat Product Errata RHBA-2022:7691 0 None None None 2022-11-08 10:45:03 UTC

Internal Links: 2096825

Description Pavel Filipensky 2022-05-10 09:23:24 UTC
After RHEL 8.7 rebase to samba 4.16.1 the samba test fails because of missing selinux policy permissions. Samba has added new programs (Release Notes https://www.samba.org/samba/history/samba-4.16.0.html).

Please give the needed permissions to these programs:

# ls -lZ /usr/libexec/samba/
lrwxrwxrwx. 1 root root system_u:object_r:bin_t:s0      34 Apr 23  2021 cups_backend_smb -> /etc/alternatives/cups_backend_smb
-rwxr-xr-x  1 root root ?                          1428008 Feb 15 12:31 rpcd_classic
-rwxr-xr-x  1 root root ?                            45168 Feb 15 12:31 rpcd_epmapper
-rwxr-xr-x  1 root root ?                            78104 Feb 15 12:31 rpcd_fsrvp
-rwxr-xr-x  1 root root ?                           424552 Feb 15 12:31 rpcd_lsad
-rwxr-xr-x  1 root root ?                           128712 Feb 15 12:31 rpcd_mdssvc
-rwxr-xr-x  1 root root ?                            28768 Feb 15 12:31 rpcd_rpcecho
-rwxr-xr-x  1 root root ?                           512976 Feb 15 12:31 rpcd_spoolss
-rwxr-xr-x  1 root root ?                            90712 Feb 15 12:31 rpcd_winreg
-rwxr-xr-x  1 root root ?                           525464 Feb 15 12:31 samba-bgqd
-rwxr-xr-x  1 root root ?                           197960 Feb 15 12:31 samba-dcerpcd


The denied access is here:


avc:  denied  { write } for  pid=53381 comm="samba-dcerpcd" name="samba-dcerpcd.pid" dev="tmpfs"
avc:  denied  { setgid } for  pid=53485 comm="rpcd_lsad"


and here:


type=AVC msg=audit(1652102482.309:2296): avc:  denied  { setgid } for  pid=52973 comm="rpcd_lsad" capability=6  scontext=system_u:system_r:winbind_t:s0 tcontext=system_u:system_r:winbind_t:s0 tclass=capability permissive=0            
type=AVC msg=audit(1652102482.934:2300): avc:  denied  { setgid } for  pid=52995 comm="rpcd_lsad" capability=6  scontext=system_u:system_r:winbind_t:s0 tcontext=system_u:system_r:winbind_t:s0 tclass=capability permissive=0
type=AVC msg=audit(1652102483.579:2304): avc:  denied  { setgid } for  pid=53015 comm="rpcd_lsad" capability=6  scontext=system_u:system_r:winbind_t:s0 tcontext=system_u:system_r:winbind_t:s0 tclass=capability permissive=0
type=AVC msg=audit(1652102484.263:2308): avc:  denied  { setgid } for  pid=53035 comm="rpcd_lsad" capability=6  scontext=system_u:system_r:winbind_t:s0 tcontext=system_u:system_r:winbind_t:s0 tclass=capability permissive=0
type=AVC msg=audit(1652102484.985:2312): avc:  denied  { setgid } for  pid=53056 comm="rpcd_lsad" capability=6  scontext=system_u:system_r:winbind_t:s0 tcontext=system_u:system_r:winbind_t:s0 tclass=capability permissive=0


Full logs:


http://idm-artifacts.usersys.redhat.com/samba/Nightly/RHEL8.7/2022-04-17/tier-1/tier1_ws2019/7/tier1-restraint.01/recipes/1/tasks/10/results/1652101918/logs/avc.log
http://idm-artifacts.usersys.redhat.com/samba/Nightly/RHEL8.7/2022-04-17/tier-1/tier1_ws2019/7/tier1-restraint.01/recipes/1/tasks/10/results/1652101914/logs/avc.log

Comment 1 Pavel Filipensky 2022-05-10 09:27:54 UTC
The denied access: denied  { write } for  pid=53381 comm="samba-dcerpcd" name="samba-dcerpcd.pid" dev="tmpfs"
needs to be fixed via granting access for "/run"  (for pid files) - see smb.conf(5):

   pid directory (G)

       This option specifies the directory where pid files will be placed.

       Default: pid directory = /run

       Example: pid directory = /var/run/

Comment 13 Zdenek Pytela 2022-06-09 09:04:55 UTC
Commits to backport:
commit 044ed83f8ebde938bbc49f6e071a8548ddc8505d (HEAD -> rawhide, upstream/rawhide)
Author: Zdenek Pytela <zpytela>
Date:   Wed Jun 8 16:24:15 2022 +0200

    Update policy for samba-dcerpcd

commit c23c6a5242560e8a9946db5bf4440adc0f39febc
Author: Zdenek Pytela <zpytela>
Date:   Mon Jan 4 20:24:23 2021 +0100

    Allow domain read usermodehelper state information

commit 6a57649e555f8e1cf8f65eea2e659d969b9fe8f2
Author: Zdenek Pytela <zpytela>
Date:   Mon Jan 4 19:50:49 2021 +0100

    Remove all kernel_read_usermodehelper_state() interface calls

Comment 16 Bruno Goncalves 2022-06-16 08:04:57 UTC
*** Bug 2097629 has been marked as a duplicate of this bug. ***

Comment 17 Milos Malik 2022-06-17 07:19:13 UTC
*** Bug 2097942 has been marked as a duplicate of this bug. ***

Comment 22 Zdenek Pytela 2022-06-28 09:21:04 UTC
This one aplies to RHEL 8, too:
commit 837f63743214363362334e910dcb06d35cd5cb99 (HEAD -> rawhide, upstream/rawhide)
Author: Zdenek Pytela <zpytela>
Date:   Mon Jun 27 17:22:40 2022 +0200

    Update samba-dcerpcd policy for kerberos usage 2

Comment 23 Zdenek Pytela 2022-06-28 18:35:12 UTC
The additional denials found by the automated test will be fixed with
https://bugzilla.redhat.com/show_bug.cgi?id=2096825

Comment 33 errata-xmlrpc 2022-11-08 10:44:16 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (selinux-policy bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2022:7691


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