Bug 2060527

Summary: SELinux is preventing ip6tables from 'ioctl' accesses on the directory /sys/fs/cgroup.
Product: [Fedora] Fedora Reporter: Patrick Reinhart <patrick>
Component: selinux-policyAssignee: Zdenek Pytela <zpytela>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: 35CC: dwalsh, grepl.miroslav, lvrabec, mmalik, omosnace, pkoncity, vmojzis, zpytela
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:ebe63afc7463630e48ca3a8ec64f89c187237562103f26548f09b1c47498e3d9;VARIANT_ID=workstation;
Fixed In Version: selinux-policy-35.16-1.fc35 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-04-10 19:52:27 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 Patrick Reinhart 2022-03-03 17:17:07 UTC
Description of problem:
SELinux is preventing ip6tables from 'ioctl' accesses on the directory /sys/fs/cgroup.

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

If you believe that ip6tables should be allowed ioctl access on the cgroup 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 'ip6tables' --raw | audit2allow -M my-ip6tables
# semodule -X 300 -i my-ip6tables.pp

Additional Information:
Source Context                system_u:system_r:iptables_t:s0
Target Context                system_u:object_r:cgroup_t:s0
Target Objects                /sys/fs/cgroup [ dir ]
Source                        ip6tables
Source Path                   ip6tables
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
SELinux Policy RPM            selinux-policy-targeted-35.15-1.fc35.noarch
Local Policy RPM              selinux-policy-targeted-35.15-1.fc35.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Host Name                     (removed)
Platform                      Linux (removed) 5.16.11-200.fc35.x86_64 #1 SMP
                              PREEMPT Wed Feb 23 17:08:49 UTC 2022 x86_64 x86_64
Alert Count                   8009
First Seen                    2022-03-01 11:38:49 CET
Last Seen                     2022-03-03 18:17:15 CET
Local ID                      af92e84d-0e1e-4a57-9083-027fbee988a1

Raw Audit Messages
type=AVC msg=audit(1646327835.522:114105): avc:  denied  { ioctl } for  pid=1639354 comm="iptables" path="/sys/fs/cgroup" dev="tmpfs" ino=1 scontext=system_u:system_r:iptables_t:s0 tcontext=system_u:object_r:cgroup_t:s0 tclass=dir permissive=1


Hash: ip6tables,iptables_t,cgroup_t,dir,ioctl

Version-Release number of selected component:
selinux-policy-targeted-35.15-1.fc35.noarch

Additional info:
component:      selinux-policy
reporter:       libreport-2.15.2
hashmarkername: setroubleshoot
kernel:         5.16.11-200.fc35.x86_64
type:           libreport

Comment 1 Zdenek Pytela 2022-03-03 17:45:56 UTC
There already is a PR, it should be a part of the next build.

Comment 2 Fedora Update System 2022-04-06 15:24:43 UTC
FEDORA-2022-9681e66715 has been submitted as an update to Fedora 35. https://bodhi.fedoraproject.org/updates/FEDORA-2022-9681e66715

Comment 3 Fedora Update System 2022-04-06 19:48:45 UTC
FEDORA-2022-9681e66715 has been pushed to the Fedora 35 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2022-9681e66715`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2022-9681e66715

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

Comment 4 Fedora Update System 2022-04-10 19:52:27 UTC
FEDORA-2022-9681e66715 has been pushed to the Fedora 35 stable repository.
If problem still persists, please make note of it in this bug report.