Bug 736926 - SELinux is preventing /sbin/consoletype from 'read' accesses on the chr_file /dev/null.
Summary: SELinux is preventing /sbin/consoletype from 'read' accesses on the chr_file ...
Keywords:
Status: CLOSED DUPLICATE of bug 736924
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: rawhide
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: setroubleshoot_trace_hash:80d33a34521...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-09-09 05:50 UTC by Renich Bon Ciric
Modified: 2011-09-09 07:50 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-09-09 07:50:35 UTC


Attachments (Terms of Use)

Description Renich Bon Ciric 2011-09-09 05:50:45 UTC
SELinux is preventing /sbin/consoletype from 'read' accesses on the chr_file /dev/null.

*****  Plugin restorecon (85.2 confidence) suggests  *************************

If you want to fix the label. 
/dev/null default label should be null_device_t.
Then you can run restorecon.
Do
# /sbin/restorecon -v /dev/null

*****  Plugin file (7.27 confidence) suggests  *******************************

If you think this is caused by a badly mislabeled machine.
Then you need to fully relabel.
Do
touch /.autorelabel; reboot

*****  Plugin file (7.27 confidence) suggests  *******************************

If you think this is caused by a badly mislabeled machine.
Then you need to fully relabel.
Do
touch /.autorelabel; reboot

*****  Plugin catchall (1.34 confidence) suggests  ***************************

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

*****  Plugin leaks (1.34 confidence) suggests  ******************************

If you want to ignore consoletype trying to read access the null chr_file, because you believe it should not need this access.
Then you should report this as a bug.  
You can generate a local policy module to dontaudit this access.
Do
# grep /sbin/consoletype /var/log/audit/audit.log | audit2allow -D -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                unconfined_u:system_r:consoletype_t:s0
Target Context                unconfined_u:object_r:file_t:s0
Target Objects                /dev/null [ chr_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-38.fc15
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Host Name                     (removed)
Platform                      Linux (removed) 2.6.40.4-5.fc15.x86_64 #1 SMP
                              Tue Aug 30 14:38:32 UTC 2011 x86_64 x86_64
Alert Count                   1
First Seen                    Fri 09 Sep 2011 12:48:36 AM CDT
Last Seen                     Fri 09 Sep 2011 12:48:36 AM CDT
Local ID                      97a48b7e-9966-448a-b150-d3bc484e5acc

Raw Audit Messages
type=AVC msg=audit(1315547316.616:2432): avc:  denied  { read } for  pid=22107 comm="consoletype" path="/dev/null" dev=dm-3 ino=32 scontext=unconfined_u:system_r:consoletype_t:s0 tcontext=unconfined_u:object_r:file_t:s0 tclass=chr_file


type=AVC msg=audit(1315547316.616:2432): avc:  denied  { write } for  pid=22107 comm="consoletype" path="/dev/null" dev=dm-3 ino=32 scontext=unconfined_u:system_r:consoletype_t:s0 tcontext=unconfined_u:object_r:file_t:s0 tclass=chr_file


type=SYSCALL msg=audit(1315547316.616:2432): arch=x86_64 syscall=execve success=yes exit=0 a0=24826b0 a1=247a990 a2=24851b0 a3=7fff9f93c8e0 items=0 ppid=22106 pid=22107 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,file_t,chr_file,read

audit2allow

#============= consoletype_t ==============
allow consoletype_t file_t:chr_file { read write };

audit2allow -R

#============= consoletype_t ==============
allow consoletype_t file_t:chr_file { read write };

Comment 1 Miroslav Grepl 2011-09-09 07:50:35 UTC

*** This bug has been marked as a duplicate of bug 736924 ***


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