Bug 744396 - SELinux is preventing /usr/lib/cups/backend/serial from write access on the chr_file ttyUSB0.
Summary: SELinux is preventing /usr/lib/cups/backend/serial from write access on the c...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy-targeted
Version: 16
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Ben Levenson
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-10-08 10:09 UTC by Gianluca Sforna
Modified: 2011-10-19 04:32 UTC (History)
1 user (show)

Fixed In Version: selinux-policy-3.10.0-40.fc16
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-10-19 04:32:38 UTC
Type: ---


Attachments (Terms of Use)

Description Gianluca Sforna 2011-10-08 10:09:13 UTC
This is what I got when I plugged my USB printer to my laptop, Fedora 16 Beta.

It seems the printer was properly configured anyway

*****  Plugin catchall (100. confidence) suggests  ***************************

If you believe that serial should be allowed write access on the ttyUSB0 chr_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 serial /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:object_r:usbtty_device_t:s0
Target Objects                ttyUSB0 [ chr_file ]
Source                        serial
Source Path                   /usr/lib/cups/backend/serial
Port                          <Unknown>
Host                          novo
Source RPM Packages           cups-1.5.0-14.fc16
Target RPM Packages           
Policy RPM                    selinux-policy-3.10.0-36.fc16
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     novo
Platform                      Linux novo 3.1.0-0.rc8.git0.1.fc16.x86_64 #1 SMP
                              Tue Oct 4 03:16:40 UTC 2011 x86_64 x86_64
Alert Count                   1
First Seen                    Sat 08 Oct 2011 11:37:59 AM CEST
Last Seen                     Sat 08 Oct 2011 11:37:59 AM CEST
Local ID                      c7dbd333-0dc5-4fef-9983-d1a978bc5d81

Raw Audit Messages
type=AVC msg=audit(1318066679.684:195): avc:  denied  { write } for  pid=20745 comm="serial" name="ttyUSB0" dev=devtmpfs ino=493504 scontext=system_u:system_r:cupsd_t:s0-s0:c0.c1023 tcontext=system_u:object_r:usbtty_device_t:s0 tclass=chr_file


type=SYSCALL msg=audit(1318066679.684:195): arch=x86_64 syscall=open success=no exit=EACCES a0=7fffea449110 a1=901 a2=7fffea44911c a3=7fffea446ba0 items=0 ppid=20740 pid=20745 auid=4294967295 uid=0 gid=7 euid=0 suid=0 fsuid=0 egid=7 sgid=7 fsgid=7 tty=(none) ses=4294967295 comm=serial exe=/usr/lib/cups/backend/serial subj=system_u:system_r:cupsd_t:s0-s0:c0.c1023 key=(null)

Hash: serial,cupsd_t,usbtty_device_t,chr_file,write

audit2allow

#============= cupsd_t ==============
allow cupsd_t usbtty_device_t:chr_file write;

audit2allow -R

#============= cupsd_t ==============
allow cupsd_t usbtty_device_t:chr_file write;

Comment 1 Miroslav Grepl 2011-10-10 11:32:40 UTC
Fixed in selinux-policy-3.10.0-39.fc16

Comment 2 Fedora Update System 2011-10-14 16:19:21 UTC
selinux-policy-3.10.0-40.fc16 has been submitted as an update for Fedora 16.
https://admin.fedoraproject.org/updates/selinux-policy-3.10.0-40.fc16

Comment 3 Fedora Update System 2011-10-15 14:33:00 UTC
Package selinux-policy-3.10.0-40.fc16:
* should fix your issue,
* was pushed to the Fedora 16 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-40.fc16'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2011-14363
then log in and leave karma (feedback).

Comment 4 Fedora Update System 2011-10-19 04:32:38 UTC
selinux-policy-3.10.0-40.fc16 has been pushed to the Fedora 16 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.