Bug 1767204

Summary: SELinux is preventing ping from 'setopt' accesses on the icmp_socket labeled automount_t.
Product: [Fedora] Fedora Reporter: juantxorena
Component: selinux-policyAssignee: Lukas Vrabec <lvrabec>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 31CC: dwalsh, lvrabec, mgrepl, plautrba, zpytela
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:d54e434f2821e52232039a3a400ee7be00c5849d8bfffed1e3ee966e6c4e0356;
Fixed In Version: selinux-policy-3.14.4-40.fc31 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-11-13 10:05:59 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 juantxorena 2019-10-30 21:56:55 UTC
Description of problem:
When trying to launch something from krunner (KDE), this error appears as soon as a character is input and krunner gets frozen.
SELinux is preventing ping from 'setopt' accesses on the icmp_socket labeled automount_t.

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

If you believe that ping should be allowed setopt access on icmp_socket labeled automount_t 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 'ping' --raw | audit2allow -M my-ping
# semodule -X 300 -i my-ping.pp

Additional Information:
Source Context                system_u:system_r:automount_t:s0
Target Context                system_u:system_r:automount_t:s0
Target Objects                Unknown [ icmp_socket ]
Source                        ping
Source Path                   ping
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    <Unknown>
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 5.3.7-301.fc31.x86_64 #1 SMP Mon
                              Oct 21 19:18:58 UTC 2019 x86_64 x86_64
Alert Count                   1248
First Seen                    2019-10-30 22:02:17 CET
Last Seen                     2019-10-30 22:43:09 CET
Local ID                      9af1cfba-caed-4799-b0fc-8bc69fe2963f

Raw Audit Messages
type=AVC msg=audit(1572471789.514:375): avc:  denied  { setopt } for  pid=5167 comm="ping" scontext=system_u:system_r:automount_t:s0 tcontext=system_u:system_r:automount_t:s0 tclass=icmp_socket permissive=0


Hash: ping,automount_t,automount_t,icmp_socket,setopt


Additional info:
component:      selinux-policy
reporter:       libreport-2.10.1
hashmarkername: setroubleshoot
kernel:         5.3.7-301.fc31.x86_64
type:           libreport

Comment 1 Lukas Vrabec 2019-10-31 16:50:33 UTC
commit 0d267788f42c4e377658c3cb82ff530c7c0ff99d (HEAD -> rawhide)
Author: Lukas Vrabec <lvrabec>
Date:   Thu Oct 31 17:50:03 2019 +0100

    Allow automount_t domain to execute ping in own SELinux domain (ping_t)
    
    Resolves: rhbz#1767204

Comment 2 Fedora Update System 2019-11-03 14:09:10 UTC
FEDORA-2019-aec8f7ab50 has been submitted as an update to Fedora 31. https://bodhi.fedoraproject.org/updates/FEDORA-2019-aec8f7ab50

Comment 3 Fedora Update System 2019-11-04 02:18:50 UTC
selinux-policy-3.14.4-40.fc31 has been pushed to the Fedora 31 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-aec8f7ab50

Comment 4 Fedora Update System 2019-11-13 10:05:59 UTC
selinux-policy-3.14.4-40.fc31 has been pushed to the Fedora 31 stable repository. If problems still persist, please make note of it in this bug report.