Bug 1756590 - iwd fails to start: avc: denied { setattr } name="iwd" for /var/lib/iwd
Summary: iwd fails to start: avc: denied { setattr } name="iwd" for /var/lib/iwd
Keywords:
Status: CLOSED DUPLICATE of bug 1754245
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 31
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
Assignee: Lukas Vrabec
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: IoT
TreeView+ depends on / blocked
 
Reported: 2019-09-28 09:56 UTC by Martin Pitt
Modified: 2019-09-30 08:08 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-09-30 08:08:27 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Martin Pitt 2019-09-28 09:56:39 UTC
Description of problem: My yesterday's Fedora 31 upgrade (OSTree, but that shouldn't matter much) regressed iwd, it now  fails to start:


systemd[1]: Starting Wireless service...
audit[945]: AVC avc:  denied  { setattr } for  pid=945 comm="(iwd)" name="iwd" dev="dm-0" ino=524846 scontext=system_u:system_r:init_t:s0 tcontext=system_u:object_r:var_lib_t:s0 tclass=dir permissive=0
systemd[945]: iwd.service: Failed to set up special execution directory in /var/lib: Permission denied
systemd[945]: iwd.service: Failed at step STATE_DIRECTORY spawning /usr/libexec/iwd: Permission denied
systemd[1]: iwd.service: Main process exited, code=exited, status=238/STATE_DIRECTORY
systemd[1]: iwd.service: Failed with result 'exit-code'.
systemd[1]: Failed to start Wireless service.

Apparently the SELinux policy does not allow systemd to create StateDirectory=iwd and/or StateDirectoryMode=0700 (see systemctl cat iwd).

Version-Release number of selected component (if applicable):

selinux-policy-3.14.4-35.fc31.noarch
iwd-0.21-1.fc31.x86_64

How reproducible: Always


Steps to Reproduce:
1. Boot

Actual results: iwd.service  fails


Expected results: iwd.service starts


Additional info:

Both iwd and selinux-policy got upgraded since my previous image where iwd still worked:

$ sudo rpm-ostree db diff | grep -E 'iwd|selinux'
  iwd 0.20-2.fc31 -> 0.21-1.fc31
  selinux-policy 3.14.4-31.fc31 -> 3.14.4-35.fc31
  selinux-policy-targeted 3.14.4-31.fc31 -> 3.14.4-35.fc31

After `setenforce 0`, iwd starts up fine.

Comment 1 Martin Pitt 2019-09-28 09:59:28 UTC
CCing iwd maintainers FYI

Comment 2 Lukas Vrabec 2019-09-30 08:08:27 UTC

*** This bug has been marked as a duplicate of bug 1754245 ***


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