Bug 875388 - SELinux is preventing /usr/sbin/setfiles from 'write' accesses on the chr_file /dev/null.
Summary: SELinux is preventing /usr/sbin/setfiles from 'write' accesses on the chr_fil...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 17
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:f08ebd78f7b2d7f4217b934e62a...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-11-10 22:07 UTC by James Heather
Modified: 2014-12-22 12:04 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2012-11-12 08:50:46 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
File: type (9 bytes, text/plain)
2012-11-10 22:07 UTC, James Heather
no flags Details
File: hashmarkername (14 bytes, text/plain)
2012-11-10 22:07 UTC, James Heather
no flags Details

Description James Heather 2012-11-10 22:07:28 UTC
Description of problem:
I don't know what happened here.

The label for /dev/null looks right, though.

[james@barry ~]$ ll -Z /dev/null
crw-rw-rw-. root root system_u:object_r:null_device_t:s0 /dev/null
[james@barry ~]$ 


Additional info:
libreport version: 2.0.18
kernel:         3.6.6-1.fc17.x86_64

description:
:SELinux is preventing /usr/sbin/setfiles from 'write' accesses on the chr_file /dev/null.
:
:*****  Plugin restorecon (81.8 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.00 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.00 confidence) suggests  *******************************
:
:If you think this is caused by a badly mislabeled machine.
:Then you need to fully relabel.
:Do
:touch /.autorelabel; reboot
:
:*****  Plugin leaks (5.37 confidence) suggests  ******************************
:
:If you want to ignore setfiles trying to write 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 /usr/sbin/setfiles /var/log/audit/audit.log | audit2allow -D -M mypol
:# semodule -i mypol.pp
:
:*****  Plugin catchall (1.31 confidence) suggests  ***************************
:
:If you believe that setfiles should be allowed write 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 restorecon /var/log/audit/audit.log | audit2allow -M mypol
:# semodule -i mypol.pp
:
:Additional Information:
:Source Context                unconfined_u:system_r:setfiles_t:s0-s0:c0.c1023
:Target Context                unconfined_u:object_r:file_t:s0
:Target Objects                /dev/null [ chr_file ]
:Source                        restorecon
:Source Path                   /usr/sbin/setfiles
:Port                          <Unknown>
:Host                          (removed)
:Source RPM Packages           policycoreutils-2.1.12-5.fc17.x86_64
:Target RPM Packages           
:Policy RPM                    selinux-policy-3.10.0-156.fc17.noarch
:Selinux Enabled               True
:Policy Type                   targeted
:Enforcing Mode                Enforcing
:Host Name                     (removed)
:Platform                      Linux (removed) 3.6.6-1.fc17.x86_64 #1 SMP Mon Nov
:                              5 21:59:35 UTC 2012 x86_64 x86_64
:Alert Count                   10
:First Seen                    2012-08-20 09:47:44 BST
:Last Seen                     2012-11-10 22:05:56 GMT
:Local ID                      bd21634b-c40b-415f-9f3d-cac6d27d88fd
:
:Raw Audit Messages
:type=AVC msg=audit(1352585156.1:5205): avc:  denied  { write } for  pid=4426 comm="restorecon" path="/dev/null" dev="loop0" ino=262149 scontext=unconfined_u:system_r:setfiles_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:file_t:s0 tclass=chr_file
:
:
:type=SYSCALL msg=audit(1352585156.1:5205): arch=x86_64 syscall=execve success=yes exit=0 a0=136eeb0 a1=136c3b0 a2=136baf0 a3=7fff076951a0 items=0 ppid=4424 pid=4426 auid=1000 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=pts1 ses=2 comm=restorecon exe=/usr/sbin/setfiles subj=unconfined_u:system_r:setfiles_t:s0-s0:c0.c1023 key=(null)
:
:Hash: restorecon,setfiles_t,file_t,chr_file,write
:
:audit2allow
:
:#============= setfiles_t ==============
:allow setfiles_t file_t:chr_file write;
:
:audit2allow -R
:
:#============= setfiles_t ==============
:allow setfiles_t file_t:chr_file write;
:


Potential duplicate bug: 736921

Comment 1 James Heather 2012-11-10 22:07:31 UTC
Created attachment 642378 [details]
File: type

Comment 2 James Heather 2012-11-10 22:07:33 UTC
Created attachment 642379 [details]
File: hashmarkername

Comment 3 Miroslav Grepl 2012-11-12 08:50:46 UTC
Ok, the label is correct. Are you able to get it again?

Comment 4 James Heather 2014-12-22 12:04:42 UTC
I've not seen this again. Thanks.


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