Bug 660016

Summary: SELinux is preventing /bin/bash "execute" access on brprintconflsr3.
Product: [Fedora] Fedora Reporter: David Batson <dkbatson>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 14CC: dwalsh, mgrepl, tak_hmb
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard: setroubleshoot_trace_hash:6802f3742dce964a5a504b06c39c4ee0ac76fe46315cf0c1004204eb91e2a9ee
Fixed In Version: selinux-policy-3.9.7-16.fc14 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-12-13 20:12:18 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 David Batson 2010-12-05 01:11:46 UTC
Summary:

SELinux is preventing /bin/bash "execute" access on brprintconflsr3.

Detailed Description:

SELinux denied access requested by sh. It is not expected that this access is
required by sh and this access may signal an intrusion attempt. It is also
possible that the specific version or configuration of the application is
causing it to require additional access.

Allowing Access:

You can generate a local policy module to allow this access - see FAQ
(http://docs.fedoraproject.org/selinux-faq-fc5/#id2961385) Please file a bug
report.

Additional Information:

Source Context                unconfined_u:system_r:cupsd_t:s0-s0:c0.c1023
Target Context                system_u:object_r:cupsd_rw_etc_t:s0
Target Objects                brprintconflsr3 [ file ]
Source                        sh
Source Path                   /bin/bash
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           bash-4.1.7-3.fc14
Target RPM Packages           
Policy RPM                    selinux-policy-3.9.7-12.fc14
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Plugin Name                   catchall
Host Name                     (removed)
Platform                      Linux (removed) 2.6.35.6-48.fc14.i686
                              #1 SMP Fri Oct 22 15:34:36 UTC 2010 i686 i686
Alert Count                   18
First Seen                    Sat 04 Dec 2010 06:09:07 PM MST
Last Seen                     Sat 04 Dec 2010 06:09:07 PM MST
Local ID                      3d9a5b54-6cc6-49d8-8a00-c92759dab6fa
Line Numbers                  

Raw Audit Messages            

node=(removed) type=AVC msg=audit(1291511347.238:26242): avc:  denied  { execute } for  pid=2600 comm="sh" name="brprintconflsr3" dev=dm-0 ino=277990 scontext=unconfined_u:system_r:cupsd_t:s0-s0:c0.c1023 tcontext=system_u:object_r:cupsd_rw_etc_t:s0 tclass=file

node=(removed) type=SYSCALL msg=audit(1291511347.238:26242): arch=40000003 syscall=33 success=no exit=-13 a0=8e25400 a1=1 a2=3c2ff4 a3=8e25400 items=0 ppid=2589 pid=2600 auid=500 uid=4 gid=7 euid=4 suid=4 fsuid=4 egid=7 sgid=7 fsgid=7 tty=(none) ses=1 comm="sh" exe="/bin/bash" subj=unconfined_u:system_r:cupsd_t:s0-s0:c0.c1023 key=(null)



Hash String generated from  catchall,sh,cupsd_t,cupsd_rw_etc_t,file,execute
audit2allow suggests:

#============= cupsd_t ==============
allow cupsd_t cupsd_rw_etc_t:file execute;

Comment 1 David Batson 2010-12-05 01:15:43 UTC
Just installed the Brother drivers from Brother's website for the HL-2270DW printer.  When printing a test page from CUPS, I got the error above.

http://welcome.solutions.brother.com/bsc/public_s/id/linux/en/download_prn.html#HL-2270DW

Comment 2 Miroslav Grepl 2010-12-06 12:42:18 UTC
Where is "brprintconflsr3" located?

Comment 3 David Batson 2010-12-06 14:21:04 UTC
/usr/local/Brother/Printer/HL2270DW/inf/brprintconflsr3

Comment 4 Daniel Walsh 2010-12-06 15:15:00 UTC
Does this ship with the Brother package?  Are there other executables in this directory?

Comment 5 David Batson 2010-12-06 15:28:59 UTC
Yes, it ships with the Brother package.

The following files are in that directory.
braddprinter	brHL2270DWrc	 paperinf
brHL2270DWfunc	brprintconflsr3  setupPrintcap2

braddprinter is an executable.
setupPrintcap2 is a shell script.

Comment 6 Daniel Walsh 2010-12-06 19:52:21 UTC
Miroslav add

/usr/local/Brother/(.*/)?inf/brprintconf.* gen_context(system_u:object_r:bin_t,s0)
/usr/local/Brother/(.*/)?inf/setup.* gen_context(system_u:object_r:bin_t,s0)

Comment 7 David Batson 2010-12-06 20:37:42 UTC
How do I add this exactly?

Comment 8 Daniel Walsh 2010-12-06 21:19:09 UTC
David you can execute 

chcon -t bin_t  brprintconflsr3  setupPrintcap2

Until the next package is released.

Comment 9 Miroslav Grepl 2010-12-07 13:39:29 UTC
*** Bug 660483 has been marked as a duplicate of this bug. ***

Comment 10 Miroslav Grepl 2010-12-09 11:33:39 UTC
Fixed in selinux-policy-3.9.7-16.fc14

Comment 11 Fedora Update System 2010-12-10 13:54:10 UTC
selinux-policy-3.9.7-16.fc14 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/selinux-policy-3.9.7-16.fc14

Comment 12 Fedora Update System 2010-12-10 20:28:35 UTC
selinux-policy-3.9.7-16.fc14 has been pushed to the Fedora 14 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update selinux-policy'.  You can provide feedback for this update here: https://admin.fedoraproject.org/updates/selinux-policy-3.9.7-16.fc14

Comment 13 Fedora Update System 2010-12-13 20:11:16 UTC
selinux-policy-3.9.7-16.fc14 has been pushed to the Fedora 14 stable repository.  If problems still persist, please make note of it in this bug report.