Bug 1733630

Summary: selinux blocks dhcpd /proc/sys/net/ipv4/ip_local_port_range
Product: [Fedora] Fedora Reporter: Todd <ToddAndMargo>
Component: selinux-policyAssignee: Lukas Vrabec <lvrabec>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 30CC: dwalsh, lvrabec, mgrepl, plautrba, zpytela
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-07-29 07:15:16 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:

Description Todd 2019-07-26 19:57:03 UTC
Fedora 30, x64

Selinux keeps popping the following error and running the suggested commands does nothing.

SELinux is preventing dhcpd from open access on the file /proc/sys/net/ipv4/ip_local_port_range.

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

If you believe that dhcpd should be allowed open access on the ip_local_port_range file by default.
Then you should report this as a bug.
You can generate a local policy module to allow this access.
allow this access for now by executing:
# 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                /proc/sys/net/ipv4/ip_local_port_range [ file ]
Source                        dhcpd
Source Path                   dhcpd
Port                          <Unknown>
Host                          xx.yy.local
Source RPM Packages           
Target RPM Packages           
Policy RPM                    <Unknown>
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     xx.yy.local
Platform                      Linux xx.yy.local 5.1.19-300.fc30.x86_64
                              #1 SMP Mon Jul 22 16:32:45 UTC 2019 x86_64 x86_64
Alert Count                   10
First Seen                    2019-07-25 08:17:38 PDT
Last Seen                     2019-07-26 12:41:24 PDT
Local ID                      d89e3c22-5a11-46db-8401-a2646e951564

Raw Audit Messages
type=AVC msg=audit(1564170084.135:518): avc:  denied  { open } for  pid=3214 comm="dhcpd" path="/proc/sys/net/ipv4/ip_local_port_range" dev="proc" ino=32123 scontext=system_u:system_r:dhcpd_t:s0 tcontext=system_u:object_r:sysctl_net_t:s0 tclass=file permissive=0

Hash: dhcpd,dhcpd_t,sysctl_net_t,file,open

Comment 1 Zdenek Pytela 2019-07-29 07:15:16 UTC

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