Subject: Fwd: Tracking down mod_ssl/OpenSSL bug

From: "Douglas K. Fischer" <[email-masked]>
Date: Fri, 11 Jul 2003 12:18:07 -0400

----- Begin forwarded message -----
Ralf,

I have been doing some code-walking to track down a problem we've been 
having since last November with Apache child processes getting segmentation 
faults periodically, and it appears to boil down to something with mod_ssl 
and/or OpenSSL. I was hoping you could help shed some light on this, and/or 
suggest where to next extend my search. Here are the details thus far:

- Running Apache 1.3.27 and mod_ssl 2.8.14 with OpenSSL 0.9.7b (also tried 
with the 0.9.6 line with the same results)

gdb backtrace (attached) shows the segmentation fault being generated by 
ssl3_write_pending(). This happens when a timeout occurs during 
ap_send_fd() or ap_send_mmap(). The Apache timeout() handler is invoked by 
the SIGALRM handler, which closes the connection and frees the SSL context. 
When the signal handler finishes and returns to the stack (where we were in 
the middle of a write operation somewhere inside of ssl3_write_pending()), 
ssl3_write_pending() segfaults when it tries to access the non-existent 
context.

I'm not sure if this would be considered a deficiency in how mod_ssl closes 
the connection, in how OpenSSL's ssl3_write_pending() checks for a valid 
context after BIO_write(), or something else entirely.

Any direction you can provide would be greatly appreciated. I'd be more 
than happy to provide any additional info or debugging/troubleshooting steps.

Many thanks,

Doug 
------------------------------------------------------------

This email, and any included attachments, have been checked
by Norton AntiVirus Corporate Edition (Version 8.0), AVG
Server Edition 6.0, and Merak Email Server Integrated
Antivirus (Alwil Software's aVast! engine) and is certified
Virus Free.

---

From: [email-masked]
Date: Fri, 11 Jul 2003 17:17:13 +0000

I am away on annual leave until the 15th July 2003

I will get back to you as soon as i can on my return.

If it's an urgent Online Learning Support Unit / Web/ MUBSWEB/ MUBS Online matter
that requires urgent attention then  please contact either  Kirsteen1, Sanjay1 or Jeff1
who should be able to help.

All the best 
Alex
______________________________________________________________________
Apache Interface to OpenSSL (mod_ssl)                   www.modssl.org
User Support Mailing List                      [email-masked]
Automated List Manager                            [email-masked]