Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.

Bug 641313

Summary: SELinux is preventing /usr/bin/python "read write" access to device 005.
Product: [Fedora] Fedora Reporter: Vivekanand Saraswati <vivekanand.saraswati>
Component: udevAssignee: Harald Hoyer <harald>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 13CC: dwalsh, harald, jonathan, mgrepl, twaugh, vivekanand.saraswati
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard: setroubleshoot_trace_hash:13ecb5de1bfea4fd3de830950e719882955c88a00c668169fb6854bec09da213
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-06-28 07:50:38 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description Vivekanand Saraswati 2010-10-08 07:41:04 EDT

SELinux is preventing /usr/bin/python "read write" access to device 005.

Detailed Description:

SELinux has denied hpfax "read write" access to device 005. 005 is mislabeled,
this device has the default label of the /dev directory, which should not
happen. All Character and/or Block Devices should have a label. You can attempt
to change the label of the file using restorecon -v '005'. If this device
remains labeled device_t, then this is a bug in SELinux policy. Please file a bg
report. If you look at the other similar devices labels, ls -lZ /dev/SIMILAR,
and find a type that would work for 005, you can use chcon -t SIMILAR_TYPE
'005', If this fixes the problem, you can make this permanent by executing
semanage fcontext -a -t SIMILAR_TYPE '005' If the restorecon changes the
context, this indicates that the application that created the device, created it
without using SELinux APIs. If you can figure out which application created the
device, please file a bug report against this application.

Allowing Access:

Attempt restorecon -v '005' or chcon -t SIMILAR_TYPE '005'

Additional Information:

Source Context                system_u:system_r:hplip_t:s0-s0:c0.c1023
Target Context                system_u:object_r:device_t:s0
Target Objects                005 [ chr_file ]
Source                        hpfax
Source Path                   /usr/bin/python
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           python-2.6.4-27.fc13
Target RPM Packages           
Policy RPM                    selinux-policy-3.7.19-62.fc13
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Plugin Name                   device
Host Name                     (removed)
Platform                      Linux (removed)
                     #1 SMP Wed Sep 15
                              03:27:15 UTC 2010 i686 i686
Alert Count                   1
First Seen                    Fri 08 Oct 2010 12:04:55 PM IST
Last Seen                     Fri 08 Oct 2010 12:04:55 PM IST
Local ID                      392f1739-a7d2-491b-b67a-3de0570dac99
Line Numbers                  

Raw Audit Messages            

node=(removed) type=AVC msg=audit(1286519695.28:53): avc:  denied  { read write } for  pid=16995 comm="hpfax" name="005" dev=devtmpfs ino=129656 scontext=system_u:system_r:hplip_t:s0-s0:c0.c1023 tcontext=system_u:object_r:device_t:s0 tclass=chr_file

node=(removed) type=SYSCALL msg=audit(1286519695.28:53): arch=40000003 syscall=5 success=no exit=-13 a0=bfebf6d0 a1=2 a2=1 a3=a325f90 items=0 ppid=16992 pid=16995 auid=4294967295 uid=0 gid=7 euid=0 suid=0 fsuid=0 egid=7 sgid=7 fsgid=7 tty=(none) ses=4294967295 comm="hpfax" exe="/usr/bin/python" subj=system_u:system_r:hplip_t:s0-s0:c0.c1023 key=(null)

Hash String generated from  device,hpfax,hplip_t,device_t,chr_file,read,write
audit2allow suggests:

#============= hplip_t ==============
allow hplip_t device_t:chr_file { read write };
Comment 1 Daniel Walsh 2010-10-08 09:06:40 EDT
Did you just plug in a printer device when this happened?
Comment 2 Bug Zapper 2011-05-31 07:44:50 EDT
This message is a reminder that Fedora 13 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 13.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '13'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 13's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 13 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
Comment 3 Bug Zapper 2011-06-28 07:50:38 EDT
Fedora 13 changed to end-of-life (EOL) status on 2011-06-25. Fedora 13 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.