Bug 875552 - SELinux is preventing /usr/sbin/setfiles from 'read' accesses on the chr_file /dev/random.
Summary: SELinux is preventing /usr/sbin/setfiles from 'read' accesses on the chr_file...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 18
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:849e7dd3ef7df53b9e9fde8dc09...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-11-12 01:51 UTC by Jan Teichmann
Modified: 2012-12-07 04:31 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-12-07 04:31:25 UTC
Type: ---


Attachments (Terms of Use)
File: type (9 bytes, text/plain)
2012-11-12 01:51 UTC, Jan Teichmann
no flags Details
File: hashmarkername (14 bytes, text/plain)
2012-11-12 01:51 UTC, Jan Teichmann
no flags Details
audit.log (122.47 KB, text/plain)
2012-11-21 20:59 UTC, Steve Tyler
no flags Details
messages (148.44 KB, text/plain)
2012-11-21 20:59 UTC, Steve Tyler
no flags Details

Description Jan Teichmann 2012-11-12 01:51:48 UTC
Additional info:
libreport version: 2.0.17
kernel:         3.6.6-3.fc18.x86_64

description:
:SELinux is preventing /usr/sbin/setfiles from 'read' accesses on the chr_file /dev/random.
:
:*****  Plugin catchall (100. confidence) suggests  ***************************
:
:If you believe that setfiles should be allowed read access on the random 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:unconfined_r:setfiles_t:s0-s0:c0.c102
:                              3
:Target Context                system_u:object_r:random_device_t:s0
:Target Objects                /dev/random [ chr_file ]
:Source                        restorecon
:Source Path                   /usr/sbin/setfiles
:Port                          <Unknown>
:Host                          (removed)
:Source RPM Packages           policycoreutils-2.1.13-17.fc18.x86_64
:Target RPM Packages           
:Policy RPM                    selinux-policy-3.11.1-50.fc18.noarch
:Selinux Enabled               True
:Policy Type                   targeted
:Enforcing Mode                Permissive
:Host Name                     (removed)
:Platform                      Linux (removed) 3.6.6-3.fc18.x86_64 #1 SMP Mon Nov
:                              5 16:26:34 UTC 2012 x86_64 x86_64
:Alert Count                   1
:First Seen                    2012-11-11 20:49:26 EST
:Last Seen                     2012-11-11 20:49:26 EST
:Local ID                      ecec4f83-211c-4c86-be3b-a7fb0a174f8d
:
:Raw Audit Messages
:type=AVC msg=audit(1352684966.710:345): avc:  denied  { read } for  pid=10976 comm="restorecon" path="/dev/random" dev="devtmpfs" ino=1038 scontext=unconfined_u:unconfined_r:setfiles_t:s0-s0:c0.c1023 tcontext=system_u:object_r:random_device_t:s0 tclass=chr_file
:
:
:type=SYSCALL msg=audit(1352684966.710:345): arch=x86_64 syscall=execve success=yes exit=0 a0=254f8f0 a1=254f990 a2=2550280 a3=7fff36b43280 items=0 ppid=10975 pid=10976 auid=1000 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=2 comm=restorecon exe=/usr/sbin/setfiles subj=unconfined_u:unconfined_r:setfiles_t:s0-s0:c0.c1023 key=(null)
:
:Hash: restorecon,setfiles_t,random_device_t,chr_file,read
:
:audit2allow
:
:#============= setfiles_t ==============
:allow setfiles_t random_device_t:chr_file read;
:
:audit2allow -R
:
:#============= setfiles_t ==============
:allow setfiles_t random_device_t:chr_file read;
:

Comment 1 Jan Teichmann 2012-11-12 01:51:52 UTC
Created attachment 643152 [details]
File: type

Comment 2 Jan Teichmann 2012-11-12 01:51:54 UTC
Created attachment 643153 [details]
File: hashmarkername

Comment 3 Jan Teichmann 2012-11-12 02:03:37 UTC
happens just after anaconda finished installation using nightly image
http://koji.fedoraproject.org/koji/taskinfo?taskID=4673780

Comment 4 Miroslav Grepl 2012-11-12 08:39:57 UTC
commit 18c1e3cfd7701c967688808c330b4d2b8633e7c2
Author: Miroslav Grepl <mgrepl@redhat.com>
Date:   Mon Nov 12 09:38:35 2012 +0100

    Dontaudit setfiles reading /dev/random, seems a leaked file descriptor in Fedora install

Comment 5 Steve Tyler 2012-11-16 18:54:48 UTC
Doing a test install with anaconda 18.29 from F18-Beta-TC9 Live CD.

Package: (null)
OS Release: Fedora release 18 (Spherical Cow)

Comment 6 Kamil Páral 2012-11-21 13:51:32 UTC
This appeared at the end of anaconda installation on LiveCD.

Package: (null)
OS Release: Fedora release 18 (Spherical Cow)

Comment 7 Steve Tyler 2012-11-21 16:25:59 UTC
I'm not seeing any selinux[1] issues during installation or while booting and running a default Gnome desktop install with:

selinux-policy-0:3.11.1-50.fc18.noarch
Fedora-18-Beta-x86_64-Live-Desktop.iso (RC1)

Tested with:
$ qemu-kvm -m 2048 -hda f18-test-1.img -cdrom ~/xfr/fedora/F18/F18-Beta/RC1/Fedora-18-Beta-x86_64-Live-Desktop.iso -usb -vga qxl -boot menu=on -usbdevice mouse

[1] https://admin.fedoraproject.org/updates/search/selinux

Comment 8 Steve Tyler 2012-11-21 20:39:25 UTC
Install with encrypted file systems:
Click "Encrypt my data ..."
Delete all pre-existing file systems.
Auto-create new file systems.
Begin installation.
The alert occurs when the install stage is "Complete!"

F18-Beta-RC1 Live CD


Package: (null)
OS Release: Fedora release 18 (Spherical Cow)

Comment 9 Steve Tyler 2012-11-21 20:47:50 UTC
(In reply to comment #8)
> Install with encrypted file systems:
> Click "Encrypt my data ..."
> Delete all pre-existing file systems.
> Auto-create new file systems.
> Begin installation.
> The alert occurs when the install stage is "Complete!"
> 
> F18-Beta-RC1 Live CD
> 
> 
> Package: (null)
> OS Release: Fedora release 18 (Spherical Cow)

libreport is not reporting the package version, but for the record it is:
selinux-policy-0:3.11.1-50.fc18.noarch
Fedora-18-Beta-x86_64-Live-Desktop.iso (RC1)

Tested with:
$ qemu-kvm -m 2048 -hda f18-test-1.img -cdrom ~/xfr/fedora/F18/F18-Beta/RC1/Fedora-18-Beta-x86_64-Live-Desktop.iso -usb -vga qxl -boot menu=on -usbdevice mouse

Comment 10 Steve Tyler 2012-11-21 20:59:03 UTC
Created attachment 649410 [details]
audit.log

Comment 11 Steve Tyler 2012-11-21 20:59:33 UTC
Created attachment 649411 [details]
messages

Comment 12 Fedora Update System 2012-11-28 20:57:56 UTC
selinux-policy-3.11.1-57.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/selinux-policy-3.11.1-57.fc18

Comment 13 Fedora Update System 2012-11-30 06:36:15 UTC
Package selinux-policy-3.11.1-57.fc18:
* should fix your issue,
* was pushed to the Fedora 18 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing selinux-policy-3.11.1-57.fc18'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-19374/selinux-policy-3.11.1-57.fc18
then log in and leave karma (feedback).

Comment 14 Fedora Update System 2012-12-02 19:30:15 UTC
Package selinux-policy-3.11.1-59.fc18:
* should fix your issue,
* was pushed to the Fedora 18 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing selinux-policy-3.11.1-59.fc18'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-19374/selinux-policy-3.11.1-59.fc18
then log in and leave karma (feedback).

Comment 15 Jared Smith 2012-12-04 21:02:52 UTC
Running the latest verson of the Anaconda installer from LiveUSB.  I burned the Fedora 18 Beta to a USB key, booted from the USB key, updated anaconda via yum, and then ran anaconda.  When Anaconda finished, I noticed I had an SELinux alert.

Package: (null)
OS Release: Fedora release 18 (Spherical Cow)

Comment 16 Miroslav Grepl 2012-12-05 09:48:20 UTC
Are you getting the same AVC?

Comment 17 Jared Smith 2012-12-05 13:57:44 UTC
Yes, I am.

Comment 18 Fedora Update System 2012-12-06 20:12:37 UTC
Package selinux-policy-3.11.1-60.fc18:
* should fix your issue,
* was pushed to the Fedora 18 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing selinux-policy-3.11.1-60.fc18'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-19374/selinux-policy-3.11.1-60.fc18
then log in and leave karma (feedback).

Comment 19 Fedora Update System 2012-12-07 04:31:27 UTC
selinux-policy-3.11.1-60.fc18 has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.


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