httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jor...@apache.org
Subject cvs commit: httpd-2.0 CHANGES
Date Mon, 21 Jul 2003 12:02:40 GMT
jorton      2003/07/21 05:02:40

  Modified:    modules/ssl ssl_engine_kernel.c ssl_engine_io.c
               .        CHANGES
  Log:
  Prevent segfaults after SSL renegotiation failures.
  
  * modules/ssl/ssl_engine_kernel.c (ssl_hook_Access): Set aborted flag
  after renegotiation failure.
  
  * modules/ssl/ssl_engine_io.c (ssl_filter_write, ssl_io_filter_output):
  Don't dereference BIOs in filter_ctx when filter_ctx->pssl is NULL.
  (ssl_filter_io_shutdown): Set aborted flag on abortive shutdown.
  
  PR: 21370
  Submitted by: Hartmut Keil <Hartmut.Keil@adnovum.ch>
  Cleaned up by: Jeff Trawick, Joe Orton
  
  Revision  Changes    Path
  1.96      +2 -0      httpd-2.0/modules/ssl/ssl_engine_kernel.c
  
  Index: ssl_engine_kernel.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/ssl/ssl_engine_kernel.c,v
  retrieving revision 1.95
  retrieving revision 1.96
  diff -u -u -r1.95 -r1.96
  --- ssl_engine_kernel.c	9 Jul 2003 12:27:12 -0000	1.95
  +++ ssl_engine_kernel.c	21 Jul 2003 12:02:39 -0000	1.96
  @@ -706,6 +706,7 @@
                   ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server,
                                "Re-negotiation request failed");
   
  +                r->connection->aborted = 1;
                   return HTTP_FORBIDDEN;
               }
   
  @@ -724,6 +725,7 @@
                                "Re-negotiation handshake failed: "
                           "Not accepted by client!?");
   
  +                r->connection->aborted = 1;
                   return HTTP_FORBIDDEN;
               }
           }
  
  
  
  1.110     +9 -4      httpd-2.0/modules/ssl/ssl_engine_io.c
  
  Index: ssl_engine_io.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/ssl/ssl_engine_io.c,v
  retrieving revision 1.109
  retrieving revision 1.110
  diff -u -u -r1.109 -r1.110
  --- ssl_engine_io.c	22 May 2003 19:41:32 -0000	1.109
  +++ ssl_engine_io.c	21 Jul 2003 12:02:39 -0000	1.110
  @@ -780,8 +780,7 @@
                                        apr_size_t len)
   {
       ssl_filter_ctx_t *filter_ctx = f->ctx;
  -    bio_filter_out_ctx_t *outctx = 
  -           (bio_filter_out_ctx_t *)(filter_ctx->pbioWrite->ptr);
  +    bio_filter_out_ctx_t *outctx;
       int res;
   
       /* write SSL */
  @@ -789,6 +788,7 @@
           return APR_EGENERAL;
       }
   
  +    outctx = (bio_filter_out_ctx_t *)filter_ctx->pbioWrite->ptr;
       res = SSL_write(filter_ctx->pssl, (unsigned char *)data, len);
   
       if (res < 0) {
  @@ -1003,6 +1003,11 @@
       sslconn->ssl = NULL;
       filter_ctx->pssl = NULL; /* so filters know we've been shutdown */
   
  +    if (abortive) {
  +        /* prevent any further I/O */
  +        c->aborted = 1;
  +    }
  +
       return APR_SUCCESS;
   }
   
  @@ -1362,8 +1367,7 @@
   {
       apr_status_t status = APR_SUCCESS;
       ssl_filter_ctx_t *filter_ctx = f->ctx;
  -    bio_filter_in_ctx_t *inctx = (bio_filter_in_ctx_t *)
  -                                 (filter_ctx->pbioRead->ptr);
  +    bio_filter_in_ctx_t *inctx;
   
       if (f->c->aborted) {
           apr_brigade_cleanup(bb);
  @@ -1375,6 +1379,7 @@
           return ap_pass_brigade(f->next, bb);
       }
   
  +    inctx = (bio_filter_in_ctx_t *)filter_ctx->pbioRead->ptr;
       /* When we are the writer, we must initialize the inctx
        * mode so that we block for any required ssl input, because
        * output filtering is always nonblocking.
  
  
  
  1.1234    +3 -0      httpd-2.0/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/CHANGES,v
  retrieving revision 1.1233
  retrieving revision 1.1234
  diff -u -u -r1.1233 -r1.1234
  --- CHANGES	21 Jul 2003 11:41:00 -0000	1.1233
  +++ CHANGES	21 Jul 2003 12:02:40 -0000	1.1234
  @@ -2,6 +2,9 @@
   
     [Remove entries to the current 2.0 section below, when backported]
   
  +  *) mod_ssl: Fix segfaults after renegotiation failure. PR 21370
  +     [Hartmut Keil <Hartmut.Keil@adnovum.ch>]
  +
     *) ab: Overlong credentials given via command line no longer clobber
        the buffer. [André Malo]
   
  
  
  

Mime
View raw message