You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by ji...@apache.org on 2003/10/24 18:11:41 UTC
cvs commit: apache-1.3/src/modules/standard mod_alias.c mod_rewrite.c mod_rewrite.h
jim 2003/10/24 09:11:41
Modified: . Announcement Announcement.de STATUS
src CHANGES
src/include httpd.h
src/modules/standard mod_alias.c mod_rewrite.c mod_rewrite.h
Log:
Bump up for 1.3.29. Fold in the CAN-2003-0542 regex patch.
Get ready to tag.
Revision Changes Path
1.95 +26 -22 apache-1.3/Announcement
Index: Announcement
===================================================================
RCS file: /home/cvs/apache-1.3/Announcement,v
retrieving revision 1.94
retrieving revision 1.95
diff -u -r1.94 -r1.95
--- Announcement 22 Oct 2003 19:35:54 -0000 1.94
+++ Announcement 24 Oct 2003 16:11:40 -0000 1.95
@@ -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
@@ -74,6 +73,11 @@
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
@@ -90,15 +94,15 @@
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.
1.2 +47 -44 apache-1.3/Announcement.de
Index: Announcement.de
===================================================================
RCS file: /home/cvs/apache-1.3/Announcement.de,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- Announcement.de 22 Oct 2003 22:01:43 -0000 1.1
+++ Announcement.de 24 Oct 2003 16:11:40 -0000 1.2
@@ -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.
+ 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-Update.
- Eine kurze Zusammenfassung der Bug-Fixes ist am Ende des Dokumentes
+ 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
@@ -74,39 +71,45 @@
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:
-
- * 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.
+ Die folgenden nennenswerten Fehler wurden im Apache 1.3.28 (oder
+ fr�her) gefunden und im Apache 1.3.29 behoben:
- * Die Bildung von Subprozess-Zombies bei der Verwendung von CGI-Wrappern
- wie suExec und cgiwrap wird verhindert. PR 21737. [Numerous]
+ * 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.
+ * Die Bildung von Subprozess-Zombies bei der Verwendung von CGI-Wrappern
+ wie suEXEC und cgiwrap wird verhindert. PR 21737.
1.1060 +2 -2 apache-1.3/STATUS
Index: STATUS
===================================================================
RCS file: /home/cvs/apache-1.3/STATUS,v
retrieving revision 1.1059
retrieving revision 1.1060
diff -u -r1.1059 -r1.1060
--- STATUS 20 Oct 2003 19:52:50 -0000 1.1059
+++ STATUS 24 Oct 2003 16:11:40 -0000 1.1060
@@ -3,7 +3,7 @@
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.
1.1909 +5 -0 apache-1.3/src/CHANGES
Index: CHANGES
===================================================================
RCS file: /home/cvs/apache-1.3/src/CHANGES,v
retrieving revision 1.1908
retrieving revision 1.1909
diff -u -r1.1908 -r1.1909
--- CHANGES 19 Oct 2003 18:00:34 -0000 1.1908
+++ CHANGES 24 Oct 2003 16:11:40 -0000 1.1909
@@ -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
1.372 +5 -2 apache-1.3/src/include/httpd.h
Index: httpd.h
===================================================================
RCS file: /home/cvs/apache-1.3/src/include/httpd.h,v
retrieving revision 1.371
retrieving revision 1.372
diff -u -r1.371 -r1.372
--- httpd.h 16 Jul 2003 20:27:08 -0000 1.371
+++ httpd.h 24 Oct 2003 16:11:40 -0000 1.372
@@ -274,6 +274,9 @@
/* 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 @@
#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 @@
* 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
1.53 +3 -3 apache-1.3/src/modules/standard/mod_alias.c
Index: mod_alias.c
===================================================================
RCS file: /home/cvs/apache-1.3/src/modules/standard/mod_alias.c,v
retrieving revision 1.52
retrieving revision 1.53
diff -u -r1.52 -r1.53
--- mod_alias.c 24 Apr 2003 16:08:21 -0000 1.52
+++ mod_alias.c 24 Oct 2003 16:11:41 -0000 1.53
@@ -299,7 +299,7 @@
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 @@
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);
}
1.188 +5 -6 apache-1.3/src/modules/standard/mod_rewrite.c
Index: mod_rewrite.c
===================================================================
RCS file: /home/cvs/apache-1.3/src/modules/standard/mod_rewrite.c,v
retrieving revision 1.187
retrieving revision 1.188
diff -u -r1.187 -r1.188
--- mod_rewrite.c 19 May 2003 02:35:31 -0000 1.187
+++ mod_rewrite.c 24 Oct 2003 16:11:41 -0000 1.188
@@ -1834,7 +1834,7 @@
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 @@
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 @@
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 @@
}
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 @@
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) {
1.87 +1 -3 apache-1.3/src/modules/standard/mod_rewrite.h
Index: mod_rewrite.h
===================================================================
RCS file: /home/cvs/apache-1.3/src/modules/standard/mod_rewrite.h,v
retrieving revision 1.86
retrieving revision 1.87
diff -u -r1.86 -r1.87
--- mod_rewrite.h 19 May 2003 02:35:31 -0000 1.86
+++ mod_rewrite.h 24 Oct 2003 16:11:41 -0000 1.87
@@ -253,8 +253,6 @@
#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 backrefinfo {
char *source;
int nsub;
- regmatch_t regmatch[10];
+ regmatch_t regmatch[AP_MAX_REG_MATCH];
} backrefinfo;