Bug 540027 - SELinux prevented asterisk from reading from the urandom device.
Summary: SELinux prevented asterisk from reading from the urandom device.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 12
Hardware: x86_64
OS: Linux
low
medium
Target Milestone: ---
Assignee: Daniel Walsh
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: setroubleshoot_trace_hash:9ce5d72795a...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-11-21 23:30 UTC by Wolfgang Rupprecht
Modified: 2009-12-02 04:40 UTC (History)
3 users (show)

Fixed In Version: 3.6.32-49.fc12
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-12-01 16:41:01 UTC


Attachments (Terms of Use)

Description Wolfgang Rupprecht 2009-11-21 23:30:36 UTC
Summary:

SELinux prevented asterisk from reading from the urandom device.

Detailed Description:

[asterisk has a permissive type (asterisk_t). This access was not denied.]

SELinux prevented asterisk from reading from the urandom device. This access
should be allowed for individual applications, but there are situations where
all applications require the access (for example, when ProPolice/SSP stack
smashing protection is used). Allowing this access may allow malicious
applications to drain the kernel entropy pool. This can compromise the ability
of some software that is dependent on high quality random numbers (e.g.,
ssh-keygen) to operate effectively. The risk of this type of attack is
relatively low.

Allowing Access:

Changing the "global_ssp" boolean to true will allow this access: "setsebool -P
global_ssp=1."

Fix Command:

setsebool -P global_ssp=1

Additional Information:

Source Context                system_u:system_r:asterisk_t:s0
Target Context                system_u:object_r:urandom_device_t:s0
Target Objects                /dev/urandom [ chr_file ]
Source                        asterisk
Source Path                   /usr/sbin/asterisk
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           asterisk-1.6.1.9-1.fc12
Target RPM Packages           
Policy RPM                    selinux-policy-3.6.32-46.fc12
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Plugin Name                   global_ssp
Host Name                     (removed)
Platform                      Linux (removed) 2.6.31.5-127.fc12.x86_64 #1
                              SMP Sat Nov 7 21:11:14 EST 2009 x86_64 x86_64
Alert Count                   2
First Seen                    Sat 21 Nov 2009 03:29:13 PM PST
Last Seen                     Sat 21 Nov 2009 03:29:32 PM PST
Local ID                      c1d0ec67-e63e-45e4-9f5c-68a4fc2f28e2
Line Numbers                  

Raw Audit Messages            

node=(removed) type=AVC msg=audit(1258846172.904:1080): avc:  denied  { read } for  pid=2188 comm="asterisk" path="/dev/urandom" dev=tmpfs ino=3240 scontext=system_u:system_r:asterisk_t:s0 tcontext=system_u:object_r:urandom_device_t:s0 tclass=chr_file

node=(removed) type=SYSCALL msg=audit(1258846172.904:1080): arch=c000003e syscall=0 success=yes exit=8 a0=3 a1=7faf7482ec28 a2=8 a3=0 items=0 ppid=1 pid=2188 auid=4294967295 uid=488 gid=471 euid=488 suid=488 fsuid=488 egid=471 sgid=471 fsgid=471 tty=(none) ses=4294967295 comm="asterisk" exe="/usr/sbin/asterisk" subj=system_u:system_r:asterisk_t:s0 key=(null)



Hash String generated from  selinux-policy-3.6.32-46.fc12,global_ssp,asterisk,asterisk_t,urandom_device_t,chr_file,read
audit2allow suggests:

#============= asterisk_t ==============
allow asterisk_t urandom_device_t:chr_file read;

Comment 1 Daniel Walsh 2009-11-23 15:18:35 UTC
You can add these rules for now using

# grep avc /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Fixed in selinux-policy-3.6.32-48.fc12.noarch

Comment 2 Fedora Update System 2009-11-23 23:39:46 UTC
selinux-policy-3.6.32-49.fc12 has been submitted as an update for Fedora 12.
http://admin.fedoraproject.org/updates/selinux-policy-3.6.32-49.fc12

Comment 3 Fedora Update System 2009-11-25 15:23:04 UTC
selinux-policy-3.6.32-49.fc12 has been pushed to the Fedora 12 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update selinux-policy'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F12/FEDORA-2009-12131

Comment 4 Fedora Update System 2009-12-02 04:34:14 UTC
selinux-policy-3.6.32-49.fc12 has been pushed to the Fedora 12 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.