DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=19023>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=19023

Multiple NoProxy entries will crash Apache

           Summary: Multiple NoProxy entries will crash Apache
           Product: Apache httpd-2.0
           Version: 2.0.45
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: mod_proxy
        AssignedTo: [email protected]
        ReportedBy: [EMAIL PROTECTED]


Set up Apache 2.0.45 or earlier to function as a proxy server.
Block more than one site with the NoProxy directive.
Make the proxy serve a URL which does not match the blocked sites.
Observe Apache die.

The problem was identified to routine ap_proxy_checkproxyblock. It has 3 nested
loops. If the innermost loop is run to completion, uri_addr is set to NULL,
which is then used on the next iteration of the outer loop. The patch below
fixes the problem.

--- proxy_util.c        14 Apr 2003 09:49:53 -0000      1.3
+++ proxy_util.c        14 Apr 2003 14:21:42 -0000      1.4
@@ -1015,10 +1015,12 @@
                              apr_sockaddr_t *uri_addr)
 {
     int j;
+       apr_sockaddr_t * src_uri_addr = uri_addr;
     /* XXX FIXME: conf->noproxies->elts is part of an opaque structure */
     for (j = 0; j < conf->noproxies->nelts; j++) {
         struct noproxy_entry *npent = (struct noproxy_entry *)
conf->noproxies->elts;
         struct apr_sockaddr_t *conf_addr = npent[j].addr;
+               uri_addr = src_uri_addr;
         ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
                      "proxy: checking remote machine [%s] against [%s]",
uri_addr->hostname, npent[j].name);
         if ((npent[j].name && ap_strstr_c(uri_addr->hostname, npent[j].name))

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to