Bug 1095851
| Summary: | SELinux is preventing /usr/local/Brother/Printer/HL2270DW/inf/brprintconflsr3 from 'write' accesses on the file . | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Msquared <142.bugzilla.redhat> | ||||||||||
| Component: | selinux-policy | Assignee: | Miroslav Grepl <mgrepl> | ||||||||||
| Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||||||||
| Severity: | unspecified | Docs Contact: | |||||||||||
| Priority: | unspecified | ||||||||||||
| Version: | 20 | CC: | dominick.grift, dwalsh, lvrabec, mgrepl | ||||||||||
| Target Milestone: | --- | Keywords: | Reopened | ||||||||||
| Target Release: | --- | ||||||||||||
| Hardware: | x86_64 | ||||||||||||
| OS: | Unspecified | ||||||||||||
| Whiteboard: | abrt_hash:413ae70e02fc52c8289801cb3c53ee4d405e4bab3a8b393534bf921178db078c | ||||||||||||
| Fixed In Version: | selinux-policy-3.12.1-177.fc20 | Doc Type: | Bug Fix | ||||||||||
| Doc Text: | Story Points: | --- | |||||||||||
| Clone Of: | Environment: | ||||||||||||
| Last Closed: | 2014-07-19 05:59:42 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
Msquared
2014-05-08 16:32:07 UTC
Not sure where this file is, but I believe it is mislabeled. restorecon -R -v /usr /opt /etc Should change the label, Probably in a brother directory. Running "restorecon -R -v /usr /opt /etc" produced the following output: restorecon reset /usr/lib64/cups context unconfined_u:object_r:lib_t:s0->unconfined_u:object_r:bin_t:s0 restorecon reset /usr/lib64/cups/filter context unconfined_u:object_r:lib_t:s0->unconfined_u:object_r:bin_t:s0 restorecon reset /usr/lib64/cups/filter/brlpdwrapperHL2270DW context unconfined_u:object_r:lib_t:s0->unconfined_u:object_r:bin_t:s0 restorecon reset /etc/pam.d/system-auth-ac context system_u:object_r:etc_runtime_t:s0->system_u:object_r:etc_t:s0 restorecon reset /etc/pam.d/postlogin-ac context system_u:object_r:etc_runtime_t:s0->system_u:object_r:etc_t:s0 restorecon reset /etc/pam.d/password-auth-ac context system_u:object_r:etc_runtime_t:s0->system_u:object_r:etc_t:s0 restorecon reset /etc/pam.d/smartcard-auth-ac context system_u:object_r:etc_runtime_t:s0->system_u:object_r:etc_t:s0 restorecon reset /etc/pam.d/fingerprint-auth-ac context system_u:object_r:etc_runtime_t:s0->system_u:object_r:etc_t:s0 I'll report the results in a moment. OK, it seems the SELinux log I reported in my initial big report was the first of four such messages. That one has gone away, but the other three remain. Also, I don't know if the first one disappeared because I changed SELinux from enforcing to permissive, or because I ran the restorecon command.
Either way, here's what ends up in /var/log/audit/audit.log when I print:
type=AVC msg=audit(1399766839.070:1033): avc: denied { rename } for pid=18630 comm="brprintconflsr3" name="brHL2270DWrc" dev="dm-2" ino=529797 scontext=system_u:system_r:cupsd_t:s0-s0:c0.c1023 tcontext=system_u:object_r:usr_t:s0 tclass=file
type=SYSCALL msg=audit(1399766839.070:1033): arch=40000003 syscall=38 per=400000 success=yes exit=0 a0=ffd5c6af a1=ffd5c2ae a2=415bd000 a3=0 items=0 ppid=18629 pid=18630 auid=4294967295 uid=4 gid=7 euid=4 suid=4 fsuid=4 egid=7 sgid=7 fsgid=7 tty=(none) ses=4294967295 comm="brprintconflsr3" exe="/usr/local/Brother/Printer/HL2270DW/inf/brprintconflsr3" subj=system_u:system_r:cupsd_t:s0-s0:c0.c1023 key=(null)
type=AVC msg=audit(1399766839.070:1034): avc: denied { create } for pid=18630 comm="brprintconflsr3" name="brHL2270DWrc" scontext=system_u:system_r:cupsd_t:s0-s0:c0.c1023 tcontext=system_u:object_r:usr_t:s0 tclass=file
type=AVC msg=audit(1399766839.070:1034): avc: denied { write } for pid=18630 comm="brprintconflsr3" path="/usr/local/Brother/Printer/HL2270DW/inf/brHL2270DWrc" dev="dm-2" ino=529810 scontext=system_u:system_r:cupsd_t:s0-s0:c0.c1023 tcontext=system_u:object_r:usr_t:s0 tclass=file
type=SYSCALL msg=audit(1399766839.070:1034): arch=40000003 syscall=5 per=400000 success=yes exit=7 a0=ffd5c6af a1=241 a2=1b6 a3=96d7008 items=0 ppid=18629 pid=18630 auid=4294967295 uid=4 gid=7 euid=4 suid=4 fsuid=4 egid=7 sgid=7 fsgid=7 tty=(none) ses=4294967295 comm="brprintconflsr3" exe="/usr/local/Brother/Printer/HL2270DW/inf/brprintconflsr3" subj=system_u:system_r:cupsd_t:s0-s0:c0.c1023 key=(null)
type=AVC msg=audit(1399766839.070:1035): avc: denied { unlink } for pid=18630 comm="brprintconflsr3" name="brHL2270DWrc.old" dev="dm-2" ino=529797 scontext=system_u:system_r:cupsd_t:s0-s0:c0.c1023 tcontext=system_u:object_r:usr_t:s0 tclass=file
type=SYSCALL msg=audit(1399766839.070:1035): arch=40000003 syscall=10 per=400000 success=yes exit=0 a0=ffd5c2ae a1=96d7000 a2=415bd000 a3=ffd5c2ae items=0 ppid=18629 pid=18630 auid=4294967295 uid=4 gid=7 euid=4 suid=4 fsuid=4 egid=7 sgid=7 fsgid=7 tty=(none) ses=4294967295 comm="brprintconflsr3" exe="/usr/local/Brother/Printer/HL2270DW/inf/brprintconflsr3" subj=system_u:system_r:cupsd_t:s0-s0:c0.c1023 key=(null)
I'll attach the three SELinux reports in a moment.
Created attachment 894354 [details]
SELinux troubleshooter report 1 - rename
Created attachment 894355 [details]
SELinux troubleshooter report 2 - create
Created attachment 894356 [details]
SELinux troubleshooter report 3 - unlink
Please execute for now
# chcon -R -t cupsd_rw_etc_t /usr/local/Brother/Printer/HL2270DW/inf/
commit 1398083df4ffadaa28ceafa9b8df02d16d4a5025
Author: Miroslav Grepl <mgrepl>
Date: Mon May 12 13:06:11 2014 +0200
Add support for /usr/local/Brother labeling. We removed /usr/local equiv.
selinux-policy-3.12.1-163.fc20 has been submitted as an update for Fedora 20. https://admin.fedoraproject.org/updates/FEDORA-2014-6084/selinux-policy-3.12.1-163.fc20 Package selinux-policy-3.12.1-163.fc20: * should fix your issue, * was pushed to the Fedora 20 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.12.1-163.fc20' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2014-6084/selinux-policy-3.12.1-163.fc20 then log in and leave karma (feedback). selinux-policy-3.12.1-163.fc20 has been pushed to the Fedora 20 stable repository. If problems still persist, please make note of it in this bug report. Created attachment 901397 [details]
SELinux troubleshooter report 4 - execute
Sorry, I think I missed this: selinux is reporting an execute error (though the latest selinux-policy fixes the other issues I reported; thanks!). See attachment https://bugzilla.redhat.com/attachment.cgi?id=901397&action=edit edd4b8cf9475d7d10e551cb886640d47f75a9c7b allows this in git. selinux-policy-3.12.1-177.fc20 has been submitted as an update for Fedora 20. https://admin.fedoraproject.org/updates/selinux-policy-3.12.1-177.fc20 Package selinux-policy-3.12.1-177.fc20: * should fix your issue, * was pushed to the Fedora 20 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.12.1-177.fc20' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2014-8390/selinux-policy-3.12.1-177.fc20 then log in and leave karma (feedback). selinux-policy-3.12.1-177.fc20 has been pushed to the Fedora 20 stable repository. If problems still persist, please make note of it in this bug report. |