Bug 1251677

Summary: SELinux is preventing brcupsconfig3 from using the 'execmem' accesses on a process.
Product: [Fedora] Fedora Reporter: Mike <your.spam.here.thx>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 22CC: dominick.grift, dwalsh, lvrabec, mgrepl, peter, plautrba
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:e9663715f8029377f180ffd764cd80472e854b857bfe7062d3df26351aa150bb
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-08-27 16:48:22 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: MFC7440N-IPP.ppd none

Description Mike 2015-08-08 16:24:01 UTC
Description of problem:
Installing Printer Brother MFC-7440N via Cups 

Download custom ppd file (MFC7440N-IPP.ppd), which is locatetd here:  
https://drive.google.com/file/d/0BxmBozUCnrAZb29QZGZQbXRuN1k/view?usp=sharing and move it to /etc/cups/ppd

Start Cups by: http://localhost:631/admin
User: root, pw: your-root-password

Choose: Add printer
Choose:  Internet Printing Protocol (http) 
Provide printer ip 'Connection': http://192.168.x.x/ipp
Provide Printer Name: e.g. MFC-7440N
Choose 'Or Provide a PPD File' (Browse): [ /etc/cups/ppd/MFC7440N-IPP.ppd ]

Finish setup and try to print a testpage: selinux blocks ipp-printing
SELinux is preventing 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                   brcupsconfig3
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.13.1-128.8.fc22.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 4.1.3-201.fc22.x86_64 #1 SMP Wed
                              Jul 29 19:50:22 UTC 2015 x86_64 x86_64
Alert Count                   14
First Seen                    2015-08-08 17:12:41 CEST
Last Seen                     2015-08-08 17:54:06 CEST
Local ID                      1c518a5d-6ec1-485f-92c3-008eb780ebf6

Raw Audit Messages
type=AVC msg=audit(1439049246.413:1398): avc:  denied  { execmem } for  pid=19280 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


Hash: brcupsconfig3,cupsd_t,cupsd_t,process,execmem

Version-Release number of selected component:
selinux-policy-3.13.1-128.8.fc22.noarch

Additional info:
reporter:       libreport-2.6.2
hashmarkername: setroubleshoot
kernel:         4.1.3-201.fc22.x86_64
type:           libreport

Comment 1 Mike 2015-08-08 16:24:04 UTC
Created attachment 1060601 [details]
File: MFC7440N-IPP.ppd

Comment 2 Peter 2015-08-20 19:21:45 UTC
Description of problem:
After installing brother DCP-7030 drivers I get this error message

Version-Release number of selected component:
selinux-policy-3.13.1-128.8.fc22.noarch

Additional info:
reporter:       libreport-2.6.2
hashmarkername: setroubleshoot
kernel:         4.1.4-200.fc22.x86_64
type:           libreport

Comment 3 Miroslav Grepl 2015-08-27 16:48:22 UTC
*****  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