Bug 736927 - SELinux is preventing /sbin/consoletype from 'getattr' accesses on the chr_file /dev/null.
Summary: SELinux is preventing /sbin/consoletype from 'getattr' accesses on the chr_fi...
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:d1b4b743ce8...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-09-09 05:51 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:51 UTC


Attachments (Terms of Use)

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

*****  Plugin restorecon (85.9 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.33 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.33 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.35 confidence) suggests  ***************************

If you believe that consoletype should be allowed getattr 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

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                      1e8e0f63-bb3c-44be-b84e-299c5822445a

Raw Audit Messages
type=AVC msg=audit(1315547316.623:2433): avc:  denied  { getattr } 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.623:2433): arch=x86_64 syscall=fstat success=yes exit=0 a0=0 a1=7fff38dd0690 a2=7fff38dd0690 a3=7fff38dd0420 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,getattr

audit2allow

#============= consoletype_t ==============
allow consoletype_t file_t:chr_file getattr;

audit2allow -R

#============= consoletype_t ==============
allow consoletype_t file_t:chr_file getattr;

Comment 1 Miroslav Grepl 2011-09-09 07:50:51 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.