Bug 1300456 - SELinux is preventing fwupd from 'write' accesses on the directory 0000:00:02.0.
SELinux is preventing fwupd from 'write' accesses on the directory 0000:00:02.0.
Status: CLOSED DUPLICATE of bug 1314637
Product: Fedora
Classification: Fedora
Component: selinux-policy (Show other bugs)
24
x86_64 Unspecified
medium Severity medium
: ---
: ---
Assigned To: Lukas Vrabec
Fedora Extras Quality Assurance
abrt_hash:b83942374b9094b38a81442d347...
:
: 1312928 1320989 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-01-20 16:29 EST by Stephen Gallagher
Modified: 2016-04-25 03:58 EDT (History)
18 users (show)

See Also:
Fixed In Version: selinux-policy-3.13.1-179.fc24
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-03-16 07:26:54 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Stephen Gallagher 2016-01-20 16:29:20 EST
Description of problem:
SELinux is preventing fwupd from 'write' accesses on the directory 0000:00:02.0.

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

If you believe that fwupd should be allowed write access on the 0000:00:02.0 directory 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:
# grep fwupd /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:fwupd_t:s0-s0:c0.c1023
Target Context                system_u:object_r:sysfs_t:s0
Target Objects                0000:00:02.0 [ dir ]
Source                        fwupd
Source Path                   fwupd
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.13.1-167.fc24.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 4.5.0-0.rc0.git1.1.fc24.x86_64 #1
                              SMP Tue Jan 12 20:40:44 UTC 2016 x86_64 x86_64
Alert Count                   1
First Seen                    2016-01-20 16:28:37 EST
Last Seen                     2016-01-20 16:28:37 EST
Local ID                      62fdada2-ff68-49e4-ab32-c01085db6068

Raw Audit Messages
type=AVC msg=audit(1453325317.11:2011): avc:  denied  { write } for  pid=7929 comm="fwupd" name="0000:00:02.0" dev="sysfs" ino=6123 scontext=system_u:system_r:fwupd_t:s0-s0:c0.c1023 tcontext=system_u:object_r:sysfs_t:s0 tclass=dir permissive=1


Hash: fwupd,fwupd_t,sysfs_t,dir,write

Version-Release number of selected component:
selinux-policy-3.13.1-167.fc24.noarch

Additional info:
reporter:       libreport-2.6.3
hashmarkername: setroubleshoot
kernel:         4.5.0-0.rc0.git1.1.fc24.x86_64
type:           libreport
Comment 1 Miroslav Grepl 2016-01-21 03:10:35 EST
Thank you for reporting this issue. fwupd_t is a permissive domain so this access should not be blocked.
Comment 2 Lukas Vrabec 2016-01-21 09:48:33 EST
Hi Stephen, 
Could you attach also SYSCALL? I believe this is just access check. Maybe we could dontadit this.
Comment 3 Stephen Gallagher 2016-01-21 10:00:54 EST
(In reply to Lukas Vrabec from comment #2)
> Hi Stephen, 
> Could you attach also SYSCALL? I believe this is just access check. Maybe we
> could dontadit this.

Where would I get that information? I just hit the "Report Bug" button in the troubleshooter. I have no idea what triggered it.
Comment 4 Miroslav Grepl 2016-01-25 02:25:11 EST
Unfortunately not easy to get the SYSCALL part of audit events. It is turned off by default on Fedora.

# This suppresses syscall auditing for all tasks started
# with this rule in effect.  Remove it if you need syscall
# auditing.
-a task,never

You would need to comment this line, reload audit daemon and try to reproduce it.
Comment 5 Giulio 'juliuxpigface' 2016-01-28 14:26:36 EST
Description of problem:
This popped up after booting a system installed from Fedora Rawhide 20160121 (not yet updated).

Version-Release number of selected component:
selinux-policy-3.13.1-168.fc24.noarch

Additional info:
reporter:       libreport-2.6.3
hashmarkername: setroubleshoot
kernel:         4.5.0-0.rc0.git7.1.fc24.x86_64
type:           libreport
Comment 6 Stephen Gallagher 2016-02-08 08:31:48 EST
(In reply to Miroslav Grepl from comment #4)
> Unfortunately not easy to get the SYSCALL part of audit events. It is turned
> off by default on Fedora.
> 
> # This suppresses syscall auditing for all tasks started
> # with this rule in effect.  Remove it if you need syscall
> # auditing.
> -a task,never
> 
> You would need to comment this line, reload audit daemon and try to
> reproduce it.

Where is that line? I can't find it in /etc/selinux anywhere.
Comment 7 Daniel Walsh 2016-02-08 15:00:45 EST
/etc/audit/audit.rules
Comment 8 P. A. López-Valencia 2016-02-11 19:12:21 EST
Description of problem:
I'm reporting this error after enabling task watching in auditd.

Version-Release number of selected component:
selinux-policy-3.13.1-169.fc24.noarch

Additional info:
reporter:       libreport-2.6.4
hashmarkername: setroubleshoot
kernel:         4.5.0-0.rc3.git1.1.fc24.x86_64
type:           libreport
Comment 9 P. A. López-Valencia 2016-02-11 19:16:59 EST
*Sigh* No attachements upload as it was treated as a duplicate. 

The error, with task auditing enabled, is:

SELinux is preventing /usr/libexec/fwupd/fwupd from write access on the directory 0000:00:02.0.

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

If cree que de manera predeterminada, fwupd debería permitir acceso write sobre  0000:00:02.0 directory.     
Then debería reportar esto como un error.
Puede generar un módulo de política local para permitir este acceso.
Do
permita el acceso momentáneamente executando:
# grep fwupd /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:fwupd_t:s0-s0:c0.c1023
Target Context                system_u:object_r:sysfs_t:s0
Target Objects                0000:00:02.0 [ dir ]
Source                        fwupd
Source Path                   /usr/libexec/fwupd/fwupd
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           fwupd-0.6.1-2.fc24.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.13.1-169.fc24.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux fera 4.5.0-0.rc3.git1.1.fc24.x86_64 #1 SMP
                              Tue Feb 9 22:21:52 UTC 2016 x86_64 x86_64
Alert Count                   1
First Seen                    2016-02-11 19:08:28 COT
Last Seen                     2016-02-11 19:08:28 COT
Local ID                      da0d757a-aa8a-468a-a29c-de7dbd1e7bf6

Raw Audit Messages
type=AVC msg=audit(1455235708.420:383): avc:  denied  { write } for  pid=2258 comm="fwupd" name="0000:00:02.0" dev="sysfs" ino=1793 scontext=system_u:system_r:fwupd_t:s0-s0:c0.c1023 tcontext=system_u:object_r:sysfs_t:s0 tclass=dir permissive=1


type=SYSCALL msg=audit(1455235708.420:383): arch=x86_64 syscall=open success=no exit=EACCES a0=563059001140 a1=c1 a2=1b6 a3=7fff707aa01d items=0 ppid=1 pid=2258 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm=fwupd exe=/usr/libexec/fwupd/fwupd subj=system_u:system_r:fwupd_t:s0-s0:c0.c1023 key=(null)

Hash: fwupd,fwupd_t,sysfs_t,dir,write
Comment 10 Jan Kurik 2016-02-24 10:52:17 EST
This bug appears to have been reported against 'rawhide' during the Fedora 24 development cycle.
Changing version to '24'.

More information and reason for this action is here:
https://fedoraproject.org/wiki/Fedora_Program_Management/HouseKeeping/Fedora24#Rawhide_Rebase
Comment 11 Lukas Vrabec 2016-03-01 07:26:06 EST
*** Bug 1312928 has been marked as a duplicate of this bug. ***
Comment 12 Laurent Wandrebeck 2016-03-09 06:52:36 EST
Description of problem:
appeared when gnome was just launched for the first time after updating from f23 to f24

Version-Release number of selected component:
selinux-policy-3.13.1-176.fc24.noarch

Additional info:
reporter:       libreport-2.6.4
hashmarkername: setroubleshoot
kernel:         4.5.0-0.rc7.git0.2.fc24.x86_64
type:           libreport
Comment 13 Andrew Cook 2016-03-15 16:59:43 EDT
on my system fwupd is running as a child of dbus instead of in its service
Comment 14 Lukas Vrabec 2016-03-16 07:26:54 EDT

*** This bug has been marked as a duplicate of bug 1314637 ***
Comment 15 mac plox 2016-03-24 08:23:27 EDT
*** Bug 1320989 has been marked as a duplicate of this bug. ***

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