]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Bump up for 1.3.29. Fold in the CAN-2003-0542 regex patch.
authorJim Jagielski <jim@apache.org>
Fri, 24 Oct 2003 16:11:41 +0000 (16:11 +0000)
committerJim Jagielski <jim@apache.org>
Fri, 24 Oct 2003 16:11:41 +0000 (16:11 +0000)
Get ready to tag.

PR:
Obtained from:
Submitted by:
Reviewed by:

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/1.3.x@101552 13f79535-47bb-0310-9956-ffa450edef68

Announcement
Announcement.de
STATUS
src/CHANGES
src/include/httpd.h
src/modules/standard/mod_alias.c
src/modules/standard/mod_rewrite.c
src/modules/standard/mod_rewrite.h

index a71c82603463508d00d7fc7770754fc5a73c8f0a..08a4435f5883653bcac3aeaa1444115d0504f8aa 100644 (file)
@@ -4,42 +4,41 @@
    The Apache Software Foundation and The Apache HTTP Server Project are
    pleased to announce the release of version 1.3.29 of the Apache HTTP
    Server ("Apache").  This Announcement notes the significant changes
-   in 1.3.29 as compared to 1.3.28.
+   in 1.3.29 as compared to 1.3.28.  The Announcement is also available
+   in German from http://www.apache.org/dist/httpd/Announcement.html.de.
 
-   This version of Apache is principally a bug fix release.
+   This version of Apache is principally a bug and security fix release.
    A partial summary of the bug fixes is given at the end of this document.
-   A full listing of changes can be found in the CHANGES file.
+   A full listing of changes can be found in the CHANGES file.  Of
+   particular note is that 1.3.29 addresses and fixes 1 potential
+   security issue:
+
+     o CAN-2003-0542 (cve.mitre.org)
+       Fix buffer overflows in mod_alias and mod_rewrite which occurred if
+       one configured a regular expression with more than 9 captures.
 
    We consider Apache 1.3.29 to be the best version of Apache 1.3 available
    and we strongly recommend that users of older versions, especially of
    the 1.1.x and 1.2.x family, upgrade as soon as possible.  No further
    releases will be made in the 1.2.x family.
 
-   Apache 1.3.29 is available for download from
+   Apache 1.3.29 is available for download from:
    
        http://httpd.apache.org/download.cgi
-                - or -
-       http://www.apache.org/dist/httpd/
-
-   Please see the CHANGES_1.3 file in the same directory for a full list
-   of changes.
-
-   Binary distributions are available from
 
-       http://www.apache.org/dist/httpd/binaries/
-
-   The source and binary distributions are also available via any of the
-   mirrors listed at
+   This service utilizes the network of mirrors listed at:
 
        http://www.apache.org/mirrors/
 
+   Please consult the CHANGES_1.3 file for a full list of changes.
+
    As of Apache 1.3.12 binary distributions contain all standard Apache
    modules as shared objects (if supported by the platform) and include
    full source code.  Installation is easily done by executing the
    included install script.  See the README.bindist and INSTALL.bindist
    files for a complete explanation.  Please note that the binary
    distributions are only provided for your convenience and current
-   distributions for specific platforms are not always available. Win32
+   distributions for specific platforms are not always available.  Win32
    binary distributions are based on the Microsoft Installer (.MSI)
    technology.  While development continues to make this installation method
    more robust, questions should be directed to the
@@ -52,7 +51,7 @@
    In general, Apache 1.3 offers several substantial improvements over
    version 1.2, including better performance, reliability and a wider
    range of supported platforms, including Windows NT and 2000 (which
-   fall under the "Win32" label), OS2, Netware, and TPE threaded
+   fall under the "Win32" label), OS2, Netware, and TPF threaded
    platforms.
 
    Apache is the most popular web server in the known universe; over half
@@ -60,7 +59,7 @@
    variants.
 
    IMPORTANT NOTE FOR APACHE USERS:   Apache 1.3 was designed for Unix OS
-   variants.  While  the ports to non-Unix platforms (such as Win32, Netware
+   variants.  While the ports to non-Unix platforms (such as Win32, Netware
    or OS2) are of an acceptable quality, Apache 1.3 is not optimized for
    these platforms.  Security, stability, or performance issues on these
    non-Unix ports do not generally apply to the Unix version, due to
 
                      Apache 1.3.29 Major changes
 
+  Security vulnerabilities
+
+     * CAN-2003-0542 (cve.mitre.org)
+       Fix buffer overflows in mod_alias and mod_rewrite which occurred if
+       one configured a regular expression with more than 9 captures.
 
   New features
 
    and have been fixed in Apache 1.3.29:
 
      * Within ap_bclose(), ap_pclosesocket() is now called consistently
-       for sockets and ap_pclosef() for files. Also, closesocket()
-       is used consistenly to close socket fd's. The previous
+       for sockets and ap_pclosef() for files.  Also, closesocket()
+       is used consistenly to close socket fd's.  The previous
        confusion between socket and file fd's would cause problems
        with some applications now that we proactively close fd's to
-       prevent leakage. PR 22805
+       prevent leakage.  PR 22805.
  
      * Fixed mod_usertrack to not get false positive matches on the
        user-tracking cookie's name.  PR 16661.
 
      * Prevent creation of subprocess Zombies when using CGI wrappers
-       such as suExec and cgiwrap. PR 21737. [Numerous]
+       such as suEXEC and cgiwrap.  PR 21737. 
 
index 2fb23ece35a704f1df1d556238c0bd9a8284a654..e87e17606b0c9061878ebe125f30a98857622b4f 100644 (file)
@@ -1,42 +1,39 @@
 
                    Apache HTTP Server 1.3.29 freigegeben
 
-   Wir, die Apache Software Foundation und das Apache Server Projekt, freuen
-   uns, die Freigabe der Version 1.3.29 des Apache HTTP Servers ("Apache")
-   bekannt zu geben. Diese Ankündigung führt die wesentlichen Änderungen von
-   1.3.29 gegenüber 1.3.28 auf. Die Ankündigung ist auch in englischer Sprache
-   unter http://www.apache.org/dist/httpd/Announcement.txt verfügbar.
-
-   Diese Version des Apache ist vornehmlich ein Bug-Fix-Update. 
-   Eine kurze Zusammenfassung der Bug-Fixes ist am Ende des Dokumentes
+   Wir, die Apache Software Foundation und das Apache HTTP Server Projekt, 
+   freuen uns, die Freigabe der Version 1.3.29 des Apache HTTP Servers 
+   ("Apache") bekannt zu geben. Diese Ankündigung führt die wesentlichen 
+   Änderungen von 1.3.29 gegenüber 1.3.28 auf. Die Ankündigung ist auch in 
+   englischer Sprache unter http://www.apache.org/dist/httpd/Announcement.txt 
+   verfügbar.
+
+   Diese Version des Apache ist vornehmlich ein Bug-Fix- und Sicherheits-
+   Update. Eine kurze Zusammenfassung der Bug-Fixes ist am Ende des Dokumentes
    aufgeführt. Die vollständige Liste der Änderungen ist in der CHANGES-
-   Datei zu finden.
+   Datei zu finden. Apache 1.3.29 behebt insbesondere 1 Sicherheitslücke.
+
+     o CAN-2003-0542 (cve.mitre.org)
+       Behebung von Pufferüberläufen in mod_alias und mod_rewrite, welche
+       auftraten, falls reguläre Ausdrücke mit mehr als 9 speichernden
+       Klammernpaaren angewendet wurden.
 
    Wir betrachten den Apache 1.3.29 als die beste verfügbare Version des
    Apache 1.3 und wir empfehlen Benutzern älterer Versionen, insbesondere
    der Familien 1.1.x und 1.2.x, umgehend die Aufrüstung. Für die 1.2.x-
    Familie werden keine weiteren Releases mehr erstellt.
 
-   Apache 1.3.29 steht unter
+   Apache 1.3.29 steht unter folgender Adresse zum Download bereit:
 
        http://httpd.apache.org/download.cgi
-                - oder -
-       http://www.apache.org/dist/httpd/
-
-   zum Download bereit.
-
-   Für eine vollständige Liste der Änderungen lesen Sie bitte die Datei
-   CHANGES_1.3 im gleichen Verzeichnis.
-
-   Binärdistributionen sind verfügbar unter
 
-       http://www.apache.org/dist/httpd/binaries/
-
-   Die Quelltexte und Binärdistributionen sind ebenso über jeden unter
+   Dieser Service nutzt das Mirror-Netzwerk, welches unter folgender
+   Adresse aufgeführt wird:
 
        http://www.apache.org/mirrors/
 
-   aufgeführten Mirror erhältlich.
+   Eine vollständige Auflistung aller bisherigen Änderungen finden Sie in
+   der Datei CHANGES_1.3.
 
    Seit Apache 1.3.12 enthalten Binärdistributionen alle Apache-Standard-
    module als Shared Objects (sofern es von der Plattform unterstützt
    Allgemeinen nicht die Unix-Version.
 
    Der Apache 2.0 wurde durch die Einführung der Apache Portability Library
-   und MPM-Module von Anfang an für mehrere Betriebssysteme konstruiert.
+   und der MPM-Module von Anfang an für mehrere Betriebssysteme konstruiert.
    Nutzer von nicht-Unix-Plattformen sind dringend angehalten, aufgrund der
    besseren Performance, Stabilität und Sicherheit auf den Apache 2.0 zu
    wechseln.
 
                Wesentliche Änderungen des Apache 1.3.29
 
+   Sicherheitslücken
+
+      o CAN-2003-0542 (cve.mitre.org)
+        Behebung von Pufferüberläufen in mod_alias und mod_rewrite, welche
+        auftraten, falls reguläre Ausdrücke mit mehr als 9 speichernden
+        Klammernpaaren angewendet wurden.
+
    Neue Features
 
-   Neue Features, die sich auf bestimmte Plattformen beziehen:
+    Neue Features, die sich auf bestimmte Plattformen beziehen:
 
-     * Die ident-Funktionalität gemäß RFC1413 ist nun sowohl für
-       Windows- wie auch für NetWare-Plattformen verfügbar. Dies 
-       beinhaltet auch eine alternative Thread-sichere Implementation der
-       Socket-Timeout-Funktionalität bei der Abfrage des identd-Daemons.
+      * Die ident-Funktionalität gemäß RFC1413 ist nun sowohl für
+        Windows- wie auch für NetWare-Plattformen verfügbar. Dies 
+        beinhaltet auch eine alternative Thread-sichere Implementation der
+        Socket-Timeout-Funktionalität bei der Abfrage des identd-Daemons.
 
    Behobene Fehler
 
-   Die folgenden nennenswerten Fehler wurden im Apache 1.3.28 (oder
-   früher) gefunden und im Apache 1.3.29 behoben:
+    Die folgenden nennenswerten Fehler wurden im Apache 1.3.28 (oder
+    früher) gefunden und im Apache 1.3.29 behoben:
 
-     * Innerhalb von ap_bclose() wird nun durchweg ap_pclosesocket() für
-       Sockets und sp_pclosef() für Dateien aufgerufen. Ebenso wird nun 
-       einheitlich closesocket() zum Schließen der (Dateideskriptoren von) 
-       Sockets verwendet. Das vorherige Durcheinander von Dateideskriptoren
-       für Sockets und Dateien würde bei einigen Applikationen Probleme 
-       verursachen, jetzt wo wir vorsorglich Dateideskriptoren schließen, 
-       um Lecks zu vermeiden. PR 22805
-     * Korrektur von mod_usertrack, um keine fälschlich zutreffenden
-       Übereinstimmungen mit dem Namen des user-tracking-Cookies zu
-       erhalten. PR 16661.
+      * Innerhalb von ap_bclose() wird nun durchweg ap_pclosesocket() für
+        Sockets und sp_pclosef() für Dateien aufgerufen. Ebenso wird nun 
+        einheitlich closesocket() zum Schließen der (Dateideskriptoren von) 
+        Sockets verwendet. Das vorherige Durcheinander von Dateideskriptoren
+        für Sockets und Dateien würde bei einigen Applikationen Probleme 
+        verursachen, jetzt wo wir vorsorglich Dateideskriptoren schließen, 
+        um Lecks zu vermeiden. PR 22805.
 
-     * Die Bildung von Subprozess-Zombies bei der Verwendung von CGI-Wrappern
-       wie suExec und cgiwrap wird verhindert. PR 21737. [Numerous]
+      * Korrektur von mod_usertrack, um keine fälschlich zutreffenden
+        Übereinstimmungen mit dem Namen des user-tracking-Cookies zu
+        erhalten. PR 16661.
 
+      * Die Bildung von Subprozess-Zombies bei der Verwendung von CGI-Wrappern
+        wie suEXEC und cgiwrap wird verhindert. PR 21737.
diff --git a/STATUS b/STATUS
index 7e936d193ba8f1ec99863413d9aa647b1406d987..a091923889681a62b4d01ef4d428a0215c70b1e7 100644 (file)
--- a/STATUS
+++ b/STATUS
@@ -1,9 +1,9 @@
 APACHE 1.3 STATUS:                                             -*-text-*-
-  Last modified at [$Date: 2003/10/20 19:52:50 $]
+  Last modified at [$Date: 2003/10/24 16:11:40 $]
 
 Release:
 
-   1.3.29-dev: In development. Jim proposes a release RSN.
+   1.3.29: Tagged October 24, 2003.
    1.3.28: Tagged July 16, 2003.
    1.3.27: Tagged September 30, 2002. Announced Oct 3, 2002.
    1.3.26: Tagged June 18, 2002.
index bb033c41037b0128bf67240a3094e8a1313f47fc..f7e44fb99e7a77d2c4f951bef03f178a8a1bcc3c 100644 (file)
@@ -1,5 +1,10 @@
 Changes with Apache 1.3.29
 
+  *) SECURITY: CAN-2003-0542 (cve.mitre.org)
+     Fix buffer overflows in mod_alias and mod_rewrite which occurred if
+     one configured a regular expression with more than 9 captures.
+     [André Malo]
+
   *) Within ap_bclose(), ap_pclosesocket() is now called consistently
      for sockets and ap_pclosef() for files. Also, closesocket()
      is used consistenly to close socket fd's. The previous
index fe5c2b36df8949a3581983094067084c144eb62b..289dba27f7df0f33dc973ac93c7b8757397ec3f9 100644 (file)
@@ -274,6 +274,9 @@ extern "C" {
 /* The size of the server's internal read-write buffers */
 #define IOBUFSIZE 8192
 
+/* The max number of regex captures that can be expanded by ap_pregsub */
+#define AP_MAX_REG_MATCH 10
+
 /* Number of servers to spawn off by default --- also, if fewer than
  * this free when the caretaker checks, it will spawn more.
  */
@@ -428,7 +431,7 @@ extern "C" {
 
 #define SERVER_BASEVENDOR   "Apache Group"
 #define SERVER_BASEPRODUCT  "Apache"
-#define SERVER_BASEREVISION "1.3.29-dev"
+#define SERVER_BASEREVISION "1.3.29"
 #define SERVER_BASEVERSION  SERVER_BASEPRODUCT "/" SERVER_BASEREVISION
 
 #define SERVER_PRODUCT  SERVER_BASEPRODUCT
@@ -449,7 +452,7 @@ API_EXPORT(const char *) ap_get_server_built(void);
  * Always increases along the same track as the source branch.
  * For example, Apache 1.4.2 would be '10402100', 2.5b7 would be '20500007'.
  */
-#define APACHE_RELEASE 10329000
+#define APACHE_RELEASE 10329100
 
 #define SERVER_PROTOCOL "HTTP/1.1"
 #ifndef SERVER_SUPPORT
index 78e7b17fb3ef8cad2cbfac0643def8cc40eabb65..05ef6a8df54dde4769f275946617c9c60e8b61d7 100644 (file)
@@ -299,7 +299,7 @@ static int alias_matches(const char *uri, const char *alias_fakename)
 static char *try_alias_list(request_rec *r, array_header *aliases, int doesc, int *status)
 {
     alias_entry *entries = (alias_entry *) aliases->elts;
-    regmatch_t regm[10];
+    regmatch_t regm[AP_MAX_REG_MATCH];
     char *found = NULL;
     int i;
 
@@ -308,10 +308,10 @@ static char *try_alias_list(request_rec *r, array_header *aliases, int doesc, in
        int l;
 
        if (p->regexp) {
-           if (!ap_regexec(p->regexp, r->uri, p->regexp->re_nsub + 1, regm, 0)) {
+           if (!ap_regexec(p->regexp, r->uri, AP_MAX_REG_MATCH, regm, 0)) {
                if (p->real) {
                    found = ap_pregsub(r->pool, p->real, r->uri,
-                                   p->regexp->re_nsub + 1, regm);
+                                       AP_MAX_REG_MATCH, regm);
                    if (found && doesc) {
                        found = ap_escape_uri(r->pool, found);
                    }
index 9726d46852ea451b008a889ad5c8fad4da8f4195..25a2fb3126f09a5cb0d927047837e27f34f8a691 100644 (file)
@@ -1834,7 +1834,7 @@ static int apply_rewrite_rule(request_rec *r, rewriterule_entry *p,
     const char *vary;
     char newuri[MAX_STRING_LEN];
     regex_t *regexp;
-    regmatch_t regmatch[MAX_NMATCH];
+    regmatch_t regmatch[AP_MAX_REG_MATCH];
     backrefinfo *briRR = NULL;
     backrefinfo *briRC = NULL;
     int prefixstrip;
@@ -1891,7 +1891,7 @@ static int apply_rewrite_rule(request_rec *r, rewriterule_entry *p,
         rewritelog(r, 3, "[per-dir %s] applying pattern '%s' to uri '%s'",
                    perdir, p->pattern, uri);
     }
-    rc = (ap_regexec(regexp, uri, regexp->re_nsub+1, regmatch, 0) == 0);
+    rc = (ap_regexec(regexp, uri, AP_MAX_REG_MATCH, regmatch, 0) == 0);
     if (! (( rc && !(p->flags & RULEFLAG_NOTMATCH)) ||
            (!rc &&  (p->flags & RULEFLAG_NOTMATCH))   ) ) {
         return 0;
@@ -2179,7 +2179,7 @@ static int apply_rewrite_cond(request_rec *r, rewritecond_entry *p,
     char input[MAX_STRING_LEN];
     struct stat sb;
     request_rec *rsub;
-    regmatch_t regmatch[MAX_NMATCH];
+    regmatch_t regmatch[AP_MAX_REG_MATCH];
     int rc;
 
     /*
@@ -2283,8 +2283,7 @@ static int apply_rewrite_cond(request_rec *r, rewritecond_entry *p,
     }
     else {
         /* it is really a regexp pattern, so apply it */
-        rc = (ap_regexec(p->regexp, input,
-                         p->regexp->re_nsub+1, regmatch,0) == 0);
+        rc = (ap_regexec(p->regexp, input, AP_MAX_REG_MATCH, regmatch,0) == 0);
 
         /* if it isn't a negated pattern and really matched
            we update the passed-through regex subst info structure */
@@ -2442,7 +2441,7 @@ static void do_expand(request_rec *r, char *input, char *buffer, int nbuf,
                bri = briRC;
            }
            /* see ap_pregsub() in src/main/util.c */
-            if (bri && n <= bri->nsub &&
+            if (bri && n < AP_MAX_REG_MATCH &&
                bri->regmatch[n].rm_eo > bri->regmatch[n].rm_so) {
                span = bri->regmatch[n].rm_eo - bri->regmatch[n].rm_so;
                if (span > space) {
index 93729677a374d231c58fcbc12b8267db3875fe48..8f2fd709b8521369d1b64aa9f72576c0e8781f3f 100644 (file)
 
 #define MAX_ENV_FLAGS 15
 
-#define MAX_NMATCH    10
-
 /* default maximum number of internal redirects */
 #define REWRITE_REDIRECT_LIMIT 10
 
@@ -368,7 +366,7 @@ typedef struct cache {
 typedef struct backrefinfo {
     char *source;
     int nsub;
-    regmatch_t regmatch[10];
+    regmatch_t regmatch[AP_MAX_REG_MATCH];
 } backrefinfo;