Bug 143561

Summary: selinux, sendmail & TLS don't play nice (including suggested fix)
Product: [Fedora] Fedora Reporter: Phil Anderson <pza>
Component: selinux-policy-targetedAssignee: Daniel Walsh <dwalsh>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 3   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: RHBA-2005-251 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-01-27 06:50:53 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Phil Anderson 2004-12-22 11:55:25 UTC
TLS connections don't work in sendmail when TLS is on:

Dec 20 15:00:48 harry kernel: audit(1103515248.224:0): avc:  denied  {
    read } for  pid=12496 exe=/usr/sbin/sendmail.sendmail name=urandom
    dev=tmpfs ino=870 scontext=user_u:system_r:system_mail_t
    tcontext=system_u:object_r:urandom_device_t tclass=chr_file

maillog contains several errors, starting with:

sendmail[4239]: iBJBWAxA004239: STARTTLS=client, error: connect
failed=-1, SSL_error=1, timedout=0, errno=0
sendmail[4239]: STARTTLS=client: 4239:error:24064064:random number
generator:SSLEAY_RAND_BYTES:PRNG not seeded:md_rand.c:503:You need to
read the OpenSSL FAQ, http://www.openssl.org/support/faq.html

My solution to this problem was to add the following line to mta.te:
allow system_mail_t urandom_device_t:chr_file read;

This appears to have fixed the problem for me.

Comment 1 Daniel Walsh 2004-12-22 15:21:57 UTC
Please try selinux-policy-targeted-1.17.30-2.59

available on ftp://people.redhat.com/dwalsh/SELinux/FC3

Comment 2 Phil Anderson 2004-12-23 12:14:25 UTC
selinux-policy-targeted-1.17.30-2.59 fixes the problem for me.