Bug 892805

Summary: SELinux is preventing /usr/bin/evince-thumbnailer from 'write' accesses on the sock_file socket.
Product: [Fedora] Fedora Reporter: Niki Guldbrand <niki.guldbrand>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 18CC: a.vanloon, dominick.grift, dwalsh, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:75df4a364c19e4cdfd99478c4209caf58a8caaf1083af2a8316dd2457f6e7f56
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-02-08 02:21:45 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Niki Guldbrand 2013-01-07 21:44:49 UTC
Description of problem:
SELinux is preventing /usr/bin/evince-thumbnailer from 'write' accesses on the sock_file socket.

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

If you believe that evince-thumbnailer should be allowed write access on the socket sock_file 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 evince-thumbnai /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                unconfined_u:unconfined_r:thumb_t:s0-s0:c0.c1023
Target Context                system_u:object_r:nscd_var_run_t:s0
Target Objects                socket [ sock_file ]
Source                        evince-thumbnai
Source Path                   /usr/bin/evince-thumbnailer
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           totem-3.6.3-2.fc18.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.11.1-69.fc18.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 3.7.1-2.fc18.x86_64 #1 SMP Fri Jan
                              4 00:10:48 UTC 2013 x86_64 x86_64
Alert Count                   975
First Seen                    2013-01-06 01:35:56 CET
Last Seen                     2013-01-06 17:02:50 CET
Local ID                      1f51084a-3a2b-4501-aa92-d61c77927dcc

Raw Audit Messages
type=AVC msg=audit(1357488170.729:509): avc:  denied  { write } for  pid=6932 comm="totem-video-thu" name="socket" dev="tmpfs" ino=20887 scontext=unconfined_u:unconfined_r:thumb_t:s0-s0:c0.c1023 tcontext=system_u:object_r:nscd_var_run_t:s0 tclass=sock_file


type=SYSCALL msg=audit(1357488170.729:509): arch=x86_64 syscall=connect success=no exit=EACCES a0=3 a1=7ffffd5ebee0 a2=6e a3=7ffffd5ebf00 items=0 ppid=28271 pid=6932 auid=1000 uid=1000 gid=1000 euid=1000 suid=1000 fsuid=1000 egid=1000 sgid=1000 fsgid=1000 ses=2 tty=(none) comm=totem-video-thu exe=/usr/bin/totem-video-thumbnailer subj=unconfined_u:unconfined_r:thumb_t:s0-s0:c0.c1023 key=(null)

Hash: evince-thumbnai,thumb_t,nscd_var_run_t,sock_file,write

audit2allow

#============= thumb_t ==============
allow thumb_t nscd_var_run_t:sock_file write;

audit2allow -R

#============= thumb_t ==============
allow thumb_t nscd_var_run_t:sock_file write;


Additional info:
hashmarkername: setroubleshoot
kernel:         3.7.1-2.fc18.x86_64
type:           libreport

Comment 2 Alexander van Loon 2013-01-26 13:58:26 UTC
Not sure if the bug I experienced is similar, but I got this SELinux warning when I opened a PDF file in Evince (and I've seen more warnings related to evince-thumbnailer, too):

SELinux is preventing /usr/bin/evince-thumbnailer from search access on the directory 1684.

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

If you believe that evince-thumbnailer should be allowed search access on the 1684 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 evince-thumbnai /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                unconfined_u:unconfined_r:thumb_t:s0-s0:c0.c1023
Target Context                unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1
                              023
Target Objects                1684 [ dir ]
Source                        evince-thumbnai
Source Path                   /usr/bin/evince-thumbnailer
Port                          <Unknown>
Host                          phronesis
Source RPM Packages           evince-3.6.1-2.fc18.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.11.1-73.fc18.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     phronesis
Platform                      Linux phronesis 3.7.2-204.fc18.x86_64 #1 SMP Wed
                              Jan 16 16:22:52 UTC 2013 x86_64 x86_64
Alert Count                   1
First Seen                    2013-01-26 14:52:20 CET
Last Seen                     2013-01-26 14:52:20 CET
Local ID                      6ee9ba37-3f83-4ee8-b6a9-7ff6a8ed713d

Raw Audit Messages
type=AVC msg=audit(1359208340.621:386): avc:  denied  { search } for  pid=18530 comm="evince-thumbnai" name="1684" dev="proc" ino=22554 scontext=unconfined_u:unconfined_r:thumb_t:s0-s0:c0.c1023 tcontext=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 tclass=dir


type=SYSCALL msg=audit(1359208340.621:386): arch=x86_64 syscall=open success=no exit=EACCES a0=7fff37be5b50 a1=0 a2=1b6 a3=238 items=0 ppid=1684 pid=18530 auid=1000 uid=1000 gid=1000 euid=1000 suid=1000 fsuid=1000 egid=1000 sgid=1000 fsgid=1000 ses=2 tty=(none) comm=evince-thumbnai exe=/usr/bin/evince-thumbnailer subj=unconfined_u:unconfined_r:thumb_t:s0-s0:c0.c1023 key=(null)

Hash: evince-thumbnai,thumb_t,unconfined_t,dir,search

audit2allow

#============= thumb_t ==============
allow thumb_t unconfined_t:dir search;

audit2allow -R

#============= thumb_t ==============
allow thumb_t unconfined_t:dir search;

Comment 3 Miroslav Grepl 2013-01-28 11:01:38 UTC
Fixed in selinux-policy-3.11.1-74.fc18.noarch

Comment 4 Fedora Update System 2013-01-31 13:16:41 UTC
selinux-policy-3.11.1-74.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/selinux-policy-3.11.1-74.fc18

Comment 5 Fedora Update System 2013-02-01 16:37:17 UTC
Package selinux-policy-3.11.1-74.fc18:
* should fix your issue,
* was pushed to the Fedora 18 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.11.1-74.fc18'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-1693/selinux-policy-3.11.1-74.fc18
then log in and leave karma (feedback).

Comment 6 Fedora Update System 2013-02-08 02:21:47 UTC
selinux-policy-3.11.1-74.fc18 has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.