Bug 1294715

Summary: SELinux is preventing /usr/local/Brother/cupswrapper/brcupsconfig3 from using the 'execmem' accesses on a process.
Product: [Fedora] Fedora Reporter: OoZooL <obliterator666>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: low    
Version: 23CC: dominick.grift, dwalsh, lvrabec, mgrepl, plautrba
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:e9663715f8029377f180ffd764cd80472e854b857bfe7062d3df26351aa150bb;VARIANT_ID=workstation;
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-01-05 12:59:31 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 OoZooL 2015-12-29 23:46:00 UTC
Description of problem:
Trying to print to a network printer of Brother
SELinux is preventing /usr/local/Brother/cupswrapper/brcupsconfig3 from using the 'execmem' accesses on a process.

*****  Plugin catchall_boolean (89.3 confidence) suggests   ******************

If you want to allow cups to execmem
Then you must tell SELinux about this by enabling the 'cups_execmem' boolean.
You can read 'None' man page for more details.
Do
setsebool -P cups_execmem 1

*****  Plugin catchall (11.6 confidence) suggests   **************************

If you believe that brcupsconfig3 should be allowed execmem access on processes labeled cupsd_t 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 brcupsconfig3 /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:cupsd_t:s0-s0:c0.c1023
Target Context                system_u:system_r:cupsd_t:s0-s0:c0.c1023
Target Objects                Unknown [ process ]
Source                        brcupsconfig3
Source Path                   /usr/local/Brother/cupswrapper/brcupsconfig3
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           brhl5250dnlpr-2.0.1-1.i386
Target RPM Packages           
Policy RPM                    selinux-policy-3.13.1-158.fc23.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 4.2.8-300.fc23.x86_64 #1 SMP Tue
                              Dec 15 16:49:06 UTC 2015 x86_64 x86_64
Alert Count                   21
First Seen                    2015-12-07 00:14:59 IST
Last Seen                     2015-12-30 01:43:30 IST
Local ID                      12de6a6c-6e3b-42e7-a2fd-52e9c36f2abb

Raw Audit Messages
type=AVC msg=audit(1451432610.750:17680): avc:  denied  { execmem } for  pid=30774 comm="rawtobr2" scontext=system_u:system_r:cupsd_t:s0-s0:c0.c1023 tcontext=system_u:system_r:cupsd_t:s0-s0:c0.c1023 tclass=process permissive=0


type=SYSCALL msg=audit(1451432610.750:17680): arch=x86_64 syscall=execve per=400000 success=no exit=EACCES a0=5564d5ff7450 a1=5564d5ff6c10 a2=5564d5ffaef0 a3=5564d5ff6c00 items=0 ppid=30740 pid=30774 auid=4294967295 uid=4 gid=7 euid=4 suid=4 fsuid=4 egid=7 sgid=7 fsgid=7 tty=(none) ses=4294967295 comm=rawtobr2 exe=/usr/local/Brother/lpd/rawtobr2 subj=system_u:system_r:cupsd_t:s0-s0:c0.c1023 key=(null)

Hash: brcupsconfig3,cupsd_t,cupsd_t,process,execmem

Version-Release number of selected component:
selinux-policy-3.13.1-158.fc23.noarch

Additional info:
reporter:       libreport-2.6.3
hashmarkername: setroubleshoot
kernel:         4.2.8-300.fc23.x86_64
type:           libreport

Potential duplicate: bug 1251677

Comment 1 Lukas Vrabec 2016-01-05 12:59:31 UTC
If you want to allow cups to execmem
Then you must tell SELinux about this by enabling the 'cups_execmem' boolean.
You can read 'None' man page for more details.
Do
setsebool -P cups_execmem 1