Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 2184999

Summary: rabbitmq: inet_gethost fails to access /proc/sys/net/ipv6/conf/all/disable_ipv6 when ipv6 is used
Product: Red Hat Enterprise Linux 9 Reporter: Takashi Kajinami <tkajinam>
Component: selinux-policyAssignee: Nobody <nobody>
Status: CLOSED ERRATA QA Contact: Milos Malik <mmalik>
Severity: medium Docs Contact: Petr Hybl <phybl>
Priority: unspecified    
Version: CentOS StreamCC: bstinson, jwboyer, lvrabec, mjahoda, mmalik, phybl, zpytela
Target Milestone: rcKeywords: Triaged
Target Release: ---Flags: pm-rhel: mirror+
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: selinux-policy-38.1.12-1.el9 Doc Type: Bug Fix
Doc Text:
.`rabbitmq` no longer fails with IPv6 Previously, when you deployed `rabbitmq` server with IPv6 enabled, the `inet_gethost` command tried to access the `/proc/sys/net/ipv6/conf/all/disable_ipv6` file. Consequently, the system denied access to `/proc/sys/net/ipv6/conf/all/disable_ipv6`. With this update, system can now read `/proc/sys/net/ipv6/conf/all/disable_ipv6`, and `rabbitmq` now works with IPv6.
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-11-07 08:52:21 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Takashi Kajinami 2023-04-06 12:46:24 UTC
Description of problem:

In upstream Puppet OpenStack jobs, we recently fixed the rabbitmq configuration
so that IPv6 is used. Since then, we have seen the following denials in audit.log.

~~~
type=AVC msg=audit(1680541632.613:9934): avc:  denied  { search } for  pid=81170 comm="inet_gethost" name="net" dev="proc" ino=14337 scontext=system_u:system_r:rabbitmq_t:s0 tcontext=system_u:object_r:sysctl_net_t:s0 tclass=dir permissive=1
type=AVC msg=audit(1680541632.613:9934): avc:  denied  { read } for  pid=81170 comm="inet_gethost" name="disable_ipv6" dev="proc" ino=171751 scontext=system_u:system_r:rabbitmq_t:s0 tcontext=system_u:object_r:sysctl_net_t:s0 tclass=file permissive=1
type=AVC msg=audit(1680541632.613:9934): avc:  denied  { open } for  pid=81170 comm="inet_gethost" path="/proc/sys/net/ipv6/conf/all/disable_ipv6" dev="proc" ino=171751 scontext=system_u:system_r:rabbitmq_t:s0 tcontext=system_u:object_r:sysctl_net_t:s0 tclass=file permissive=1
type=AVC msg=audit(1680541632.614:9935): avc:  denied  { getattr } for  pid=81170 comm="inet_gethost" path="/proc/sys/net/ipv6/conf/all/disable_ipv6" dev="proc" ino=171751 scontext=system_u:system_r:rabbitmq_t:s0 tcontext=system_u:object_r:sysctl_net_t:s0 tclass=file permissive=1
~~~

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

selinux-policy-38.1.9-1.el9.noarch
rabbitmq-server-3.9.21-1.el9s.x86_64

How reproducible:
Always

Steps to Reproduce:
1. Deploy rabbitmq with IPv6 enabled. Make sure /etc/rabbitmq/inetrc contains the option to enable ipv6
```
{inet6, true}.
```

2. Check audit.log

Actual results:
Access to /proc/sys/net/ipv6/conf/all/disable_ipv6 is continuously denied

Expected results:
Access to /proc/sys/net/ipv6/conf/all/disable_ipv6 should be alloed


Additional info:

Link for example build: https://zuul.opendev.org/t/openstack/build/ac2ce1ac07d44f909c1eb33e9a1701ba
audit.log can be found at https://9377a72dfb6b68b220fb-c6fc0fc83ecd661db282c48e7103b983.ssl.cf1.rackcdn.com/879244/6/check/puppet-openstack-integration-7-scenario005-tempest-centos-9-stream/ac2ce1a/logs/audit.log.txt

Comment 9 Nikola Knazekova 2023-10-03 08:11:47 UTC
@phybl LGTM

Comment 12 errata-xmlrpc 2023-11-07 08:52:21 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:6617