Bug 1733609

Summary: SELinux is preventing dhcpd from 'search' accesses on the katalog net.
Product: [Fedora] Fedora Reporter: Leszek Matok <lam>
Component: selinux-policyAssignee: Lukas Vrabec <lvrabec>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: 30CC: dwalsh, lvrabec, mgrepl, plautrba, ToddAndMargo, zpytela
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:c90be2d39b11fbae922907e1ece997cc235a966996bacd49a2e7419965cb8ee2;
Fixed In Version: selinux-policy-3.14.3-45.fc30 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-09-06 12:33:41 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Leszek Matok 2019-07-26 18:36:53 UTC
Description of problem:
I believe this was caused by selinux-policy-targeted-3.14.3-41.fc30.noarch. I updated to it on 2019-07-21 and first occurrence of this selinux exception happened after reboot.
SELinux is preventing dhcpd from 'search' accesses on the katalog net.

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

Aby dhcpd powinno mieć domyślnie search dostęp do net directory.
Then proszę to zgłosić jako błąd.
Można utworzyć lokalny moduł polityki, aby umożliwić ten dostęp.
Do
można tymczasowo zezwolić na ten dostęp wykonując polecenia:
# ausearch -c 'dhcpd' --raw | audit2allow -M my-dhcpd
# semodule -X 300 -i my-dhcpd.pp

Additional Information:
Source Context                system_u:system_r:dhcpd_t:s0
Target Context                system_u:object_r:sysctl_net_t:s0
Target Objects                net [ dir ]
Source                        dhcpd
Source Path                   dhcpd
Port                          <Nieznane>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    <Nieznane>
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 5.1.19-300.fc30.x86_64 #1 SMP Mon
                              Jul 22 16:32:45 UTC 2019 x86_64 x86_64
Alert Count                   2
First Seen                    2019-07-26 20:19:14 CEST
Last Seen                     2019-07-26 20:19:14 CEST
Local ID                      793f34d1-9ddf-4406-b5c1-6350fa0e7027

Raw Audit Messages
type=AVC msg=audit(1564165154.705:153): avc:  denied  { search } for  pid=8126 comm="dhcpd" name="net" dev="proc" ino=13228 scontext=system_u:system_r:dhcpd_t:s0 tcontext=system_u:object_r:sysctl_net_t:s0 tclass=dir permissive=0


Hash: dhcpd,dhcpd_t,sysctl_net_t,dir,search


Additional info:
component:      selinux-policy
reporter:       libreport-2.10.1
hashmarkername: setroubleshoot
kernel:         5.1.19-300.fc30.x86_64
type:           libreport

Comment 1 Zdenek Pytela 2019-07-29 07:15:16 UTC
*** Bug 1733630 has been marked as a duplicate of this bug. ***

Comment 2 Lukas Vrabec 2019-07-29 13:17:30 UTC
commit 67ede1ee34ae0de2c84ecf4a6918b3d5c552173b (HEAD -> rawhide)
Author: Lukas Vrabec <lvrabec>
Date:   Mon Jul 29 15:16:48 2019 +0200

    Allow dhcpd_t domain to read network sysctls.
    
    Resolves: rhbz#1733609

Comment 3 Fedora Update System 2019-09-05 06:52:07 UTC
FEDORA-2019-be14ea0375 has been submitted as an update to Fedora 30. https://bodhi.fedoraproject.org/updates/FEDORA-2019-be14ea0375

Comment 4 Fedora Update System 2019-09-05 12:53:05 UTC
selinux-policy-3.14.3-45.fc30 has been pushed to the Fedora 30 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-be14ea0375

Comment 5 Fedora Update System 2019-09-06 12:33:41 UTC
selinux-policy-3.14.3-45.fc30 has been pushed to the Fedora 30 stable repository. If problems still persist, please make note of it in this bug report.