Darryl Miles wrote:
But I can see your point now, if it is an OpenSSL problem you are pretty much stuck. For example if OpenSSL uses select() to sleep for /dev/random but your application is already into the 1500th active file descritor. Then OpenSSL is pretty much hosed for using select() inside itself, infact it should do a sanity check internally otherwise random corruption/crashes will occur because FD_SET() may scribble on memory.

Heh, nice... maybe this is a candidate:


rand/rand_unix.c:211: if (select(fd+1,&fset,NULL,NULL,&t) < 0)


You are safe if you don't increase your ulimit -n above the standard default of 1024. Above that OpenSSL may not be safe anymore. Try adding stack padding around the "fset" variable and see if your crashes go away to prove the solution.

Then maybe we can patch this for a poll() on platforms that support poll and do a sanity check of:

if(fd > __FD_SETSIZE) { do_error(); }

on platforms that dont.


Darryl
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to