Bug 702945

Summary: SELinux is preventing /usr/libexec/fprintd from 'use' accesses on the fd /dev/null.
Product: [Fedora] Fedora Reporter: Tom <thomasbelvin>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 15CC: dwalsh, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard: setroubleshoot_trace_hash:9333f3b8d07a1ce819f63f9902599e35b570eb4d9c6273579dc7cfbc4aa4f2f0
Fixed In Version: selinux-policy-3.9.16-24.fc15 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-05-25 03:30:04 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Tom 2011-05-08 15:09:28 UTC
SELinux is preventing /usr/libexec/fprintd from 'use' accesses on the fd /dev/null.

*****  Plugin catchall_boolean (80.5 confidence) suggests  *******************

If you want to allow all domains to use other domains file descriptors
Then you must tell SELinux about this by enabling the 'allow_domain_fd_use' boolean.
Do
setsebool -P allow_domain_fd_use 1

*****  Plugin leaks (10.5 confidence) suggests  ******************************

If you want to ignore fprintd trying to use access the null fd, because you believe it should not need this access.
Then you should report this as a bug.  
You can generate a local policy module to dontaudit this access.
Do
# grep /usr/libexec/fprintd /var/log/audit/audit.log | audit2allow -D -M mypol
# semodule -i mypol.pp

*****  Plugin catchall (10.5 confidence) suggests  ***************************

If you believe that fprintd should be allowed use access on the null fd 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 fprintd /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:fprintd_t:s0-s0:c0.c1023
Target Context                system_u:system_r:init_t:s0
Target Objects                /dev/null [ fd ]
Source                        fprintd
Source Path                   /usr/libexec/fprintd
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           fprintd-0.4.1-1.fc15
Target RPM Packages           
Policy RPM                    selinux-policy-3.9.16-23.fc15
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 2.6.38.5-22.fc15.x86_64 #1 SMP Mon
                              May 2 19:28:55 UTC 2011 x86_64 x86_64
Alert Count                   1
First Seen                    Sun 08 May 2011 11:07:59 AM EDT
Last Seen                     Sun 08 May 2011 11:07:59 AM EDT
Local ID                      c731fe76-57e0-4468-88a5-862d27078b78

Raw Audit Messages
type=AVC msg=audit(1304867279.859:261): avc:  denied  { use } for  pid=9553 comm="fprintd" path="/dev/null" dev=devtmpfs ino=5360 scontext=system_u:system_r:fprintd_t:s0-s0:c0.c1023 tcontext=system_u:system_r:init_t:s0 tclass=fd


type=AVC msg=audit(1304867279.859:261): avc:  denied  { use } for  pid=9553 comm="fprintd" path="/dev/null" dev=devtmpfs ino=5360 scontext=system_u:system_r:fprintd_t:s0-s0:c0.c1023 tcontext=system_u:system_r:init_t:s0 tclass=fd


type=AVC msg=audit(1304867279.859:261): avc:  denied  { use } for  pid=9553 comm="fprintd" path="/dev/null" dev=devtmpfs ino=5360 scontext=system_u:system_r:fprintd_t:s0-s0:c0.c1023 tcontext=system_u:system_r:init_t:s0 tclass=fd


type=SYSCALL msg=audit(1304867279.859:261): arch=x86_64 syscall=execve success=yes exit=0 a0=1e3d780 a1=1e3d6a0 a2=1e3c010 a3=0 items=0 ppid=9552 pid=9553 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm=fprintd exe=/usr/libexec/fprintd subj=system_u:system_r:fprintd_t:s0-s0:c0.c1023 key=(null)

Hash: fprintd,fprintd_t,init_t,fd,use

audit2allow

#============= fprintd_t ==============
#!!!! This avc can be allowed using the boolean 'allow_domain_fd_use'

allow fprintd_t init_t:fd use;

audit2allow -R

#============= fprintd_t ==============
#!!!! This avc can be allowed using the boolean 'allow_domain_fd_use'

allow fprintd_t init_t:fd use;

Comment 1 Daniel Walsh 2011-05-09 15:14:23 UTC
setsebool -P allow_domain_fd_use 1

Comment 2 Daniel Walsh 2011-05-09 15:20:55 UTC
Miroslav can you add

	init_use_fds($1)

to system

Comment 3 Miroslav Grepl 2011-05-09 17:32:02 UTC
Fixed in selinux-policy-3.9.16-24.fc15

Comment 4 Fedora Update System 2011-05-17 16:12:12 UTC
selinux-policy-3.9.16-24.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/selinux-policy-3.9.16-24.fc15

Comment 5 Fedora Update System 2011-05-18 18:40:54 UTC
Package selinux-policy-3.9.16-24.fc15:
* should fix your issue,
* was pushed to the Fedora 15 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.9.16-24.fc15'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/selinux-policy-3.9.16-24.fc15
then log in and leave karma (feedback).

Comment 6 Fedora Update System 2011-05-25 03:29:12 UTC
selinux-policy-3.9.16-24.fc15 has been pushed to the Fedora 15 stable repository.  If problems still persist, please make note of it in this bug report.