Bug 1601367

Summary: SELinux is preventing /usr/sbin/xtables-legacy-multi from 'read' accesses on the file xtables.lock.
Product: [Fedora] Fedora Reporter: Lukas Slebodnik <lslebodn>
Component: selinux-policyAssignee: Lukas Vrabec <lvrabec>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 29CC: dwalsh, lvrabec, mgrepl, plautrba, pmoore
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:33e3f8e0c346989797d69f0fb7b72dbf9930d35d246c13ea1bbc89cea54df9b2;VARIANT_ID=server;
Fixed In Version: selinux-policy-3.14.2-34.fc29 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-09-12 02:59:11 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 Lukas Slebodnik 2018-07-16 08:18:50 UTC
Description of problem:
SELinux is preventing /usr/sbin/xtables-legacy-multi from 'read' accesses on the file xtables.lock.

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

If you believe that xtables-legacy-multi should be allowed read access on the xtables.lock file 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 'iptables-restor' --raw | audit2allow -M my-iptablesrestor
# semodule -X 300 -i my-iptablesrestor.pp

Additional Information:
Source Context                system_u:system_r:firewalld_t:s0
Target Context                system_u:object_r:iptables_var_run_t:s0
Target Objects                xtables.lock [ file ]
Source                        iptables-restor
Source Path                   /usr/sbin/xtables-legacy-multi
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           iptables-1.8.0-2.fc29.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.14.2-26.fc29.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 4.17.5-200.fc28.x86_64 #1 SMP Tue
                              Jul 10 13:39:04 UTC 2018 x86_64 x86_64
Alert Count                   6
First Seen                    2018-07-16 00:34:43 CEST
Last Seen                     2018-07-16 10:16:59 CEST
Local ID                      62aa430a-8da6-4cf7-859c-738fa0199777

Raw Audit Messages
type=AVC msg=audit(1531729019.147:943): avc:  denied  { read } for  pid=4060 comm="ip6tables-resto" name="xtables.lock" dev="tmpfs" ino=30142 scontext=system_u:system_r:firewalld_t:s0 tcontext=system_u:object_r:iptables_var_run_t:s0 tclass=file permissive=0


type=SYSCALL msg=audit(1531729019.147:943): arch=x86_64 syscall=openat success=no exit=EACCES a0=ffffff9c a1=5621604bb658 a2=40 a3=180 items=0 ppid=1383 pid=4060 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm=ip6tables-resto exe=/usr/sbin/xtables-legacy-multi subj=system_u:system_r:firewalld_t:s0 key=(null)

Hash: iptables-restor,firewalld_t,iptables_var_run_t,file,read

Version-Release number of selected component:
selinux-policy-3.14.2-26.fc29.noarch

Additional info:
component:      selinux-policy
reporter:       libreport-2.9.5
hashmarkername: setroubleshoot
kernel:         4.17.5-200.fc28.x86_64
type:           libreport

Comment 1 Jan Kurik 2018-08-14 11:16:44 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 29 development cycle.
Changing version to '29'.

Comment 2 Fedora Update System 2018-09-11 12:52:45 UTC
selinux-policy-3.14.2-34.fc29 has been submitted as an update to Fedora 29. https://bodhi.fedoraproject.org/updates/FEDORA-2018-db240a1726

Comment 3 Fedora Update System 2018-09-12 02:59:11 UTC
selinux-policy-3.14.2-34.fc29 has been pushed to the Fedora 29 stable repository. If problems still persist, please make note of it in this bug report.