Bug 2054006

Summary: SELinux is preventing systemd-network from 'create' accesses on the netlink_netfilter_socket labeled systemd_networkd_t.
Product: [Fedora] Fedora Reporter: Charles Barto <bartoc+fedora_bugs>
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:1e9e31bef3524c645d39ab181c8a69e81572cc7e6baf92e9a5272b7138c1d272;VARIANT_ID=workstation;
Fixed In Version: selinux-policy-35.15-1.fc35 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-02-17 03:15:17 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Charles Barto 2022-02-13 22:31:26 UTC
Description of problem:
use mkosi boot to enter a system with --network-veth, enable+start systemd-networkd both on the host and in the container, observe AVC denial
SELinux is preventing systemd-network from 'create' accesses on the netlink_netfilter_socket labeled systemd_networkd_t.

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

If you believe that systemd-network should be allowed create access on netlink_netfilter_socket labeled systemd_networkd_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 'systemd-network' --raw | audit2allow -M my-systemdnetwork
# semodule -X 300 -i my-systemdnetwork.pp

Additional Information:
Source Context                system_u:system_r:systemd_networkd_t:s0
Target Context                system_u:system_r:systemd_networkd_t:s0
Target Objects                Unknown [ netlink_netfilter_socket ]
Source                        systemd-network
Source Path                   systemd-network
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
SELinux Policy RPM            selinux-policy-targeted-35.13-1.fc35.noarch
Local Policy RPM              selinux-policy-targeted-35.13-1.fc35.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 5.16.5-200.fc35.x86_64 #1 SMP
                              PREEMPT Tue Feb 1 21:37:11 UTC 2022 x86_64 x86_64
Alert Count                   1
First Seen                    2022-02-13 14:28:10 PST
Last Seen                     2022-02-13 14:28:10 PST
Local ID                      6af6023a-536b-437a-8586-f2f03ff6aa42

Raw Audit Messages
type=AVC msg=audit(1644791290.677:934): avc:  denied  { create } for  pid=160398 comm="systemd-network" scontext=system_u:system_r:systemd_networkd_t:s0 tcontext=system_u:system_r:systemd_networkd_t:s0 tclass=netlink_netfilter_socket permissive=0


Hash: systemd-network,systemd_networkd_t,systemd_networkd_t,netlink_netfilter_socket,create

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

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

Comment 1 Fedora Update System 2022-02-15 14:58:21 UTC
FEDORA-2022-aa5df3a7eb has been submitted as an update to Fedora 35. https://bodhi.fedoraproject.org/updates/FEDORA-2022-aa5df3a7eb

Comment 2 Fedora Update System 2022-02-16 01:51:02 UTC
FEDORA-2022-aa5df3a7eb 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-aa5df3a7eb`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2022-aa5df3a7eb

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

Comment 3 Fedora Update System 2022-02-17 03:15:17 UTC
FEDORA-2022-aa5df3a7eb has been pushed to the Fedora 35 stable repository.
If problem still persists, please make note of it in this bug report.