Bug 712741 - SELinux is preventing /sbin/consoletype from 'read' accesses on the file /dev/null.
Summary: SELinux is preventing /sbin/consoletype from 'read' accesses on the file /dev...
Keywords:
Status: CLOSED INSUFFICIENT_DATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 15
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: setroubleshoot_trace_hash:f5025db7778...
: 712742 712743 712744 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-06-12 23:00 UTC by Hicham HAOUARI
Modified: 2011-10-07 14:28 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-10-07 14:28:04 UTC
Type: ---


Attachments (Terms of Use)

Description Hicham HAOUARI 2011-06-12 23:00:34 UTC
SELinux is preventing /sbin/consoletype from 'read' accesses on the file /dev/null.

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

If you believe that consoletype should be allowed read access on the null 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 consoletype /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                unconfined_u:system_r:consoletype_t:s0
Target Context                unconfined_u:object_r:device_t:s0
Target Objects                /dev/null [ file ]
Source                        consoletype
Source Path                   /sbin/consoletype
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           initscripts-9.30-2.fc15
Target RPM Packages           
Policy RPM                    selinux-policy-3.9.16-21.fc15
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 2.6.38.5-22.fc15.i686 #1 SMP
                              Mon May 2 20:17:28 UTC 2011 i686 i686
Alert Count                   9
First Seen                    Thu 05 May 2011 03:03:12 PM WEST
Last Seen                     Thu 05 May 2011 03:36:18 PM WEST
Local ID                      683f49d9-a6a6-4a96-990b-f5881039aa1c

Raw Audit Messages
type=AVC msg=audit(1304606178.504:142): avc:  denied  { read } for  pid=17274 comm="consoletype" path="/dev/null" dev=sda1 ino=203 scontext=unconfined_u:system_r:consoletype_t:s0 tcontext=unconfined_u:object_r:device_t:s0 tclass=file


type=AVC msg=audit(1304606178.504:142): avc:  denied  { write } for  pid=17274 comm="consoletype" path="/dev/null" dev=sda1 ino=203 scontext=unconfined_u:system_r:consoletype_t:s0 tcontext=unconfined_u:object_r:device_t:s0 tclass=file


type=SYSCALL msg=audit(1304606178.504:142): arch=i386 syscall=execve success=yes exit=0 a0=8335340 a1=83353b8 a2=832e5a0 a3=83353b8 items=0 ppid=17273 pid=17274 auid=500 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=pts0 ses=1 comm=consoletype exe=/sbin/consoletype subj=unconfined_u:system_r:consoletype_t:s0 key=(null)

Hash: consoletype,consoletype_t,device_t,file,read

audit2allow

#============= consoletype_t ==============
allow consoletype_t device_t:file { read write };

audit2allow -R

#============= consoletype_t ==============
allow consoletype_t device_t:file { read write };

Comment 1 Miroslav Grepl 2011-06-13 06:47:17 UTC
For some reason /dev/null is not labeled correctly on your machine.  You might
have a badly labeled system.

Is udev running with the correct context?

# ps -eZ | grep udev
system_u:system_r:udev_t:s0-s0:c0.c1023 431 ?  00:00:00 udev

# restorecon /dev/null 

will fix.

Comment 2 Miroslav Grepl 2011-06-13 06:51:13 UTC
*** Bug 712742 has been marked as a duplicate of this bug. ***

Comment 3 Miroslav Grepl 2011-06-13 06:51:28 UTC
*** Bug 712743 has been marked as a duplicate of this bug. ***

Comment 4 Miroslav Grepl 2011-06-13 06:51:46 UTC
*** Bug 712744 has been marked as a duplicate of this bug. ***


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