Bug 1204352 - SELinux is preventing /usr/lib/systemd/systemd-networkd from using the 'dac_override' capabilities.
Summary: SELinux is preventing /usr/lib/systemd/systemd-networkd from using the 'dac_o...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 22
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Lukas Vrabec
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:32490f35d0fa6a65783437655e9...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-03-21 09:04 UTC by Heiko Adams
Modified: 2015-04-21 19:28 UTC (History)
9 users (show)

Fixed In Version: selinux-policy-3.13.1-122.fc22
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-04-21 19:28:44 UTC
Type: ---


Attachments (Terms of Use)

Description Heiko Adams 2015-03-21 09:04:10 UTC
Description of problem:
SELinux is preventing /usr/lib/systemd/systemd-networkd from using the 'dac_override' capabilities.

*****  Plugin dac_override (91.4 confidence) suggests   **********************

If sie überprüfen wollen, ob Domäne diesen Zugriff benötigt oder Sie eine Datei mit den falschen Berechtigungen auf Ihrem System haben
Then aktivieren Sie die vollständige Audit-Funktion, um die Pfad-Information der problematischen Datei zu erhalten. Dann reproduzieren Sie den Fehler erneut.
Do

Volle Audit-Funktion aktivieren
# auditctl -w /etc/shadow -p w
Versuchen Sie AVC zu reproduzieren. Führen Sie dann folgendes aus
# ausearch -m avc -ts recent
Falls PATH record ersichtlich ist, überprüfen Sie Eigentümer/ Berechtigungen der Datei und korrigieren Sie dies,
anderenfalls melden Sie dies an Bugzilla.

*****  Plugin catchall (9.59 confidence) suggests   **************************

If sie denken, dass systemd-networkd standardmäßig dac_override Berechtigung haben sollten.
Then sie sollten dies als Fehler melden.
Um diesen Zugriff zu erlauben, können Sie ein lokales Richtlinien-Modul erstellen.
Do
zugriff jetzt erlauben, indem Sie die nachfolgenden Befehle ausführen:
# grep systemd-network /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.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 [ capability ]
Source                        systemd-network
Source Path                   /usr/lib/systemd/systemd-networkd
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           systemd-219-9.fc22.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.13.1-118.fc22.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 4.0.0-0.rc4.git0.1.fc22.x86_64 #1
                              SMP Mon Mar 16 14:36:23 UTC 2015 x86_64 x86_64
Alert Count                   12
First Seen                    2015-03-17 23:16:48 CET
Last Seen                     2015-03-21 09:15:17 CET
Local ID                      2be15391-ef94-464c-af55-a728f49a4d79

Raw Audit Messages
type=AVC msg=audit(1426925717.457:107): avc:  denied  { dac_override } for  pid=867 comm="systemd-network" capability=1  scontext=system_u:system_r:systemd_networkd_t:s0 tcontext=system_u:system_r:systemd_networkd_t:s0 tclass=capability permissive=1


type=SYSCALL msg=audit(1426925717.457:107): arch=x86_64 syscall=mkdir success=yes exit=0 a0=7f61c96b7c37 a1=1ed a2=3d0 a3=58 items=0 ppid=1 pid=867 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm=systemd-network exe=/usr/lib/systemd/systemd-networkd subj=system_u:system_r:systemd_networkd_t:s0 key=(null)

Hash: systemd-network,systemd_networkd_t,systemd_networkd_t,capability,dac_override

Version-Release number of selected component:
selinux-policy-3.13.1-118.fc22.noarch

Additional info:
reporter:       libreport-2.5.0
hashmarkername: setroubleshoot
kernel:         4.0.0-0.rc4.git0.1.fc22.x86_64
type:           libreport

Comment 1 Lukas Vrabec 2015-03-23 12:07:13 UTC
Hi Lukas,
Any help here?

Comment 2 Lukáš Nykrýn 2015-03-23 12:38:29 UTC
Ugh, no idea. Tom?

Comment 3 Miroslav Grepl 2015-04-09 16:12:23 UTC
Heiko,
are you able to reproduce it with

Volle Audit-Funktion aktivieren
# auditctl -w /etc/shadow -p w
Versuchen Sie AVC zu reproduzieren. Führen Sie dann folgendes aus
# ausearch -m avc -ts recent

Comment 4 Miroslav Grepl 2015-04-09 16:16:51 UTC
Lukáš&Lukáš,
it tells us systemd-networkd creates a dir with different permissions than it runs.

I would think about

# ls -ldZ /var/run/systemd/netif
drwxr-xr-x. 4 systemd-network systemd-network system_u:object_r:systemd_networkd_var_run_t:s0 80 Apr  6 09:22 /var/run/systemd/netif


Lukáš,
we will need to add it.

Comment 5 Heiko Adams 2015-04-09 18:16:26 UTC
$ sudo ausearch -m avc -ts recent
[sudo] Passwort für heiko: 
----
time->Thu Apr  9 20:13:05 2015
type=PROCTITLE msg=audit(1428603185.516:109): proctitle="/usr/lib/systemd/systemd-networkd"
type=SYSCALL msg=audit(1428603185.516:109): arch=c000003e syscall=83 success=yes exit=0 a0=7f624bda1c37 a1=1ed a2=3d0 a3=58 items=0 ppid=1 pid=887 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="systemd-network" exe="/usr/lib/systemd/systemd-networkd" subj=system_u:system_r:systemd_networkd_t:s0 key=(null)
type=AVC msg=audit(1428603185.516:109): avc:  denied  { dac_override } for  pid=887 comm="systemd-network" capability=1  scontext=system_u:system_r:systemd_networkd_t:s0 tcontext=system_u:system_r:systemd_networkd_t:s0 tclass=capability permissive=1
----
time->Thu Apr  9 20:13:09 2015
type=PROCTITLE msg=audit(1428603189.844:116): proctitle=2F7573722F62696E2F616272742D77617463682D6C6F67002D46004261636B7472616365002F7661722F6C6F672F586F72672E302E6C6F67002D2D002F7573722F62696E2F616272742D64756D702D786F7267002D7844
type=SYSCALL msg=audit(1428603189.844:116): arch=c000003e syscall=6 success=no exit=-13 a0=7ffdce5f17c0 a1=7ffdce5f1670 a2=7ffdce5f1670 a3=7262696c2f736700 items=0 ppid=1 pid=937 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="abrt-watch-log" exe="/usr/bin/abrt-watch-log" subj=system_u:system_r:abrt_watch_log_t:s0 key=(null)
type=AVC msg=audit(1428603189.844:116): avc:  denied  { getattr } for  pid=937 comm="abrt-watch-log" path="/root/.config" dev="dm-2" ino=262214 scontext=system_u:system_r:abrt_watch_log_t:s0 tcontext=system_u:object_r:config_home_t:s0 tclass=dir permissive=0

Comment 6 Lukas Vrabec 2015-04-10 12:55:09 UTC
commit b5800dbbd533cfe1eed2ce4fb1ec62085e064911
Author: Lukas Vrabec <lvrabec@redhat.com>
Date:   Fri Apr 10 14:46:26 2015 +0200

    Allow systemd_networkd cap. dac_override. BZ(1204352)

Comment 7 Fedora Update System 2015-04-16 20:17:25 UTC
selinux-policy-3.13.1-122.fc22 has been submitted as an update for Fedora 22.
https://admin.fedoraproject.org/updates/selinux-policy-3.13.1-122.fc22

Comment 8 Fedora Update System 2015-04-17 18:36:28 UTC
Package selinux-policy-3.13.1-122.fc22:
* should fix your issue,
* was pushed to the Fedora 22 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing selinux-policy-3.13.1-122.fc22'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2015-6236/selinux-policy-3.13.1-122.fc22
then log in and leave karma (feedback).

Comment 9 Fedora Update System 2015-04-21 19:28:44 UTC
selinux-policy-3.13.1-122.fc22 has been pushed to the Fedora 22 stable repository.  If problems still persist, 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.