Bug 35081

Summary: buffer overrun in ssl_callback_SSLVerify_CRL( ) (ssl_engine_kernel.c)
Product: Apache httpd-2 Reporter: Marc Stern <marc.stern>
Component: mod_sslAssignee: Apache HTTPD Bugs Mailing List <bugs>
Status: CLOSED FIXED    
Severity: critical    
Priority: P1    
Version: 2.0.54   
Target Milestone: ---   
Hardware: All   
OS: All   

Description Marc Stern 2005-05-26 09:21:03 UTC
I found a buffer overrun in ssl_callback_SSLVerify_CRL( ) - ssl_engine_kernel.c:
 
char buff[512]; /* should be plenty */
[...]
n = BIO_read(bio, buff, sizeof(buff));
buff[n] = '\0';
 
If there are more than 512 bytes, n=512, thus we write in buff[512].
We should use
    n = BIO_read(bio, buff, sizeof(buff) - 1);

This could lead to a system crash.
Comment 1 Joe Orton 2005-06-03 15:15:14 UTC
Thanks, Mark.  Committed to the trunk and proposed for backport.
http://svn.apache.org/viewcvs?rev=179781&view=rev

Please note that bugs which you think may have security implications should be
reported in the first place to security@apache.org address.
Comment 2 Joe Orton 2005-06-08 11:09:40 UTC
Merged for 2.0.55.  http://svn.apache.org/viewcvs?rev=189562&view=rev