Bug 2231732 - SELinux is preventing ipa-server-guar from 'search' accesses on the directory net.
Summary: SELinux is preventing ipa-server-guar from 'search' accesses on the directory...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 38
Hardware: x86_64
OS: Unspecified
medium
unspecified
Target Milestone: ---
Assignee: Zdenek Pytela
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:b527f2c07b3cc3cc61c6975dcab...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-08-13 16:41 UTC by James
Modified: 2024-03-15 01:49 UTC (History)
9 users (show)

Fixed In Version: selinux-policy-38.32-1.fc38
Clone Of:
Environment:
Last Closed: 2024-03-15 01:49:51 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
File: description (1.89 KB, text/plain)
2023-08-13 16:41 UTC, James
no flags Details
File: os_info (688 bytes, text/plain)
2023-08-13 16:41 UTC, James
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Github fedora-selinux selinux-policy pull 1853 0 None Merged Allow certmonger read network sysctls 2024-01-26 17:33:26 UTC

Description James 2023-08-13 16:41:40 UTC
Description of problem:
SELinux is preventing ipa-server-guar from 'search' accesses on the directory net.

*****  Plugin catchall (100. confidence) suggests   **************************

If you believe that ipa-server-guar should be allowed search access on the net directory 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 'ipa-server-guar' --raw | audit2allow -M my-ipaserverguar
# semodule -X 300 -i my-ipaserverguar.pp

Additional Information:
Source Context                system_u:system_r:certmonger_t:s0
Target Context                system_u:object_r:sysctl_net_t:s0
Target Objects                net [ dir ]
Source                        ipa-server-guar
Source Path                   ipa-server-guar
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
SELinux Policy RPM            selinux-policy-targeted-38.24-1.fc38.noarch
Local Policy RPM              selinux-policy-targeted-38.24-1.fc38.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 6.4.9-200.fc38.x86_64 #1 SMP
                              PREEMPT_DYNAMIC Tue Aug 8 21:21:11 UTC 2023 x86_64
Alert Count                   1476
First Seen                    2023-07-13 20:09:00 BST
Last Seen                     2023-08-12 13:56:24 BST
Local ID                      f3e3f090-022f-45d2-9c11-2205ae4d34dc

Raw Audit Messages
type=AVC msg=audit(1691844984.141:222): avc:  denied  { search } for  pid=1513 comm="dogtag-ipa-ca-r" name="net" dev="proc" ino=2356 scontext=system_u:system_r:certmonger_t:s0 tcontext=system_u:object_r:sysctl_net_t:s0 tclass=dir permissive=0


Hash: ipa-server-guar,certmonger_t,sysctl_net_t,dir,search

Version-Release number of selected component:
selinux-policy-targeted-38.24-1.fc38.noarch

Additional info:
reporter:       libreport-2.17.11
reason:         SELinux is preventing ipa-server-guar from 'search' accesses on the directory net.
package:        selinux-policy-targeted-38.24-1.fc38.noarch
component:      selinux-policy
hashmarkername: setroubleshoot
type:           libreport
kernel:         6.4.9-200.fc38.x86_64
component:      selinux-policy

Comment 1 James 2023-08-13 16:41:43 UTC
Created attachment 1983200 [details]
File: description

Comment 2 James 2023-08-13 16:41:44 UTC
Created attachment 1983201 [details]
File: os_info

Comment 3 Zdenek Pytela 2023-08-24 20:23:53 UTC
James,

Can you switch the system to permissive mode and gather all denials?

setenforce 0
<reproduce>
ausearch -i -m avc,user_avc,selinux_err,user_selinux_err -ts today
setenforce 1

Comment 4 James 2024-01-13 21:22:13 UTC
Apologies for taking many months to respond.

I don't know exactly what triggers these denials, they seem to happen on boot so I set permissive mode then restarted. The machine is a FreeIPA server selinux-policy-targeted-39.3-1.fc39.noarch which has been re-labelled.

ausearch output, with timestamps since the prior boot:


type=AVC msg=audit(13/01/24 21:19:33.612:137) : avc:  denied  { search } for  pid=1491 comm=ipa-server-guar name=net dev="proc" ino=2405 scontext=system_u:system_r:certmonger_t:s0 tcontext=system_u:object_r:sysctl_net_t:s0 tclass=dir permissive=1
----
type=AVC msg=audit(13/01/24 21:19:33.612:138) : avc:  denied  { read } for  pid=1491 comm=ipa-server-guar name=disable_ipv6 dev="proc" ino=12111 scontext=system_u:system_r:certmonger_t:s0 tcontext=system_u:object_r:sysctl_net_t:s0 tclass=file permissive=1
----
type=AVC msg=audit(13/01/24 21:19:33.612:139) : avc:  denied  { open } for  pid=1491 comm=ipa-server-guar path=/proc/sys/net/ipv6/conf/all/disable_ipv6 dev="proc" ino=12111 scontext=system_u:system_r:certmonger_t:s0 tcontext=system_u:object_r:sysctl_net_t:s0 tclass=file permissive=1
----
type=AVC msg=audit(13/01/24 21:19:33.612:140) : avc:  denied  { getattr } for  pid=1491 comm=ipa-server-guar path=/proc/sys/net/ipv6/conf/all/disable_ipv6 dev="proc" ino=12111 scontext=system_u:system_r:certmonger_t:s0 tcontext=system_u:object_r:sysctl_net_t:s0 tclass=file permissive=1
----
type=AVC msg=audit(13/01/24 21:19:34.455:145) : avc:  denied  { read } for  pid=1553 comm=dogtag-ipa-ca-r name=disable_ipv6 dev="proc" ino=12111 scontext=system_u:system_r:certmonger_t:s0 tcontext=system_u:object_r:sysctl_net_t:s0 tclass=file permissive=1
----
type=AVC msg=audit(13/01/24 21:19:34.455:146) : avc:  denied  { open } for  pid=1553 comm=dogtag-ipa-ca-r path=/proc/sys/net/ipv6/conf/all/disable_ipv6 dev="proc" ino=12111 scontext=system_u:system_r:certmonger_t:s0 tcontext=system_u:object_r:sysctl_net_t:s0 tclass=file permissive=1
----
type=AVC msg=audit(13/01/24 21:19:34.456:147) : avc:  denied  { getattr } for  pid=1553 comm=dogtag-ipa-ca-r path=/proc/sys/net/ipv6/conf/all/disable_ipv6 dev="proc" ino=12111 scontext=system_u:system_r:certmonger_t:s0 tcontext=system_u:object_r:sysctl_net_t:s0 tclass=file permissive=1
----
type=AVC msg=audit(13/01/24 21:19:34.553:148) : avc:  denied  { search } for  pid=1521 comm=dogtag-ipa-ca-r name=net dev="proc" ino=2405 scontext=system_u:system_r:certmonger_t:s0 tcontext=system_u:object_r:sysctl_net_t:s0 tclass=dir permissive=1
----
type=AVC msg=audit(13/01/24 21:19:34.964:155) : avc:  denied  { read } for  pid=1559 comm=dogtag-ipa-ca-r name=disable_ipv6 dev="proc" ino=12111 scontext=system_u:system_r:certmonger_t:s0 tcontext=system_u:object_r:sysctl_net_t:s0 tclass=file permissive=1
----
type=AVC msg=audit(13/01/24 21:19:34.969:156) : avc:  denied  { open } for  pid=1559 comm=dogtag-ipa-ca-r path=/proc/sys/net/ipv6/conf/all/disable_ipv6 dev="proc" ino=12111 scontext=system_u:system_r:certmonger_t:s0 tcontext=system_u:object_r:sysctl_net_t:s0 tclass=file permissive=1
----
type=AVC msg=audit(13/01/24 21:19:34.969:157) : avc:  denied  { getattr } for  pid=1559 comm=dogtag-ipa-ca-r path=/proc/sys/net/ipv6/conf/all/disable_ipv6 dev="proc" ino=12111 scontext=system_u:system_r:certmonger_t:s0 tcontext=system_u:object_r:sysctl_net_t:s0 tclass=file permissive=1
----
type=AVC msg=audit(13/01/24 21:19:35.016:158) : avc:  denied  { search } for  pid=1553 comm=dogtag-ipa-ca-r name=net dev="proc" ino=2405 scontext=system_u:system_r:certmonger_t:s0 tcontext=system_u:object_r:sysctl_net_t:s0 tclass=dir permissive=1
----
type=AVC msg=audit(13/01/24 21:19:35.336:160) : avc:  denied  { search } for  pid=1556 comm=dogtag-ipa-ca-r name=net dev="proc" ino=2405 scontext=system_u:system_r:certmonger_t:s0 tcontext=system_u:object_r:sysctl_net_t:s0 tclass=dir permissive=1
----
type=AVC msg=audit(13/01/24 21:19:35.336:161) : avc:  denied  { read } for  pid=1556 comm=dogtag-ipa-ca-r name=disable_ipv6 dev="proc" ino=12111 scontext=system_u:system_r:certmonger_t:s0 tcontext=system_u:object_r:sysctl_net_t:s0 tclass=file permissive=1
----
type=AVC msg=audit(13/01/24 21:19:35.336:162) : avc:  denied  { open } for  pid=1556 comm=dogtag-ipa-ca-r path=/proc/sys/net/ipv6/conf/all/disable_ipv6 dev="proc" ino=12111 scontext=system_u:system_r:certmonger_t:s0 tcontext=system_u:object_r:sysctl_net_t:s0 tclass=file permissive=1
----
type=AVC msg=audit(13/01/24 21:19:35.336:163) : avc:  denied  { getattr } for  pid=1556 comm=dogtag-ipa-ca-r path=/proc/sys/net/ipv6/conf/all/disable_ipv6 dev="proc" ino=12111 scontext=system_u:system_r:certmonger_t:s0 tcontext=system_u:object_r:sysctl_net_t:s0 tclass=file permissive=1
----
type=AVC msg=audit(13/01/24 21:19:39.139:173) : avc:  denied  { name_bind } for  pid=2120 comm=rpcbind src=62779 scontext=system_u:system_r:rpcbind_t:s0 tcontext=system_u:object_r:unreserved_port_t:s0 tclass=udp_socket permissive=1
----
type=USER_AVC msg=audit(13/01/24 21:19:43.652:188) : pid=1107 uid=dbus auid=unset ses=unset subj=system_u:system_r:system_dbusd_t:s0-s0:c0.c1023 msg='avc:  denied  { send_msg } for  scontext=system_u:system_r:httpd_t:s0 tcontext=system_u:system_r:avahi_t:s0 tclass=dbus permissive=1 exe=/usr/bin/dbus-broker sauid=dbus hostname=? addr=? terminal=?'
----
type=USER_AVC msg=audit(13/01/24 21:19:43.654:189) : pid=1107 uid=dbus auid=unset ses=unset subj=system_u:system_r:system_dbusd_t:s0-s0:c0.c1023 msg='avc:  denied  { send_msg } for  scontext=system_u:system_r:avahi_t:s0 tcontext=system_u:system_r:httpd_t:s0 tclass=dbus permissive=1 exe=/usr/bin/dbus-broker sauid=dbus hostname=? addr=? terminal=?'


(Or is this a FreeIPA bug?)

Comment 5 Zdenek Pytela 2024-01-15 10:00:27 UTC
Thank you. There are 3 buckets of denials:
1. certmonger - will be added to the policy
2. avahi dbus - requires to turn the httpd_dbus_avahi boolean on
3. a bug in rpcbind, already reported

Comment 6 Fedora Update System 2024-02-28 10:08:49 UTC
FEDORA-2024-d1d8ba7222 (selinux-policy-38.32-1.fc38) has been submitted as an update to Fedora 38.
https://bodhi.fedoraproject.org/updates/FEDORA-2024-d1d8ba7222

Comment 7 Fedora Update System 2024-02-29 02:01:52 UTC
FEDORA-2024-d1d8ba7222 has been pushed to the Fedora 38 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2024-d1d8ba7222`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2024-d1d8ba7222

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 8 Fedora Update System 2024-03-15 01:49:51 UTC
FEDORA-2024-d1d8ba7222 (selinux-policy-38.32-1.fc38) has been pushed to the Fedora 38 stable repository.
If problem still persists, please make note of it in this bug report.


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