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 2097942 - [RHEL8]: SELinux prevents samba-dcerpcd and rpcd_classic
Summary: [RHEL8]: SELinux prevents samba-dcerpcd and rpcd_classic
Keywords:
Status: CLOSED DUPLICATE of bug 2083504
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: selinux-policy
Version: 8.7
Hardware: Unspecified
OS: Linux
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Zdenek Pytela
QA Contact: Milos Malik
URL:
Whiteboard:
Depends On: 2097789
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-06-17 02:15 UTC by xiaoli feng
Modified: 2022-06-17 16:10 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: No Doc Update
Doc Text:
Clone Of: 2097789
Environment:
Last Closed: 2022-06-17 07:19:13 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-125544 0 None None None 2022-06-17 02:24:08 UTC

Description xiaoli feng 2022-06-17 02:15:08 UTC
This issue also exist on RHEL8.7 even if selinux mode is Permissive. And this issue is included from selinux-policy-3.14.3-100.el8. Doesn't have this issue with selinux-policy-3.14.3-99.el8.

[root@hp-dl380pg8-10 ~]#  smbclient -L //$HOSTNAME/testuser  -N
Anonymous login successful

	Sharename       Type      Comment
	---------       ----      -------
	cifs            Disk      
	IPC$            IPC       IPC Service (Samba 4.16.1)
SMB1 disabled -- no workgroup available
[root@hp-dl380pg8-10 ~]# ausearch -m avc
----
time->Thu Jun 16 21:51:36 2022
type=PROCTITLE msg=audit(1655430696.375:366): proctitle=2F7573722F6C6962657865632F73616D62612F73616D62612D64636572706364002D2D6C6962657865632D7270636473002D2D72656164792D7369676E616C2D66643D3333002D2D6E702D68656C706572002D2D64656275676C6576656C3D30
type=SYSCALL msg=audit(1655430696.375:366): arch=c000003e syscall=21 success=yes exit=0 a0=7ffcf1b1bd50 a1=4 a2=8 a3=55e2c2cbe44c items=0 ppid=92462 pid=92463 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="samba-dcerpcd" exe="/usr/libexec/samba/samba-dcerpcd" subj=system_u:system_r:winbind_rpcd_t:s0 key=(null)
type=AVC msg=audit(1655430696.375:366): avc:  denied  { read } for  pid=92463 comm="samba-dcerpcd" name="unix" dev="proc" ino=4026532071 scontext=system_u:system_r:winbind_rpcd_t:s0 tcontext=system_u:object_r:proc_net_t:s0 tclass=file permissive=1
----
time->Thu Jun 16 21:51:36 2022
type=PROCTITLE msg=audit(1655430696.379:367): proctitle=2F7573722F6C6962657865632F73616D62612F73616D62612D64636572706364002D2D6C6962657865632D7270636473002D2D72656164792D7369676E616C2D66643D3333002D2D6E702D68656C706572002D2D64656275676C6576656C3D30
type=SYSCALL msg=audit(1655430696.379:367): arch=c000003e syscall=257 success=yes exit=10 a0=ffffff9c a1=7fdeabab755a a2=0 a3=0 items=0 ppid=1 pid=92464 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="samba-dcerpcd" exe="/usr/libexec/samba/samba-dcerpcd" subj=system_u:system_r:winbind_rpcd_t:s0 key=(null)
type=AVC msg=audit(1655430696.379:367): avc:  denied  { open } for  pid=92464 comm="samba-dcerpcd" path="/proc/sys/kernel/core_pattern" dev="proc" ino=16523 scontext=system_u:system_r:winbind_rpcd_t:s0 tcontext=system_u:object_r:usermodehelper_t:s0 tclass=file permissive=1
type=AVC msg=audit(1655430696.379:367): avc:  denied  { read } for  pid=92464 comm="samba-dcerpcd" name="core_pattern" dev="proc" ino=16523 scontext=system_u:system_r:winbind_rpcd_t:s0 tcontext=system_u:object_r:usermodehelper_t:s0 tclass=file permissive=1
----
time->Thu Jun 16 21:51:36 2022
type=PROCTITLE msg=audit(1655430696.379:368): proctitle=2F7573722F6C6962657865632F73616D62612F73616D62612D64636572706364002D2D6C6962657865632D7270636473002D2D72656164792D7369676E616C2D66643D3333002D2D6E702D68656C706572002D2D64656275676C6576656C3D30
type=PATH msg=audit(1655430696.379:368): item=1 name=(null) inode=134380804 dev=fd:00 mode=040700 ouid=0 ogid=0 rdev=00:00 obj=system_u:object_r:samba_log_t:s0 nametype=CREATE cap_fp=0 cap_fi=0 cap_fe=0 cap_fver=0 cap_frootid=0
type=PATH msg=audit(1655430696.379:368): item=0 name=(null) inode=168162510 dev=fd:00 mode=040700 ouid=0 ogid=0 rdev=00:00 obj=system_u:object_r:samba_log_t:s0 nametype=PARENT cap_fp=0 cap_fi=0 cap_fe=0 cap_fver=0 cap_frootid=0
type=CWD msg=audit(1655430696.379:368): cwd="/tmp"
type=SYSCALL msg=audit(1655430696.379:368): arch=c000003e syscall=83 success=yes exit=0 a0=55e2c2cbe950 a1=1c0 a2=0 a3=0 items=2 ppid=1 pid=92464 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="samba-dcerpcd" exe="/usr/libexec/samba/samba-dcerpcd" subj=system_u:system_r:winbind_rpcd_t:s0 key=(null)
type=AVC msg=audit(1655430696.379:368): avc:  denied  { create } for  pid=92464 comm="samba-dcerpcd" name="samba-dcerpcd" scontext=system_u:system_r:winbind_rpcd_t:s0 tcontext=system_u:object_r:samba_log_t:s0 tclass=dir permissive=1
----
time->Thu Jun 16 21:51:36 2022
type=PROCTITLE msg=audit(1655430696.380:369): proctitle=2F7573722F6C6962657865632F73616D62612F73616D62612D64636572706364002D2D6C6962657865632D7270636473002D2D72656164792D7369676E616C2D66643D3333002D2D6E702D68656C706572002D2D64656275676C6576656C3D30
type=SYSCALL msg=audit(1655430696.380:369): arch=c000003e syscall=257 success=yes exit=4 a0=ffffff9c a1=55e2c2c77380 a2=80000 a3=0 items=0 ppid=1 pid=92464 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="samba-dcerpcd" exe="/usr/libexec/samba/samba-dcerpcd" subj=system_u:system_r:winbind_rpcd_t:s0 key=(null)
type=AVC msg=audit(1655430696.380:369): avc:  denied  { open } for  pid=92464 comm="samba-dcerpcd" path="/var/lib/sss/mc/passwd" dev="dm-0" ino=235086415 scontext=system_u:system_r:winbind_rpcd_t:s0 tcontext=system_u:object_r:sssd_public_t:s0 tclass=file permissive=1
type=AVC msg=audit(1655430696.380:369): avc:  denied  { read } for  pid=92464 comm="samba-dcerpcd" name="passwd" dev="dm-0" ino=235086415 scontext=system_u:system_r:winbind_rpcd_t:s0 tcontext=system_u:object_r:sssd_public_t:s0 tclass=file permissive=1
----
time->Thu Jun 16 21:51:36 2022
type=PROCTITLE msg=audit(1655430696.381:370): proctitle=2F7573722F6C6962657865632F73616D62612F73616D62612D64636572706364002D2D6C6962657865632D7270636473002D2D72656164792D7369676E616C2D66643D3333002D2D6E702D68656C706572002D2D64656275676C6576656C3D30
type=SYSCALL msg=audit(1655430696.381:370): arch=c000003e syscall=5 success=yes exit=0 a0=4 a1=7ffcf1b1bab0 a2=7ffcf1b1bab0 a3=0 items=0 ppid=1 pid=92464 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="samba-dcerpcd" exe="/usr/libexec/samba/samba-dcerpcd" subj=system_u:system_r:winbind_rpcd_t:s0 key=(null)
type=AVC msg=audit(1655430696.381:370): avc:  denied  { getattr } for  pid=92464 comm="samba-dcerpcd" path="/var/lib/sss/mc/passwd" dev="dm-0" ino=235086415 scontext=system_u:system_r:winbind_rpcd_t:s0 tcontext=system_u:object_r:sssd_public_t:s0 tclass=file permissive=1
----
time->Thu Jun 16 21:51:36 2022
type=PROCTITLE msg=audit(1655430696.381:371): proctitle=2F7573722F6C6962657865632F73616D62612F73616D62612D64636572706364002D2D6C6962657865632D7270636473002D2D72656164792D7369676E616C2D66643D3333002D2D6E702D68656C706572002D2D64656275676C6576656C3D30
type=SYSCALL msg=audit(1655430696.381:371): arch=c000003e syscall=9 success=yes exit=140594152484864 a0=0 a1=8d32e0 a2=1 a3=1 items=0 ppid=1 pid=92464 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="samba-dcerpcd" exe="/usr/libexec/samba/samba-dcerpcd" subj=system_u:system_r:winbind_rpcd_t:s0 key=(null)
type=AVC msg=audit(1655430696.381:371): avc:  denied  { map } for  pid=92464 comm="samba-dcerpcd" path="/var/lib/sss/mc/passwd" dev="dm-0" ino=235086415 scontext=system_u:system_r:winbind_rpcd_t:s0 tcontext=system_u:object_r:sssd_public_t:s0 tclass=file permissive=1
----
time->Thu Jun 16 21:51:36 2022
type=PROCTITLE msg=audit(1655430696.383:372): proctitle=2F7573722F6C6962657865632F73616D62612F73616D62612D64636572706364002D2D6C6962657865632D7270636473002D2D72656164792D7369676E616C2D66643D3333002D2D6E702D68656C706572002D2D64656275676C6576656C3D30
type=SYSCALL msg=audit(1655430696.383:372): arch=c000003e syscall=42 success=yes exit=0 a0=d a1=55e2c2cc2d40 a2=1d a3=7ffcf1b1b010 items=0 ppid=1 pid=92464 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="samba-dcerpcd" exe="/usr/libexec/samba/samba-dcerpcd" subj=system_u:system_r:winbind_rpcd_t:s0 key=(null)
type=AVC msg=audit(1655430696.383:372): avc:  denied  { connectto } for  pid=92464 comm="samba-dcerpcd" path="/run/dbus/system_bus_socket" scontext=system_u:system_r:winbind_rpcd_t:s0 tcontext=system_u:system_r:system_dbusd_t:s0-s0:c0.c1023 tclass=unix_stream_socket permissive=1
type=AVC msg=audit(1655430696.383:372): avc:  denied  { write } for  pid=92464 comm="samba-dcerpcd" name="system_bus_socket" dev="tmpfs" ino=43923 scontext=system_u:system_r:winbind_rpcd_t:s0 tcontext=system_u:object_r:system_dbusd_var_run_t:s0 tclass=sock_file permissive=1
----
time->Thu Jun 16 21:51:36 2022
type=PROCTITLE msg=audit(1655430696.493:376): proctitle=2F7573722F6C6962657865632F73616D62612F727063645F7270636563686F002D2D6C6973742D696E7465726661636573002D2D636F6E66696766696C653D2F6574632F73616D62612F736D622E636F6E66
type=SYSCALL msg=audit(1655430696.493:376): arch=c000003e syscall=21 success=yes exit=0 a0=7ffd90e04880 a1=4 a2=8 a3=5 items=0 ppid=92464 pid=92471 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="rpcd_rpcecho" exe="/usr/libexec/samba/rpcd_rpcecho" subj=system_u:system_r:winbind_rpcd_t:s0 key=(null)
type=AVC msg=audit(1655430696.493:376): avc:  denied  { read } for  pid=92471 comm="rpcd_rpcecho" name="unix" dev="proc" ino=4026532071 scontext=system_u:system_r:winbind_rpcd_t:s0 tcontext=system_u:object_r:proc_net_t:s0 tclass=file permissive=1
----
time->Thu Jun 16 21:51:36 2022
type=PROCTITLE msg=audit(1655430696.671:377): proctitle=2F7573722F6C6962657865632F73616D62612F727063645F636C6173736963002D2D636F6E66696766696C653D2F6574632F73616D62612F736D622E636F6E66002D2D776F726B65722D67726F75703D37002D2D776F726B65722D696E6465783D30002D2D64656275676C6576656C3D30
type=SYSCALL msg=audit(1655430696.671:377): arch=c000003e syscall=42 success=yes exit=0 a0=13 a1=55e36de10a50 a2=6e a3=7ffdb9f64ea0 items=0 ppid=92464 pid=92474 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="rpcd_classic" exe="/usr/libexec/samba/rpcd_classic" subj=system_u:system_r:winbind_rpcd_t:s0 key=(null)
type=AVC msg=audit(1655430696.671:377): avc:  denied  { connectto } for  pid=92474 comm="rpcd_classic" path="/run/samba/ncalrpc/np/winreg" scontext=system_u:system_r:winbind_rpcd_t:s0 tcontext=system_u:system_r:winbind_rpcd_t:s0 tclass=unix_stream_socket permissive=1
----
time->Thu Jun 16 21:51:36 2022
type=PROCTITLE msg=audit(1655430696.672:378): proctitle=2F7573722F6C6962657865632F73616D62612F727063645F636C6173736963002D2D636F6E66696766696C653D2F6574632F73616D62612F736D622E636F6E66002D2D776F726B65722D67726F75703D37002D2D776F726B65722D696E6465783D30002D2D64656275676C6576656C3D30
type=SYSCALL msg=audit(1655430696.672:378): arch=c000003e syscall=42 success=yes exit=0 a0=12 a1=7ffdb9f64de0 a2=6e a3=0 items=0 ppid=92464 pid=92474 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="rpcd_classic" exe="/usr/libexec/samba/rpcd_classic" subj=system_u:system_r:winbind_rpcd_t:s0 key=(null)
type=AVC msg=audit(1655430696.672:378): avc:  denied  { connectto } for  pid=92474 comm="rpcd_classic" path="/var/lib/sss/pipes/nss" scontext=system_u:system_r:winbind_rpcd_t:s0 tcontext=system_u:system_r:sssd_t:s0 tclass=unix_stream_socket permissive=1
type=AVC msg=audit(1655430696.672:378): avc:  denied  { write } for  pid=92474 comm="rpcd_classic" name="nss" dev="dm-0" ino=251739675 scontext=system_u:system_r:winbind_rpcd_t:s0 tcontext=system_u:object_r:sssd_var_lib_t:s0 tclass=sock_file permissive=1
----
time->Thu Jun 16 21:51:36 2022
type=PROCTITLE msg=audit(1655430696.673:379): proctitle=2F7573722F6C6962657865632F73616D62612F727063645F636C6173736963002D2D636F6E66696766696C653D2F6574632F73616D62612F736D622E636F6E66002D2D776F726B65722D67726F75703D37002D2D776F726B65722D696E6465783D30002D2D64656275676C6576656C3D30
type=SYSCALL msg=audit(1655430696.673:379): arch=c000003e syscall=4 success=yes exit=0 a0=55e36de113e8 a1=7ffdb9f62c40 a2=7ffdb9f62c40 a3=0 items=0 ppid=92464 pid=92474 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="rpcd_classic" exe="/usr/libexec/samba/rpcd_classic" subj=system_u:system_r:winbind_rpcd_t:s0 key=(null)
type=AVC msg=audit(1655430696.673:379): avc:  denied  { getattr } for  pid=92474 comm="rpcd_classic" path="/etc/krb5.conf" dev="dm-0" ino=100693580 scontext=system_u:system_r:winbind_rpcd_t:s0 tcontext=system_u:object_r:krb5_conf_t:s0 tclass=file permissive=1


+++ This bug was initially created as a clone of Bug #2097789 +++

Description of problem:
When execute "smbclient -L //$SERVER/testuser -N", Selinux always print avc denied.

[root@sweetpig-11 cthon04]# smbclient -L //sweetpig-11.4a2m.lab.eng.bos.redhat.com/testuser  -N
Anonymous login successful

	Sharename       Type      Comment
	---------       ----      -------
	testuser        Disk      
	IPC$            IPC       IPC Service (Samba 4.16.1)
SMB1 disabled -- no workgroup available
[root@sweetpig-11 cthon04]# ausearch -m avc
----
time->Thu Jun 16 05:01:54 2022
type=PROCTITLE msg=audit(1655370114.462:794): proctitle=2F7573722F6C6962657865632F73616D62612F727063645F636C6173736963002D2D636F6E66696766696C653D2F6574632F73616D62612F736D622E636F6E66002D2D776F726B65722D67726F75703D32002D2D776F726B65722D696E6465783D30002D2D64656275676C6576656C3D30
type=SYSCALL msg=audit(1655370114.462:794): arch=c000003e syscall=42 success=yes exit=0 a0=11 a1=558e96696540 a2=6e a3=7fd0699b0bb4 items=0 ppid=78476 pid=78486 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="rpcd_classic" exe="/usr/libexec/samba/rpcd_classic" subj=system_u:system_r:winbind_rpcd_t:s0 key=(null)
type=AVC msg=audit(1655370114.462:794): avc:  denied  { connectto } for  pid=78486 comm="rpcd_classic" path="/run/samba/ncalrpc/np/winreg" scontext=system_u:system_r:winbind_rpcd_t:s0 tcontext=system_u:system_r:winbind_rpcd_t:s0 tclass=unix_stream_socket permissive=1

[root@sweetpig-11 ~]# cat /etc/samba/smb.conf
[testuser]
	path = /mnt/cifs
	writeable=yes

[root@sweetpig-11 ~]# getenforce 
Permissive

This issue is included from selinux-policy-34.1.34-1.el9.noarch. Doesn't have this issue in selinux-policy-34.1.33-1.el9.noarch.

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

selinux-policy-34.1.34-1.el9.noarch
samba-4.16.1-100.el9.x86_64
5.14.0-109.el9.x86_64

How reproducible:
100%

Steps to Reproduce:
1. systemctl start smb
2. smbclient -L //sweetpig-11.4a2m.lab.eng.bos.redhat.com/testuser  -N
3.

Actual results:
Selinux print avc denied when execute "smbclient -L".

Expected results:
Selinux doesn't print avc denied when execute "smbclient -L".

Additional info:

--- Additional comment from Milos Malik on 2022-06-16 15:22:58 UTC ---

Comment 1 Milos Malik 2022-06-17 07:19:13 UTC

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


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