Bug 736928 - SELinux is preventing /sbin/consoletype from 'ioctl' accesses on the chr_file /dev/null.
Summary: SELinux is preventing /sbin/consoletype from 'ioctl' 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:e9332a8cf4c...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-09-09 05:52 UTC by Renich Bon Ciric
Modified: 2011-09-09 07:51 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-09-09 07:51:08 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Renich Bon Ciric 2011-09-09 05:52:03 UTC
SELinux is preventing /sbin/consoletype from 'ioctl' 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 ioctl 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                      831633e0-ee91-40a4-b7f4-a48dd646fa5f

Raw Audit Messages
type=AVC msg=audit(1315547316.623:2434): avc:  denied  { ioctl } 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:2434): arch=x86_64 syscall=ioctl success=no exit=ENOTTY a0=0 a1=541c a2=7fff38dd072f 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,ioctl

audit2allow

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

audit2allow -R

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

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