Bug 2054006 - SELinux is preventing systemd-network from 'create' accesses on the netlink_netfilter_socket labeled systemd_networkd_t.
Summary: SELinux is preventing systemd-network from 'create' accesses on the netlink_n...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 35
Hardware: x86_64
OS: Unspecified
medium
medium
Target Milestone: ---
Assignee: Zdenek Pytela
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:1e9e31bef3524c645d39ab181c8...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-02-13 22:31 UTC by Charles Barto
Modified: 2022-02-17 03:15 UTC (History)
8 users (show)

Fixed In Version: selinux-policy-35.15-1.fc35
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-02-17 03:15:17 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github fedora-selinux selinux-policy pull 1073 0 None open Allow systemd-networkd create and use netlink netfilter socket 2022-02-14 09:52:21 UTC

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.


Note You need to log in before you can comment on or make changes to this bug.