Bug 624644 - SELinux is preventing /usr/bin/gcm-apply "read" access to device 003.
Summary: SELinux is preventing /usr/bin/gcm-apply "read" access to device 003.
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 13
Hardware: x86_64
OS: Linux
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
Whiteboard: setroubleshoot_trace_hash:7e50f86a54c...
Depends On:
TreeView+ depends on / blocked
Reported: 2010-08-17 10:48 UTC by fano
Modified: 2010-11-03 16:22 UTC (History)
3 users (show)

Clone Of:
Last Closed: 2010-11-03 16:22:55 UTC

Attachments (Terms of Use)

Description fano 2010-08-17 10:48:28 UTC

SELinux is preventing /usr/bin/gcm-apply "read" access to device 003.

Detailed Description:

[gcm-apply has a permissive type (xdm_t). This access was not denied.]

SELinux has denied gcm-apply "read" access to device 003. 003 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 '003'. 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 003, you can use chcon -t SIMILAR_TYPE
'003', If this fixes the problem, you can make this permanent by executing
semanage fcontext -a -t SIMILAR_TYPE '003' 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 '003' or chcon -t SIMILAR_TYPE '003'

Additional Information:

Source Context                system_u:system_r:xdm_t:s0-s0:c0.c1023
Target Context                system_u:object_r:device_t:s0
Target Objects                003 [ chr_file ]
Source                        gcm-apply
Source Path                   /usr/bin/gcm-apply
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           gnome-color-manager-2.30.1-1.fc13
Target RPM Packages           
Policy RPM                    selinux-policy-3.7.19-21.fc13
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Plugin Name                   device
Host Name                     (removed)
Platform                      Linux (removed) #1 SMP
                              Thu May 27 02:28:31 UTC 2010 x86_64 x86_64
Alert Count                   1
First Seen                    Thu 01 Jul 2010 09:37:34 AM EAT
Last Seen                     Thu 01 Jul 2010 09:37:34 AM EAT
Local ID                      5d595946-682b-47f3-9e02-5cbf42b96442
Line Numbers                  

Raw Audit Messages            

node=(removed) type=AVC msg=audit(1277966254.858:12): avc:  denied  { read } for  pid=1622 comm="gcm-apply" name="003" dev=devtmpfs ino=15114 scontext=system_u:system_r:xdm_t:s0-s0:c0.c1023 tcontext=system_u:object_r:device_t:s0 tclass=chr_file

node=(removed) type=SYSCALL msg=audit(1277966254.858:12): arch=c000003e syscall=2 success=yes exit=4294967424 a0=7ffff69c7ef0 a1=0 a2=d a3=fffffffd items=0 ppid=1 pid=1622 auid=4294967295 uid=42 gid=472 euid=42 suid=42 fsuid=42 egid=472 sgid=472 fsgid=472 tty=(none) ses=4294967295 comm="gcm-apply" exe="/usr/bin/gcm-apply" subj=system_u:system_r:xdm_t:s0-s0:c0.c1023 key=(null)

Hash String generated from  device,gcm-apply,xdm_t,device_t,chr_file,read
audit2allow suggests:

#============= xdm_t ==============
allow xdm_t device_t:chr_file read;

Comment 1 Miroslav Grepl 2010-08-18 12:21:56 UTC
Could you try to execute

find /dev -type c -context "*:device_t:*"

You probably will not get any outputs. This means the USB device is now labelled correctly.

Also please update your selinux-policy.

yum update selinux-policy-targeted

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