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 2157891 - SELinux prevents the prosody service from creating the /run/prosody/prosody.sock socket
Summary: SELinux prevents the prosody service from creating the /run/prosody/prosody.s...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: selinux-policy
Version: 9.2
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: rc
: ---
Assignee: Nikola Knazekova
QA Contact: Milos Malik
URL:
Whiteboard:
Depends On:
Blocks: 2157902
TreeView+ depends on / blocked
 
Reported: 2023-01-03 13:09 UTC by Milos Malik
Modified: 2023-05-09 10:21 UTC (History)
3 users (show)

Fixed In Version: selinux-policy-38.1.4-1.el9
Doc Type: No Doc Update
Doc Text:
Clone Of:
: 2157902 (view as bug list)
Environment:
Last Closed: 2023-05-09 08:17:04 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 1544 0 None open Allow prosody manage its runtime socket files 2023-01-04 07:45:28 UTC
Red Hat Issue Tracker RHELPLAN-143542 0 None None None 2023-01-03 13:13:07 UTC
Red Hat Product Errata RHBA-2023:2483 0 None None None 2023-05-09 08:17:18 UTC

Description Milos Malik 2023-01-03 13:09:11 UTC
Description of problem:
 * the prosody service starts and runs successfully, but the SELinux denial is triggered

Version-Release number of selected component (if applicable):
prosody-0.12.2-1.el9.x86_64
selinux-policy-38.1.3-1.el9.noarch
selinux-policy-targeted-38.1.3-1.el9.noarch

How reproducible:
 * always

Steps to Reproduce:
1. get a RHEL-9.2 machine (targeted policy is active)
2. install the prosody package (comes from the EPEL repository)
3. start the prosody service
4. search for SELinux denials

Actual results (enforcing mode):
----
type=PROCTITLE msg=audit(01/03/2023 08:00:07.165:332) : proctitle=/usr/bin/lua /usr/bin/prosody -F 
type=PATH msg=audit(01/03/2023 08:00:07.165:332) : item=1 name=/run/prosody/prosody.sock nametype=CREATE cap_fp=none cap_fi=none cap_fe=0 cap_fver=0 cap_frootid=0 
type=PATH msg=audit(01/03/2023 08:00:07.165:332) : item=0 name=/run/prosody/ inode=1013 dev=00:19 mode=dir,755 ouid=prosody ogid=prosody rdev=00:00 obj=system_u:object_r:prosody_var_run_t:s0 nametype=PARENT cap_fp=none cap_fi=none cap_fe=0 cap_fver=0 cap_frootid=0 
type=CWD msg=audit(01/03/2023 08:00:07.165:332) : cwd=/var/lib/prosody 
type=SOCKADDR msg=audit(01/03/2023 08:00:07.165:332) : saddr={ saddr_fam=local path=/run/prosody/prosody.sock } 
type=SYSCALL msg=audit(01/03/2023 08:00:07.165:332) : arch=x86_64 syscall=bind success=no exit=EACCES(Permission denied) a0=0xb a1=0x7ffcd551b950 a2=0x1b a3=0x564633519a70 items=2 ppid=1 pid=4532 auid=unset uid=prosody gid=prosody euid=prosody suid=prosody fsuid=prosody egid=prosody sgid=prosody fsgid=prosody tty=(none) ses=unset comm=prosody exe=/usr/bin/lua subj=system_u:system_r:prosody_t:s0 key=(null) 
type=AVC msg=audit(01/03/2023 08:00:07.165:332) : avc:  denied  { create } for  pid=4532 comm=prosody name=prosody.sock scontext=system_u:system_r:prosody_t:s0 tcontext=system_u:object_r:prosody_var_run_t:s0 tclass=sock_file permissive=0 
----

Expected results:
 * no SELinux denials

Additional info:
the only SELinux denial that appears in permissive mode is
----
type=PROCTITLE msg=audit(01/03/2023 08:08:15.106:336) : proctitle=/usr/bin/lua /usr/bin/prosody -F 
type=PATH msg=audit(01/03/2023 08:08:15.106:336) : item=1 name=/run/prosody/prosody.sock inode=1042 dev=00:19 mode=socket,750 ouid=prosody ogid=prosody rdev=00:00 obj=system_u:object_r:prosody_var_run_t:s0 nametype=CREATE cap_fp=none cap_fi=none cap_fe=0 cap_fver=0 cap_frootid=0 
type=PATH msg=audit(01/03/2023 08:08:15.106:336) : item=0 name=/run/prosody/ inode=1013 dev=00:19 mode=dir,755 ouid=prosody ogid=prosody rdev=00:00 obj=system_u:object_r:prosody_var_run_t:s0 nametype=PARENT cap_fp=none cap_fi=none cap_fe=0 cap_fver=0 cap_frootid=0 
type=CWD msg=audit(01/03/2023 08:08:15.106:336) : cwd=/var/lib/prosody 
type=SOCKADDR msg=audit(01/03/2023 08:08:15.106:336) : saddr={ saddr_fam=local path=/run/prosody/prosody.sock } 
type=SYSCALL msg=audit(01/03/2023 08:08:15.106:336) : arch=x86_64 syscall=bind success=yes exit=0 a0=0x7 a1=0x7ffd175eaa50 a2=0x1b a3=0x560929632310 items=2 ppid=1 pid=4576 auid=unset uid=prosody gid=prosody euid=prosody suid=prosody fsuid=prosody egid=prosody sgid=prosody fsgid=prosody tty=(none) ses=unset comm=prosody exe=/usr/bin/lua subj=system_u:system_r:prosody_t:s0 key=(null) 
type=AVC msg=audit(01/03/2023 08:08:15.106:336) : avc:  denied  { create } for  pid=4576 comm=prosody name=prosody.sock scontext=system_u:system_r:prosody_t:s0 tcontext=system_u:object_r:prosody_var_run_t:s0 tclass=sock_file permissive=1 
----

Comment 11 errata-xmlrpc 2023-05-09 08:17:04 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-2023:2483


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