Bug 885202

Summary: SELinux is preventing /usr/bin/lpr.cups from 'read' accesses on the file /usr/share/fonts/truetype/arial.ttf.
Product: [Fedora] Fedora Reporter: E. Lewis <ed.lewis>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 17CC: dominick.grift, dwalsh, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Unspecified   
Whiteboard: abrt_hash:42b7448f11312ffbcc30e707536588bdc53f50692624a8fb50ec7bc362e3d6c7
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-01-07 04:03:49 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:
Attachments:
Description Flags
File: type
none
File: hashmarkername none

Description E. Lewis 2012-12-07 18:40:17 UTC
Description of problem:
Printing a file that contains 'arial' fonts.

Additional info:
libreport version: 2.0.18
kernel:         3.6.9-2.fc17.i686.PAE

description:
:SELinux is preventing /usr/bin/lpr.cups from 'read' accesses on the file /usr/share/fonts/truetype/arial.ttf.
:
:*****  Plugin leaks (86.2 confidence) suggests  ******************************
:
:If you want to ignore lpr.cups trying to read access the arial.ttf file, 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/bin/lpr.cups /var/log/audit/audit.log | audit2allow -D -M mypol
:# semodule -i mypol.pp
:
:*****  Plugin catchall (14.7 confidence) suggests  ***************************
:
:If you believe that lpr.cups should be allowed read access on the arial.ttf 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 lpr /var/log/audit/audit.log | audit2allow -M mypol
:# semodule -i mypol.pp
:
:Additional Information:
:Source Context                unconfined_u:unconfined_r:lpr_t:s0-s0:c0.c1023
:Target Context                system_u:object_r:fonts_t:s0
:Target Objects                /usr/share/fonts/truetype/arial.ttf [ file ]
:Source                        lpr
:Source Path                   /usr/bin/lpr.cups
:Port                          <Unknown>
:Host                          (removed)
:Source RPM Packages           cups-1.5.4-11.fc17.i686
:Target RPM Packages           
:Policy RPM                    selinux-policy-3.10.0-161.fc17.noarch
:Selinux Enabled               True
:Policy Type                   targeted
:Enforcing Mode                Enforcing
:Host Name                     (removed)
:Platform                      Linux (removed) 3.6.9-2.fc17.i686.PAE #1 SMP Tue
:                              Dec 4 14:15:28 UTC 2012 i686 i686
:Alert Count                   1
:First Seen                    2012-12-07 13:14:18 EST
:Last Seen                     2012-12-07 13:14:18 EST
:Local ID                      c76cf9e1-58c6-4fc3-b8a5-d1b8bd6dcd54
:
:Raw Audit Messages
:type=AVC msg=audit(1354904058.578:5177): avc:  denied  { read } for  pid=10904 comm="lpr" path="/usr/share/fonts/truetype/arial.ttf" dev="sda4" ino=3422377 scontext=unconfined_u:unconfined_r:lpr_t:s0-s0:c0.c1023 tcontext=system_u:object_r:fonts_t:s0 tclass=file
:
:
:type=SYSCALL msg=audit(1354904058.578:5177): arch=i386 syscall=execve success=yes exit=0 a0=bfdae622 a1=bfdaf464 a2=bfdb2244 a3=bfdb3886 items=0 ppid=9922 pid=10904 auid=1000 uid=1000 gid=1000 euid=1000 suid=1000 fsuid=1000 egid=1000 sgid=1000 fsgid=1000 tty=(none) ses=4 comm=lpr exe=/usr/bin/lpr.cups subj=unconfined_u:unconfined_r:lpr_t:s0-s0:c0.c1023 key=(null)
:
:Hash: lpr,lpr_t,fonts_t,file,read
:
:audit2allow
:
:#============= lpr_t ==============
:allow lpr_t fonts_t:file read;
:
:audit2allow -R
:
:#============= lpr_t ==============
:allow lpr_t fonts_t:file read;
:

Comment 1 E. Lewis 2012-12-07 18:40:20 UTC
Created attachment 659544 [details]
File: type

Comment 2 E. Lewis 2012-12-07 18:40:21 UTC
Created attachment 659545 [details]
File: hashmarkername

Comment 3 Miroslav Grepl 2012-12-10 08:17:41 UTC
Added.

commit 76985ecafbbbcba6daa94292ebff18917cb3b17f
Author: Miroslav Grepl <mgrepl>
Date:   Mon Dec 10 09:16:26 2012 +0100

    Allow lpr to read /usr/share/fonts

Comment 4 Fedora Update System 2012-12-17 18:44:05 UTC
selinux-policy-3.10.0-165.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/selinux-policy-3.10.0-165.fc17

Comment 5 Fedora Update System 2012-12-18 02:40:18 UTC
Package selinux-policy-3.10.0-165.fc17:
* should fix your issue,
* was pushed to the Fedora 17 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.10.0-165.fc17'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-20544/selinux-policy-3.10.0-165.fc17
then log in and leave karma (feedback).

Comment 6 Fedora Update System 2013-01-05 06:45:23 UTC
Package selinux-policy-3.10.0-166.fc17:
* should fix your issue,
* was pushed to the Fedora 17 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.10.0-166.fc17'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-20544/selinux-policy-3.10.0-166.fc17
then log in and leave karma (feedback).

Comment 7 Fedora Update System 2013-01-07 04:03:50 UTC
selinux-policy-3.10.0-166.fc17 has been pushed to the Fedora 17 stable repository.  If problems still persist, please make note of it in this bug report.