Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.

Bug 1756590

Summary: iwd fails to start: avc: denied { setattr } name="iwd" for /var/lib/iwd
Product: [Fedora] Fedora Reporter: Martin Pitt <mpitt>
Component: selinux-policyAssignee: Lukas Vrabec <lvrabec>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: 31CC: dwalsh, lkundrak, lvrabec, mgrepl, pbrobinson, plautrba, zpytela
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-09-30 08:08:27 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1269538    

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 ***