1 |
Author: hollow |
2 |
Date: 2009-07-29 08:08:30 +0000 (Wed, 29 Jul 2009) |
3 |
New Revision: 224 |
4 |
|
5 |
Added: |
6 |
trunk/dist/.gitignore |
7 |
Removed: |
8 |
trunk/dist/2.2/patches/04_all_mod_ssl_tls_sni.patch |
9 |
trunk/dist/2.2/patches/05_all_fix_graceful_multiple_listeners.patch |
10 |
trunk/dist/2.2/patches/06_all_CVE-2009-1191.patch |
11 |
trunk/dist/2.2/patches/07_all_CVE-2009-1195.patch |
12 |
trunk/dist/2.2/patches/08_all_CVE-2009-1890.patch |
13 |
trunk/dist/2.2/patches/09_all_CVE-2009-1891.patch |
14 |
trunk/dist/2.2/patches/10_all_r779472.patch |
15 |
trunk/dist/2.2/patches/11_all_r790738.patch |
16 |
Log: |
17 |
remove patches that have been backported to 2.2.12 |
18 |
|
19 |
Added: trunk/dist/.gitignore |
20 |
=================================================================== |
21 |
--- trunk/dist/.gitignore (rev 0) |
22 |
+++ trunk/dist/.gitignore 2009-07-29 08:08:30 UTC (rev 224) |
23 |
@@ -0,0 +1 @@ |
24 |
+gentoo-apache-*.tar.bz2 |
25 |
|
26 |
Deleted: trunk/dist/2.2/patches/04_all_mod_ssl_tls_sni.patch |
27 |
=================================================================== |
28 |
--- trunk/dist/2.2/patches/04_all_mod_ssl_tls_sni.patch 2009-07-24 18:35:44 UTC (rev 223) |
29 |
+++ trunk/dist/2.2/patches/04_all_mod_ssl_tls_sni.patch 2009-07-29 08:08:30 UTC (rev 224) |
30 |
@@ -1,380 +0,0 @@ |
31 |
-# httpd-2.2.x-sni.patch - server name indication support for Apache 2.2 |
32 |
-# (see RFC 4366, "Transport Layer Security (TLS) Extensions") |
33 |
- |
34 |
-# based on a patch from the EdelKey project |
35 |
-# (http://www.edelweb.fr/EdelKey/files/apache-2.2.0+0.9.9+servername.patch) |
36 |
- |
37 |
-# Needs openssl-SNAP-20060330 / OpenSSL 0.9.8f or later |
38 |
-# to work properly (ftp://ftp.openssl.org/snapshot/). The 0.9.8 versions |
39 |
-# must be configured explicitly for TLS extension support at compile time |
40 |
-# ("./config enable-tlsext"). |
41 |
- |
42 |
-Index: httpd-2.2.x/modules/ssl/ssl_private.h |
43 |
-=================================================================== |
44 |
---- httpd-2.2.x/modules/ssl/ssl_private.h (revision 663014) |
45 |
-+++ httpd-2.2.x/modules/ssl/ssl_private.h (working copy) |
46 |
-@@ -35,6 +35,7 @@ |
47 |
- #include "http_connection.h" |
48 |
- #include "http_request.h" |
49 |
- #include "http_protocol.h" |
50 |
-+#include "http_vhost.h" |
51 |
- #include "util_script.h" |
52 |
- #include "util_filter.h" |
53 |
- #include "util_ebcdic.h" |
54 |
-@@ -555,6 +556,9 @@ int ssl_callback_NewSessionCach |
55 |
- SSL_SESSION *ssl_callback_GetSessionCacheEntry(SSL *, unsigned char *, int, int *); |
56 |
- void ssl_callback_DelSessionCacheEntry(SSL_CTX *, SSL_SESSION *); |
57 |
- void ssl_callback_LogTracingState(MODSSL_INFO_CB_ARG_TYPE, int, int); |
58 |
-+#ifndef OPENSSL_NO_TLSEXT |
59 |
-+int ssl_callback_ServerNameIndication(SSL *, int *, modssl_ctx_t *); |
60 |
-+#endif |
61 |
- |
62 |
- /** Session Cache Support */ |
63 |
- void ssl_scache_init(server_rec *, apr_pool_t *); |
64 |
-Index: httpd-2.2.x/modules/ssl/ssl_engine_init.c |
65 |
-=================================================================== |
66 |
---- httpd-2.2.x/modules/ssl/ssl_engine_init.c (revision 663014) |
67 |
-+++ httpd-2.2.x/modules/ssl/ssl_engine_init.c (working copy) |
68 |
-@@ -355,6 +355,33 @@ static void ssl_init_server_check(server |
69 |
- } |
70 |
- } |
71 |
- |
72 |
-+#ifndef OPENSSL_NO_TLSEXT |
73 |
-+static void ssl_init_ctx_tls_extensions(server_rec *s, |
74 |
-+ apr_pool_t *p, |
75 |
-+ apr_pool_t *ptemp, |
76 |
-+ modssl_ctx_t *mctx) |
77 |
-+{ |
78 |
-+ /* |
79 |
-+ * Configure TLS extensions support |
80 |
-+ */ |
81 |
-+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, |
82 |
-+ "Configuring TLS extension handling"); |
83 |
-+ |
84 |
-+ /* |
85 |
-+ * Server name indication (SNI) |
86 |
-+ */ |
87 |
-+ if (!SSL_CTX_set_tlsext_servername_callback(mctx->ssl_ctx, |
88 |
-+ ssl_callback_ServerNameIndication) || |
89 |
-+ !SSL_CTX_set_tlsext_servername_arg(mctx->ssl_ctx, mctx)) { |
90 |
-+ ap_log_error(APLOG_MARK, APLOG_ERR, 0, s, |
91 |
-+ "Unable to initialize TLS servername extension " |
92 |
-+ "callback (incompatible OpenSSL version?)"); |
93 |
-+ ssl_log_ssl_error(APLOG_MARK, APLOG_ERR, s); |
94 |
-+ ssl_die(); |
95 |
-+ } |
96 |
-+} |
97 |
-+#endif |
98 |
-+ |
99 |
- static void ssl_init_ctx_protocol(server_rec *s, |
100 |
- apr_pool_t *p, |
101 |
- apr_pool_t *ptemp, |
102 |
-@@ -687,6 +714,9 @@ static void ssl_init_ctx(server_rec *s, |
103 |
- if (mctx->pks) { |
104 |
- /* XXX: proxy support? */ |
105 |
- ssl_init_ctx_cert_chain(s, p, ptemp, mctx); |
106 |
-+#ifndef OPENSSL_NO_TLSEXT |
107 |
-+ ssl_init_ctx_tls_extensions(s, p, ptemp, mctx); |
108 |
-+#endif |
109 |
- } |
110 |
- } |
111 |
- |
112 |
-@@ -1036,9 +1066,19 @@ void ssl_init_CheckServers(server_rec *b |
113 |
- klen = strlen(key); |
114 |
- |
115 |
- if ((ps = (server_rec *)apr_hash_get(table, key, klen))) { |
116 |
-- ap_log_error(APLOG_MARK, APLOG_WARNING, 0, |
117 |
-+ ap_log_error(APLOG_MARK, |
118 |
-+#ifdef OPENSSL_NO_TLSEXT |
119 |
-+ APLOG_WARNING, |
120 |
-+#else |
121 |
-+ APLOG_DEBUG, |
122 |
-+#endif |
123 |
-+ 0, |
124 |
- base_server, |
125 |
-+#ifdef OPENSSL_NO_TLSEXT |
126 |
- "Init: SSL server IP/port conflict: " |
127 |
-+#else |
128 |
-+ "Init: SSL server IP/port overlap: " |
129 |
-+#endif |
130 |
- "%s (%s:%d) vs. %s (%s:%d)", |
131 |
- ssl_util_vhostid(p, s), |
132 |
- (s->defn_name ? s->defn_name : "unknown"), |
133 |
-@@ -1055,8 +1095,14 @@ void ssl_init_CheckServers(server_rec *b |
134 |
- |
135 |
- if (conflict) { |
136 |
- ap_log_error(APLOG_MARK, APLOG_WARNING, 0, base_server, |
137 |
-+#ifdef OPENSSL_NO_TLSEXT |
138 |
- "Init: You should not use name-based " |
139 |
- "virtual hosts in conjunction with SSL!!"); |
140 |
-+#else |
141 |
-+ "Init: Name-based SSL virtual hosts only " |
142 |
-+ "work for clients with TLS server name indication " |
143 |
-+ "support (RFC 4366)"); |
144 |
-+#endif |
145 |
- } |
146 |
- } |
147 |
- |
148 |
-Index: httpd-2.2.x/modules/ssl/ssl_engine_vars.c |
149 |
-=================================================================== |
150 |
---- httpd-2.2.x/modules/ssl/ssl_engine_vars.c (revision 663014) |
151 |
-+++ httpd-2.2.x/modules/ssl/ssl_engine_vars.c (working copy) |
152 |
-@@ -320,6 +320,12 @@ static char *ssl_var_lookup_ssl(apr_pool |
153 |
- else if (ssl != NULL && strcEQ(var, "COMPRESS_METHOD")) { |
154 |
- result = ssl_var_lookup_ssl_compress_meth(ssl); |
155 |
- } |
156 |
-+#ifndef OPENSSL_NO_TLSEXT |
157 |
-+ else if (ssl != NULL && strcEQ(var, "TLS_SNI")) { |
158 |
-+ result = apr_pstrdup(p, SSL_get_servername(ssl, |
159 |
-+ TLSEXT_NAMETYPE_host_name)); |
160 |
-+ } |
161 |
-+#endif |
162 |
- return result; |
163 |
- } |
164 |
- |
165 |
-Index: httpd-2.2.x/modules/ssl/ssl_engine_kernel.c |
166 |
-=================================================================== |
167 |
---- httpd-2.2.x/modules/ssl/ssl_engine_kernel.c (revision 663014) |
168 |
-+++ httpd-2.2.x/modules/ssl/ssl_engine_kernel.c (working copy) |
169 |
-@@ -31,6 +31,9 @@ |
170 |
- #include "ssl_private.h" |
171 |
- |
172 |
- static void ssl_configure_env(request_rec *r, SSLConnRec *sslconn); |
173 |
-+#ifndef OPENSSL_NO_TLSEXT |
174 |
-+static int ssl_find_vhost(void *servername, conn_rec *c, server_rec *s); |
175 |
-+#endif |
176 |
- |
177 |
- /* |
178 |
- * Post Read Request Handler |
179 |
-@@ -39,6 +42,9 @@ int ssl_hook_ReadReq(request_rec *r) |
180 |
- { |
181 |
- SSLConnRec *sslconn = myConnConfig(r->connection); |
182 |
- SSL *ssl; |
183 |
-+#ifndef OPENSSL_NO_TLSEXT |
184 |
-+ const char *servername; |
185 |
-+#endif |
186 |
- |
187 |
- if (!sslconn) { |
188 |
- return DECLINED; |
189 |
-@@ -87,6 +93,14 @@ int ssl_hook_ReadReq(request_rec *r) |
190 |
- if (!ssl) { |
191 |
- return DECLINED; |
192 |
- } |
193 |
-+#ifndef OPENSSL_NO_TLSEXT |
194 |
-+ if (!r->hostname && |
195 |
-+ (servername = SSL_get_servername(ssl, TLSEXT_NAMETYPE_host_name))) { |
196 |
-+ /* Use the SNI extension as the hostname if no Host: header was sent */ |
197 |
-+ r->hostname = apr_pstrdup(r->pool, servername); |
198 |
-+ ap_update_vhost_from_headers(r); |
199 |
-+ } |
200 |
-+#endif |
201 |
- SSL_set_app_data2(ssl, r); |
202 |
- |
203 |
- /* |
204 |
-@@ -353,6 +367,11 @@ int ssl_hook_Access(request_rec *r) |
205 |
- * currently active/remembered verify depth (because this means more |
206 |
- * restriction on the certificate chain). |
207 |
- */ |
208 |
-+ if ((sc->server->auth.verify_depth != UNSET) && |
209 |
-+ (dc->nVerifyDepth == UNSET)) { |
210 |
-+ /* apply per-vhost setting, if per-directory config is not set */ |
211 |
-+ dc->nVerifyDepth = sc->server->auth.verify_depth; |
212 |
-+ } |
213 |
- if (dc->nVerifyDepth != UNSET) { |
214 |
- /* XXX: doesnt look like sslconn->verify_depth is actually used */ |
215 |
- if (!(n = sslconn->verify_depth)) { |
216 |
-@@ -382,6 +401,11 @@ int ssl_hook_Access(request_rec *r) |
217 |
- * verification but at least skip the I/O-intensive renegotation |
218 |
- * handshake. |
219 |
- */ |
220 |
-+ if ((sc->server->auth.verify_mode != SSL_CVERIFY_UNSET) && |
221 |
-+ (dc->nVerifyClient == SSL_CVERIFY_UNSET)) { |
222 |
-+ /* apply per-vhost setting, if per-directory config is not set */ |
223 |
-+ dc->nVerifyClient = sc->server->auth.verify_mode; |
224 |
-+ } |
225 |
- if (dc->nVerifyClient != SSL_CVERIFY_UNSET) { |
226 |
- /* remember old state */ |
227 |
- verify_old = SSL_get_verify_mode(ssl); |
228 |
-@@ -997,6 +1021,9 @@ int ssl_hook_Fixup(request_rec *r) |
229 |
- SSLDirConfigRec *dc = myDirConfig(r); |
230 |
- apr_table_t *env = r->subprocess_env; |
231 |
- char *var, *val = ""; |
232 |
-+#ifndef OPENSSL_NO_TLSEXT |
233 |
-+ const char *servername; |
234 |
-+#endif |
235 |
- STACK_OF(X509) *peer_certs; |
236 |
- SSL *ssl; |
237 |
- int i; |
238 |
-@@ -1018,6 +1045,13 @@ int ssl_hook_Fixup(request_rec *r) |
239 |
- /* the always present HTTPS (=HTTP over SSL) flag! */ |
240 |
- apr_table_setn(env, "HTTPS", "on"); |
241 |
- |
242 |
-+#ifndef OPENSSL_NO_TLSEXT |
243 |
-+ /* add content of SNI TLS extension (if supplied with ClientHello) */ |
244 |
-+ if ((servername = SSL_get_servername(ssl, TLSEXT_NAMETYPE_host_name))) { |
245 |
-+ apr_table_set(env, "SSL_TLS_SNI", servername); |
246 |
-+ } |
247 |
-+#endif |
248 |
-+ |
249 |
- /* standard SSL environment variables */ |
250 |
- if (dc->nOptions & SSL_OPT_STDENVVARS) { |
251 |
- for (i = 0; ssl_hook_Fixup_vars[i]; i++) { |
252 |
-@@ -1810,3 +1844,141 @@ void ssl_callback_LogTracingState(MODSSL |
253 |
- } |
254 |
- } |
255 |
- |
256 |
-+#ifndef OPENSSL_NO_TLSEXT |
257 |
-+/* |
258 |
-+ * This callback function is executed when OpenSSL encounters an extended |
259 |
-+ * client hello with a server name indication extension ("SNI", cf. RFC 4366). |
260 |
-+ */ |
261 |
-+int ssl_callback_ServerNameIndication(SSL *ssl, int *al, modssl_ctx_t *mctx) |
262 |
-+{ |
263 |
-+ const char *servername = |
264 |
-+ SSL_get_servername(ssl, TLSEXT_NAMETYPE_host_name); |
265 |
-+ |
266 |
-+ if (servername) { |
267 |
-+ conn_rec *c = (conn_rec *)SSL_get_app_data(ssl); |
268 |
-+ if (c) { |
269 |
-+ if (ap_vhost_iterate_given_conn(c, ssl_find_vhost, |
270 |
-+ (void *)servername)) { |
271 |
-+ ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, c, |
272 |
-+ "SSL virtual host for servername %s found", |
273 |
-+ servername); |
274 |
-+ return SSL_TLSEXT_ERR_OK; |
275 |
-+ } |
276 |
-+ else { |
277 |
-+ ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, c, |
278 |
-+ "No matching SSL virtual host for servername " |
279 |
-+ "%s found (using default/first virtual host)", |
280 |
-+ servername); |
281 |
-+ return SSL_TLSEXT_ERR_ALERT_WARNING; |
282 |
-+ } |
283 |
-+ } |
284 |
-+ } |
285 |
-+ |
286 |
-+ return SSL_TLSEXT_ERR_NOACK; |
287 |
-+} |
288 |
-+ |
289 |
-+/* |
290 |
-+ * Find a (name-based) SSL virtual host where either the ServerName |
291 |
-+ * or one of the ServerAliases matches the supplied name (to be used |
292 |
-+ * with ap_vhost_iterate_given_conn()) |
293 |
-+ */ |
294 |
-+static int ssl_find_vhost(void *servername, conn_rec *c, server_rec *s) |
295 |
-+{ |
296 |
-+ SSLSrvConfigRec *sc; |
297 |
-+ SSL *ssl; |
298 |
-+ BOOL found = FALSE; |
299 |
-+ apr_array_header_t *names; |
300 |
-+ int i; |
301 |
-+ |
302 |
-+ /* check ServerName */ |
303 |
-+ if (!strcasecmp(servername, s->server_hostname)) { |
304 |
-+ found = TRUE; |
305 |
-+ } |
306 |
-+ |
307 |
-+ /* |
308 |
-+ * if not matched yet, check ServerAlias entries |
309 |
-+ * (adapted from vhost.c:matches_aliases()) |
310 |
-+ */ |
311 |
-+ if (!found) { |
312 |
-+ names = s->names; |
313 |
-+ if (names) { |
314 |
-+ char **name = (char **)names->elts; |
315 |
-+ for (i = 0; i < names->nelts; ++i) { |
316 |
-+ if (!name[i]) |
317 |
-+ continue; |
318 |
-+ if (!strcasecmp(servername, name[i])) { |
319 |
-+ found = TRUE; |
320 |
-+ break; |
321 |
-+ } |
322 |
-+ } |
323 |
-+ } |
324 |
-+ } |
325 |
-+ |
326 |
-+ /* if still no match, check ServerAlias entries with wildcards */ |
327 |
-+ if (!found) { |
328 |
-+ names = s->wild_names; |
329 |
-+ if (names) { |
330 |
-+ char **name = (char **)names->elts; |
331 |
-+ for (i = 0; i < names->nelts; ++i) { |
332 |
-+ if (!name[i]) |
333 |
-+ continue; |
334 |
-+ if (!ap_strcasecmp_match(servername, name[i])) { |
335 |
-+ found = TRUE; |
336 |
-+ break; |
337 |
-+ } |
338 |
-+ } |
339 |
-+ } |
340 |
-+ } |
341 |
-+ |
342 |
-+ /* set SSL_CTX (if matched) */ |
343 |
-+ if (found && (ssl = ((SSLConnRec *)myConnConfig(c))->ssl) && |
344 |
-+ (sc = mySrvConfig(s))) { |
345 |
-+ SSL_set_SSL_CTX(ssl, sc->server->ssl_ctx); |
346 |
-+ /* |
347 |
-+ * SSL_set_SSL_CTX() only deals with the server cert, |
348 |
-+ * so we need to duplicate a few additional settings |
349 |
-+ * from the ctx by hand |
350 |
-+ */ |
351 |
-+ SSL_set_options(ssl, SSL_CTX_get_options(ssl->ctx)); |
352 |
-+ if ((SSL_get_verify_mode(ssl) == SSL_VERIFY_NONE) || |
353 |
-+ (SSL_num_renegotiations(ssl) == 0)) { |
354 |
-+ /* |
355 |
-+ * Only initialize the verification settings from the ctx |
356 |
-+ * if they are not yet set, or if we're called when a new |
357 |
-+ * SSL connection is set up (num_renegotiations == 0). |
358 |
-+ * Otherwise, we would possibly reset a per-directory |
359 |
-+ * configuration which was put into effect by ssl_hook_Access. |
360 |
-+ */ |
361 |
-+ SSL_set_verify(ssl, SSL_CTX_get_verify_mode(ssl->ctx), |
362 |
-+ SSL_CTX_get_verify_callback(ssl->ctx)); |
363 |
-+ } |
364 |
-+ |
365 |
-+ /* |
366 |
-+ * We also need to make sure that the correct mctx |
367 |
-+ * (accessed through the c->base_server->module_config vector) |
368 |
-+ * is assigned to the connection - the CRL callback e.g. |
369 |
-+ * makes use of it for retrieving its store (mctx->crl). |
370 |
-+ * Since logging in callbacks uses c->base_server in many |
371 |
-+ * cases, it also ensures that these messages are routed |
372 |
-+ * to the proper log. |
373 |
-+ */ |
374 |
-+ c->base_server = s; |
375 |
-+ |
376 |
-+ /* |
377 |
-+ * There is one special filter callback, which is set |
378 |
-+ * very early depending on the base_server's log level. |
379 |
-+ * If this is not the first vhost we're now selecting |
380 |
-+ * (and the first vhost doesn't use APLOG_DEBUG), then |
381 |
-+ * we need to set that callback here. |
382 |
-+ */ |
383 |
-+ if (c->base_server->loglevel >= APLOG_DEBUG) { |
384 |
-+ BIO_set_callback(SSL_get_rbio(ssl), ssl_io_data_cb); |
385 |
-+ BIO_set_callback_arg(SSL_get_rbio(ssl), (void *)ssl); |
386 |
-+ } |
387 |
-+ |
388 |
-+ return 1; |
389 |
-+ } |
390 |
-+ |
391 |
-+ return 0; |
392 |
-+} |
393 |
-+#endif |
394 |
-Index: httpd-2.2.x/modules/ssl/ssl_toolkit_compat.h |
395 |
-=================================================================== |
396 |
---- httpd-2.2.x/modules/ssl/ssl_toolkit_compat.h (revision 663014) |
397 |
-+++ httpd-2.2.x/modules/ssl/ssl_toolkit_compat.h (working copy) |
398 |
-@@ -264,6 +264,12 @@ typedef void (*modssl_popfree_fn)(char * |
399 |
- #define SSL_SESS_CACHE_NO_INTERNAL SSL_SESS_CACHE_NO_INTERNAL_LOOKUP |
400 |
- #endif |
401 |
- |
402 |
-+#ifndef OPENSSL_NO_TLSEXT |
403 |
-+#ifndef SSL_CTRL_SET_TLSEXT_HOSTNAME |
404 |
-+#define OPENSSL_NO_TLSEXT |
405 |
-+#endif |
406 |
-+#endif |
407 |
-+ |
408 |
- #endif /* SSL_TOOLKIT_COMPAT_H */ |
409 |
- |
410 |
- /** @} */ |
411 |
|
412 |
Deleted: trunk/dist/2.2/patches/05_all_fix_graceful_multiple_listeners.patch |
413 |
=================================================================== |
414 |
--- trunk/dist/2.2/patches/05_all_fix_graceful_multiple_listeners.patch 2009-07-24 18:35:44 UTC (rev 223) |
415 |
+++ trunk/dist/2.2/patches/05_all_fix_graceful_multiple_listeners.patch 2009-07-29 08:08:30 UTC (rev 224) |
416 |
@@ -1,42 +0,0 @@ |
417 |
---- httpd/httpd/branches/2.2.x/server/mpm/prefork/prefork.c 2009/01/31 20:53:11 739607 |
418 |
-+++ httpd/httpd/branches/2.2.x/server/mpm/prefork/prefork.c 2009/01/31 20:54:55 739608 |
419 |
-@@ -577,19 +577,27 @@ |
420 |
- apr_int32_t numdesc; |
421 |
- const apr_pollfd_t *pdesc; |
422 |
- |
423 |
-- /* timeout == -1 == wait forever */ |
424 |
-- status = apr_pollset_poll(pollset, -1, &numdesc, &pdesc); |
425 |
-+ /* check for termination first so we don't sleep for a while in |
426 |
-+ * poll if already signalled |
427 |
-+ */ |
428 |
-+ if (one_process && shutdown_pending) { |
429 |
-+ SAFE_ACCEPT(accept_mutex_off()); |
430 |
-+ return; |
431 |
-+ } |
432 |
-+ else if (die_now) { |
433 |
-+ /* In graceful stop/restart; drop the mutex |
434 |
-+ * and terminate the child. */ |
435 |
-+ SAFE_ACCEPT(accept_mutex_off()); |
436 |
-+ clean_child_exit(0); |
437 |
-+ } |
438 |
-+ /* timeout == 10 seconds to avoid a hang at graceful restart/stop |
439 |
-+ * caused by the closing of sockets by the signal handler |
440 |
-+ */ |
441 |
-+ status = apr_pollset_poll(pollset, apr_time_from_sec(10), |
442 |
-+ &numdesc, &pdesc); |
443 |
- if (status != APR_SUCCESS) { |
444 |
-- if (APR_STATUS_IS_EINTR(status)) { |
445 |
-- if (one_process && shutdown_pending) { |
446 |
-- return; |
447 |
-- } |
448 |
-- else if (die_now) { |
449 |
-- /* In graceful stop/restart; drop the mutex |
450 |
-- * and terminate the child. */ |
451 |
-- SAFE_ACCEPT(accept_mutex_off()); |
452 |
-- clean_child_exit(0); |
453 |
-- } |
454 |
-+ if (APR_STATUS_IS_TIMEUP(status) || |
455 |
-+ APR_STATUS_IS_EINTR(status)) { |
456 |
- continue; |
457 |
- } |
458 |
- /* Single Unix documents select as returning errnos |
459 |
|
460 |
Deleted: trunk/dist/2.2/patches/06_all_CVE-2009-1191.patch |
461 |
=================================================================== |
462 |
--- trunk/dist/2.2/patches/06_all_CVE-2009-1191.patch 2009-07-24 18:35:44 UTC (rev 223) |
463 |
+++ trunk/dist/2.2/patches/06_all_CVE-2009-1191.patch 2009-07-29 08:08:30 UTC (rev 224) |
464 |
@@ -1,37 +0,0 @@ |
465 |
-Index: modules/proxy/mod_proxy_ajp.c |
466 |
-=================================================================== |
467 |
---- modules/proxy/mod_proxy_ajp.c (Revision 763379) |
468 |
-+++ modules/proxy/mod_proxy_ajp.c (Arbeitskopie) |
469 |
-@@ -307,21 +307,17 @@ |
470 |
- "proxy: read zero bytes, expecting" |
471 |
- " %" APR_OFF_T_FMT " bytes", |
472 |
- content_length); |
473 |
-- status = ajp_send_data_msg(conn->sock, msg, 0); |
474 |
-- if (status != APR_SUCCESS) { |
475 |
-- /* We had a failure: Close connection to backend */ |
476 |
-- conn->close++; |
477 |
-- ap_log_error(APLOG_MARK, APLOG_ERR, status, r->server, |
478 |
-- "proxy: send failed to %pI (%s)", |
479 |
-- conn->worker->cp->addr, |
480 |
-- conn->worker->hostname); |
481 |
-- return HTTP_INTERNAL_SERVER_ERROR; |
482 |
-- } |
483 |
-- else { |
484 |
-- /* Client send zero bytes with C-L > 0 |
485 |
-- */ |
486 |
-- return HTTP_BAD_REQUEST; |
487 |
-- } |
488 |
-+ /* |
489 |
-+ * We can only get here if the client closed the connection |
490 |
-+ * to us without sending the body. |
491 |
-+ * Now the connection is in the wrong state on the backend. |
492 |
-+ * Sending an empty data msg doesn't help either as it does |
493 |
-+ * not move this connection to the correct state on the backend |
494 |
-+ * for later resusage by the next request again. |
495 |
-+ * Close it to clean things up. |
496 |
-+ */ |
497 |
-+ conn->close++; |
498 |
-+ return HTTP_BAD_REQUEST; |
499 |
- } |
500 |
- } |
501 |
- |
502 |
|
503 |
Deleted: trunk/dist/2.2/patches/07_all_CVE-2009-1195.patch |
504 |
=================================================================== |
505 |
--- trunk/dist/2.2/patches/07_all_CVE-2009-1195.patch 2009-07-24 18:35:44 UTC (rev 223) |
506 |
+++ trunk/dist/2.2/patches/07_all_CVE-2009-1195.patch 2009-07-29 08:08:30 UTC (rev 224) |
507 |
@@ -1,136 +0,0 @@ |
508 |
-Index: server/config.c |
509 |
-=================================================================== |
510 |
---- server/config.c (revision 773036) |
511 |
-+++ server/config.c (working copy) |
512 |
-@@ -1510,7 +1510,7 @@ |
513 |
- parms.temp_pool = ptemp; |
514 |
- parms.server = s; |
515 |
- parms.override = (RSRC_CONF | OR_ALL) & ~(OR_AUTHCFG | OR_LIMIT); |
516 |
-- parms.override_opts = OPT_ALL | OPT_INCNOEXEC | OPT_SYM_OWNER | OPT_MULTI; |
517 |
-+ parms.override_opts = OPT_ALL | OPT_SYM_OWNER | OPT_MULTI; |
518 |
- |
519 |
- parms.config_file = ap_pcfg_open_custom(p, "-c/-C directives", |
520 |
- &arr_parms, NULL, |
521 |
-@@ -1617,7 +1617,7 @@ |
522 |
- parms.temp_pool = ptemp; |
523 |
- parms.server = s; |
524 |
- parms.override = (RSRC_CONF | OR_ALL) & ~(OR_AUTHCFG | OR_LIMIT); |
525 |
-- parms.override_opts = OPT_ALL | OPT_INCNOEXEC | OPT_SYM_OWNER | OPT_MULTI; |
526 |
-+ parms.override_opts = OPT_ALL | OPT_SYM_OWNER | OPT_MULTI; |
527 |
- |
528 |
- rv = ap_pcfg_openfile(&cfp, p, fname); |
529 |
- if (rv != APR_SUCCESS) { |
530 |
-@@ -1755,7 +1755,7 @@ |
531 |
- parms.temp_pool = ptemp; |
532 |
- parms.server = s; |
533 |
- parms.override = (RSRC_CONF | OR_ALL) & ~(OR_AUTHCFG | OR_LIMIT); |
534 |
-- parms.override_opts = OPT_ALL | OPT_INCNOEXEC | OPT_SYM_OWNER | OPT_MULTI; |
535 |
-+ parms.override_opts = OPT_ALL | OPT_SYM_OWNER | OPT_MULTI; |
536 |
- parms.limited = -1; |
537 |
- |
538 |
- errmsg = ap_walk_config(conftree, &parms, s->lookup_defaults); |
539 |
-Index: server/core.c |
540 |
-=================================================================== |
541 |
---- server/core.c (revision 773036) |
542 |
-+++ server/core.c (working copy) |
543 |
-@@ -108,8 +108,7 @@ |
544 |
- conf->opts = dir ? OPT_UNSET : OPT_UNSET|OPT_ALL; |
545 |
- conf->opts_add = conf->opts_remove = OPT_NONE; |
546 |
- conf->override = dir ? OR_UNSET : OR_UNSET|OR_ALL; |
547 |
-- conf->override_opts = OPT_UNSET | OPT_ALL | OPT_INCNOEXEC | OPT_SYM_OWNER |
548 |
-- | OPT_MULTI; |
549 |
-+ conf->override_opts = OPT_UNSET | OPT_ALL | OPT_SYM_OWNER | OPT_MULTI; |
550 |
- |
551 |
- conf->content_md5 = 2; |
552 |
- conf->accept_path_info = 3; |
553 |
-@@ -242,8 +241,15 @@ |
554 |
- conf->opts_remove = (conf->opts_remove & ~new->opts_add) |
555 |
- | new->opts_remove; |
556 |
- conf->opts = (conf->opts & ~conf->opts_remove) | conf->opts_add; |
557 |
-- if ((base->opts & OPT_INCNOEXEC) && (new->opts & OPT_INCLUDES)) { |
558 |
-- conf->opts = (conf->opts & ~OPT_INCNOEXEC) | OPT_INCLUDES; |
559 |
-+ |
560 |
-+ /* If Includes was enabled with exec in the base config, but |
561 |
-+ * was enabled without exec in the new config, then disable |
562 |
-+ * exec in the merged set. */ |
563 |
-+ if (((base->opts & (OPT_INCLUDES|OPT_INC_WITH_EXEC)) |
564 |
-+ == (OPT_INCLUDES|OPT_INC_WITH_EXEC)) |
565 |
-+ && ((new->opts & (OPT_INCLUDES|OPT_INC_WITH_EXEC)) |
566 |
-+ == OPT_INCLUDES)) { |
567 |
-+ conf->opts &= ~OPT_INC_WITH_EXEC; |
568 |
- } |
569 |
- } |
570 |
- else { |
571 |
-@@ -1304,10 +1310,12 @@ |
572 |
- opt = OPT_INDEXES; |
573 |
- } |
574 |
- else if (!strcasecmp(w, "Includes")) { |
575 |
-- opt = OPT_INCLUDES; |
576 |
-+ /* If Includes is permitted, both Includes and |
577 |
-+ * IncludesNOEXEC may be changed. */ |
578 |
-+ opt = (OPT_INCLUDES | OPT_INC_WITH_EXEC); |
579 |
- } |
580 |
- else if (!strcasecmp(w, "IncludesNOEXEC")) { |
581 |
-- opt = (OPT_INCLUDES | OPT_INCNOEXEC); |
582 |
-+ opt = OPT_INCLUDES; |
583 |
- } |
584 |
- else if (!strcasecmp(w, "FollowSymLinks")) { |
585 |
- opt = OPT_SYM_LINKS; |
586 |
-@@ -1428,10 +1436,10 @@ |
587 |
- opt = OPT_INDEXES; |
588 |
- } |
589 |
- else if (!strcasecmp(w, "Includes")) { |
590 |
-- opt = OPT_INCLUDES; |
591 |
-+ opt = (OPT_INCLUDES | OPT_INC_WITH_EXEC); |
592 |
- } |
593 |
- else if (!strcasecmp(w, "IncludesNOEXEC")) { |
594 |
-- opt = (OPT_INCLUDES | OPT_INCNOEXEC); |
595 |
-+ opt = OPT_INCLUDES; |
596 |
- } |
597 |
- else if (!strcasecmp(w, "FollowSymLinks")) { |
598 |
- opt = OPT_SYM_LINKS; |
599 |
-Index: modules/filters/mod_include.c |
600 |
-=================================================================== |
601 |
---- modules/filters/mod_include.c (revision 773036) |
602 |
-+++ modules/filters/mod_include.c (working copy) |
603 |
-@@ -3574,7 +3574,7 @@ |
604 |
- intern->seen_eos = 0; |
605 |
- intern->state = PARSE_PRE_HEAD; |
606 |
- ctx->flags = (SSI_FLAG_PRINTING | SSI_FLAG_COND_TRUE); |
607 |
-- if (ap_allow_options(r) & OPT_INCNOEXEC) { |
608 |
-+ if ((ap_allow_options(r) & OPT_INC_WITH_EXEC) == 0) { |
609 |
- ctx->flags |= SSI_FLAG_NO_EXEC; |
610 |
- } |
611 |
- intern->accessenable = conf->accessenable; |
612 |
-Index: include/http_core.h |
613 |
-=================================================================== |
614 |
---- include/http_core.h (revision 773036) |
615 |
-+++ include/http_core.h (working copy) |
616 |
-@@ -65,7 +65,7 @@ |
617 |
- #define OPT_NONE 0 |
618 |
- /** Indexes directive */ |
619 |
- #define OPT_INDEXES 1 |
620 |
--/** Includes directive */ |
621 |
-+/** SSI is enabled without exec= permission */ |
622 |
- #define OPT_INCLUDES 2 |
623 |
- /** FollowSymLinks directive */ |
624 |
- #define OPT_SYM_LINKS 4 |
625 |
-@@ -73,14 +73,14 @@ |
626 |
- #define OPT_EXECCGI 8 |
627 |
- /** directive unset */ |
628 |
- #define OPT_UNSET 16 |
629 |
--/** IncludesNOEXEC directive */ |
630 |
--#define OPT_INCNOEXEC 32 |
631 |
-+/** SSI exec= permission is permitted, iff OPT_INCLUDES is also set */ |
632 |
-+#define OPT_INC_WITH_EXEC 32 |
633 |
- /** SymLinksIfOwnerMatch directive */ |
634 |
- #define OPT_SYM_OWNER 64 |
635 |
- /** MultiViews directive */ |
636 |
- #define OPT_MULTI 128 |
637 |
- /** All directives */ |
638 |
--#define OPT_ALL (OPT_INDEXES|OPT_INCLUDES|OPT_SYM_LINKS|OPT_EXECCGI) |
639 |
-+#define OPT_ALL (OPT_INDEXES|OPT_INCLUDES|OPT_INC_WITH_EXEC|OPT_SYM_LINKS|OPT_EXECCGI) |
640 |
- /** @} */ |
641 |
- |
642 |
- /** |
643 |
- |
644 |
|
645 |
Deleted: trunk/dist/2.2/patches/08_all_CVE-2009-1890.patch |
646 |
=================================================================== |
647 |
--- trunk/dist/2.2/patches/08_all_CVE-2009-1890.patch 2009-07-24 18:35:44 UTC (rev 223) |
648 |
+++ trunk/dist/2.2/patches/08_all_CVE-2009-1890.patch 2009-07-29 08:08:30 UTC (rev 224) |
649 |
@@ -1,38 +0,0 @@ |
650 |
---- httpd/httpd/trunk/modules/proxy/mod_proxy_http.c 2009/07/02 13:37:39 790586 |
651 |
-+++ httpd/httpd/trunk/modules/proxy/mod_proxy_http.c 2009/07/02 13:41:18 790587 |
652 |
-@@ -427,10 +427,16 @@ |
653 |
- apr_off_t bytes_streamed = 0; |
654 |
- |
655 |
- if (old_cl_val) { |
656 |
-+ char *endstr; |
657 |
-+ |
658 |
- add_cl(p, bucket_alloc, header_brigade, old_cl_val); |
659 |
-- if (APR_SUCCESS != (status = apr_strtoff(&cl_val, old_cl_val, NULL, |
660 |
-- 0))) { |
661 |
-- return HTTP_INTERNAL_SERVER_ERROR; |
662 |
-+ status = apr_strtoff(&cl_val, old_cl_val, &endstr, 10); |
663 |
-+ |
664 |
-+ if (status || *endstr || endstr == old_cl_val || cl_val < 0) { |
665 |
-+ ap_log_rerror(APLOG_MARK, APLOG_ERR, status, r, |
666 |
-+ "proxy: could not parse request Content-Length (%s)", |
667 |
-+ old_cl_val); |
668 |
-+ return HTTP_BAD_REQUEST; |
669 |
- } |
670 |
- } |
671 |
- terminate_headers(bucket_alloc, header_brigade); |
672 |
-@@ -463,8 +469,13 @@ |
673 |
- * |
674 |
- * Prevents HTTP Response Splitting. |
675 |
- */ |
676 |
-- if (bytes_streamed > cl_val) |
677 |
-- continue; |
678 |
-+ if (bytes_streamed > cl_val) { |
679 |
-+ ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, |
680 |
-+ "proxy: read more bytes of request body than expected " |
681 |
-+ "(got %" APR_OFF_T_FMT ", expected %" APR_OFF_T_FMT ")", |
682 |
-+ bytes_streamed, cl_val); |
683 |
-+ return HTTP_INTERNAL_SERVER_ERROR; |
684 |
-+ } |
685 |
- |
686 |
- if (header_brigade) { |
687 |
- /* we never sent the header brigade, so go ahead and |
688 |
|
689 |
Deleted: trunk/dist/2.2/patches/09_all_CVE-2009-1891.patch |
690 |
=================================================================== |
691 |
--- trunk/dist/2.2/patches/09_all_CVE-2009-1891.patch 2009-07-24 18:35:44 UTC (rev 223) |
692 |
+++ trunk/dist/2.2/patches/09_all_CVE-2009-1891.patch 2009-07-29 08:08:30 UTC (rev 224) |
693 |
@@ -1,29 +0,0 @@ |
694 |
---- httpd/httpd/branches/2.2.x/server/core_filters.c 2009/07/06 12:01:05 791453 |
695 |
-+++ httpd/httpd/branches/2.2.x/server/core_filters.c 2009/07/06 12:03:20 791454 |
696 |
-@@ -542,6 +542,12 @@ |
697 |
- apr_read_type_e eblock = APR_NONBLOCK_READ; |
698 |
- apr_pool_t *input_pool = b->p; |
699 |
- |
700 |
-+ /* Fail quickly if the connection has already been aborted. */ |
701 |
-+ if (c->aborted) { |
702 |
-+ apr_brigade_cleanup(b); |
703 |
-+ return APR_ECONNABORTED; |
704 |
-+ } |
705 |
-+ |
706 |
- if (ctx == NULL) { |
707 |
- ctx = apr_pcalloc(c->pool, sizeof(*ctx)); |
708 |
- net->out_ctx = ctx; |
709 |
-@@ -909,12 +915,9 @@ |
710 |
- /* No need to check for SUCCESS, we did that above. */ |
711 |
- if (!APR_STATUS_IS_EAGAIN(rv)) { |
712 |
- c->aborted = 1; |
713 |
-+ return APR_ECONNABORTED; |
714 |
- } |
715 |
- |
716 |
-- /* The client has aborted, but the request was successful. We |
717 |
-- * will report success, and leave it to the access and error |
718 |
-- * logs to note that the connection was aborted. |
719 |
-- */ |
720 |
- return APR_SUCCESS; |
721 |
- } |
722 |
- |
723 |
|
724 |
Deleted: trunk/dist/2.2/patches/10_all_r779472.patch |
725 |
=================================================================== |
726 |
--- trunk/dist/2.2/patches/10_all_r779472.patch 2009-07-24 18:35:44 UTC (rev 223) |
727 |
+++ trunk/dist/2.2/patches/10_all_r779472.patch 2009-07-29 08:08:30 UTC (rev 224) |
728 |
@@ -1,67 +0,0 @@ |
729 |
-Index: server/core.c |
730 |
-=================================================================== |
731 |
---- server/core.c (revision 779471) |
732 |
-+++ server/core.c (revision 779472) |
733 |
-@@ -661,7 +661,11 @@ |
734 |
- core_dir_config *conf = |
735 |
- (core_dir_config *)ap_get_module_config(r->per_dir_config, &core_module); |
736 |
- |
737 |
-- return conf->opts; |
738 |
-+ /* Per comment in http_core.h - the OPT_INC_WITH_EXEC bit is |
739 |
-+ * inverted, such that the exposed semantics match that of |
740 |
-+ * OPT_INCNOEXEC; i.e., the bit is only enabled if exec= is *not* |
741 |
-+ * permitted. */ |
742 |
-+ return conf->opts ^ OPT_INC_WITH_EXEC; |
743 |
- } |
744 |
- |
745 |
- AP_DECLARE(int) ap_allow_overrides(request_rec *r) |
746 |
-Index: modules/filters/mod_include.c |
747 |
-=================================================================== |
748 |
---- modules/filters/mod_include.c (revision 779471) |
749 |
-+++ modules/filters/mod_include.c (revision 779472) |
750 |
-@@ -3565,7 +3565,7 @@ |
751 |
- intern->seen_eos = 0; |
752 |
- intern->state = PARSE_PRE_HEAD; |
753 |
- ctx->flags = (SSI_FLAG_PRINTING | SSI_FLAG_COND_TRUE); |
754 |
-- if ((ap_allow_options(r) & OPT_INC_WITH_EXEC) == 0) { |
755 |
-+ if (ap_allow_options(r) & OPT_INCNOEXEC) { |
756 |
- ctx->flags |= SSI_FLAG_NO_EXEC; |
757 |
- } |
758 |
- intern->accessenable = conf->accessenable; |
759 |
-Index: include/http_core.h |
760 |
-=================================================================== |
761 |
---- include/http_core.h (revision 779471) |
762 |
-+++ include/http_core.h (revision 779472) |
763 |
-@@ -73,16 +73,29 @@ |
764 |
- #define OPT_EXECCGI 8 |
765 |
- /** directive unset */ |
766 |
- #define OPT_UNSET 16 |
767 |
--/** SSI exec= permission is permitted, iff OPT_INCLUDES is also set */ |
768 |
--#define OPT_INC_WITH_EXEC 32 |
769 |
-+/** IncludesNOEXEC directive */ |
770 |
-+#define OPT_INCNOEXEC 32 |
771 |
- /** SymLinksIfOwnerMatch directive */ |
772 |
- #define OPT_SYM_OWNER 64 |
773 |
- /** MultiViews directive */ |
774 |
- #define OPT_MULTI 128 |
775 |
- /** All directives */ |
776 |
--#define OPT_ALL (OPT_INDEXES|OPT_INCLUDES|OPT_INC_WITH_EXEC|OPT_SYM_LINKS|OPT_EXECCGI) |
777 |
-+#define OPT_ALL (OPT_INDEXES|OPT_INCLUDES|OPT_INCNOEXEC|OPT_SYM_LINKS|OPT_EXECCGI) |
778 |
- /** @} */ |
779 |
- |
780 |
-+#ifdef CORE_PRIVATE |
781 |
-+/* For internal use only - since 2.2.12, the OPT_INCNOEXEC bit is |
782 |
-+ * internally replaced by OPT_INC_WITH_EXEC. The internal semantics |
783 |
-+ * of the two SSI-related bits are hence: |
784 |
-+ * |
785 |
-+ * OPT_INCLUDES => "enable SSI, without exec= permission" |
786 |
-+ * OPT_INC_WITH_EXEC => "iff OPT_INCLUDES is set, also enable exec=" |
787 |
-+ * |
788 |
-+ * The set of options exposed via ap_allow_options() retains the |
789 |
-+ * semantics of OPT_INCNOEXEC by flipping the bit. */ |
790 |
-+#define OPT_INC_WITH_EXEC OPT_INCNOEXEC |
791 |
-+#endif |
792 |
-+ |
793 |
- /** |
794 |
- * @defgroup get_remote_host Remote Host Resolution |
795 |
- * @ingroup APACHE_CORE_HTTPD |
796 |
|
797 |
Deleted: trunk/dist/2.2/patches/11_all_r790738.patch |
798 |
=================================================================== |
799 |
--- trunk/dist/2.2/patches/11_all_r790738.patch 2009-07-24 18:35:44 UTC (rev 223) |
800 |
+++ trunk/dist/2.2/patches/11_all_r790738.patch 2009-07-29 08:08:30 UTC (rev 224) |
801 |
@@ -1,18 +0,0 @@ |
802 |
-Index: server/core.c |
803 |
-=================================================================== |
804 |
---- server/core.c (revision 790737) |
805 |
-+++ server/core.c (revision 790738) |
806 |
-@@ -665,7 +665,12 @@ |
807 |
- * inverted, such that the exposed semantics match that of |
808 |
- * OPT_INCNOEXEC; i.e., the bit is only enabled if exec= is *not* |
809 |
- * permitted. */ |
810 |
-- return conf->opts ^ OPT_INC_WITH_EXEC; |
811 |
-+ if (conf->opts & OPT_INCLUDES) { |
812 |
-+ return conf->opts ^ OPT_INC_WITH_EXEC; |
813 |
-+ } |
814 |
-+ else { |
815 |
-+ return conf->opts; |
816 |
-+ } |
817 |
- } |
818 |
- |
819 |
- AP_DECLARE(int) ap_allow_overrides(request_rec *r) |