~clint-fewbar/ubuntu/maverick/apache2/maverick-passphrase-plymouth-change

« back to all changes in this revision

Viewing changes to debian/patches/049_CVE-2007-1863.dpatch

  • Committer: Bazaar Package Importer
  • Author(s): Stefan Fritsch, Stefan Fritsch, Peter Samuelson
  • Date: 2007-07-01 19:57:51 UTC
  • mfrom: (0.8.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20070701195751-kcags6dpm5up3li5
Tags: 2.2.4-1
[ Stefan Fritsch ]
* Urgency medium for security fix
* Fix CVE-2007-1863: DoS in mod_cache
* New upstream version (Closes: #427050)
  - Fixes "proxy: error reading status line from remote server"
    (Closes: #410331)
* Fix CVE-2007-1862: mod_mem_cache DoS (introduced in 2.2.4)
* Change logrotate script to use reload instead of restart.
  (Closes: #298689)
* chmod o-rx /var/log/apache2 (Closes: #291841)
* chmod o-x suexec (Closes: #431048)
* Update patch for truncated mod_cgi 500 responses from upstream SVN
  (Closes: #412580)
* Don't use AddDefaultCharset for our docs (Closes: #414429)
* fix options syntax in sites-available/default (Closes: #419539)
* Move conf.d include to the end of apache2.conf (Closes: #305933)
* Remove log, cache, and lock files on purge (Closes: #428887)
* Ship /usr/lib/cgi-bin (Closes: #415698)
* Add note to README.Debian how to read docs (Closes: #350822)
* Document pid file name (Closes: #350286)
* Update Standards-Version (no changes needed)
* Fix some lintian warnings, add some overrides
* Start apache when doing a "restart" even if it was not running
  (Closes: #384682)
* reload config in apache2-doc postinst (Closes: #289289)
* don't fail in prerm if apache is not running (Closes: #418536)
* Suggest apache2-doc and www-browser (Closes: #399056)
* Make init script always display a warning if NO_START=1 since
  VERBOSE=yes is not the default anymore (Closes: #430116)
* Replace apache2(8) man page with a more current version
* Add httxt2dbm(8) man page
* Show -X option in help message (Closes: #391817)
* remove sick-hack-to-update-modules
* don't depend on procps on hurd (Closes: #431125)

[ Peter Samuelson ]
* Add shlibs:Depends to apache2.2-common.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#! /bin/sh /usr/share/dpatch/dpatch-run
 
2
## 048_CVE-2007-1863.dpatch
 
3
##
 
4
## All lines beginning with `## DP:' are a description of the patch.
 
5
## DP: No description.
 
6
 
 
7
@DPATCH@
 
8
--- 2.2.x/modules/cache/cache_util.c    2006/10/12 23:11:33     463503
 
9
+++ 2.2.x/modules/cache/cache_util.c    2007/06/29 16:25:57     551944
 
10
@@ -243,7 +243,8 @@
 
11
     age = ap_cache_current_age(info, age_c, r->request_time);
 
12
 
 
13
     /* extract s-maxage */
 
14
-    if (cc_cresp && ap_cache_liststr(r->pool, cc_cresp, "s-maxage", &val)) {
 
15
+    if (cc_cresp && ap_cache_liststr(r->pool, cc_cresp, "s-maxage", &val)
 
16
+        && val != NULL) {
 
17
         smaxage = apr_atoi64(val);
 
18
     }
 
19
     else {
 
20
@@ -252,7 +253,8 @@
 
21
 
 
22
     /* extract max-age from request */
 
23
     if (!conf->ignorecachecontrol
 
24
-        && cc_req && ap_cache_liststr(r->pool, cc_req, "max-age", &val)) {
 
25
+        && cc_req && ap_cache_liststr(r->pool, cc_req, "max-age", &val)
 
26
+        && val != NULL) {
 
27
         maxage_req = apr_atoi64(val);
 
28
     }
 
29
     else {
 
30
@@ -260,7 +262,8 @@
 
31
     }
 
32
 
 
33
     /* extract max-age from response */
 
34
-    if (cc_cresp && ap_cache_liststr(r->pool, cc_cresp, "max-age", &val)) {
 
35
+    if (cc_cresp && ap_cache_liststr(r->pool, cc_cresp, "max-age", &val)
 
36
+        && val != NULL) {
 
37
         maxage_cresp = apr_atoi64(val);
 
38
     }
 
39
     else {
 
40
@@ -282,7 +285,20 @@
 
41
 
 
42
     /* extract max-stale */
 
43
     if (cc_req && ap_cache_liststr(r->pool, cc_req, "max-stale", &val)) {
 
44
-        maxstale = apr_atoi64(val);
 
45
+        if(val != NULL) {
 
46
+            maxstale = apr_atoi64(val);
 
47
+        }
 
48
+        else {
 
49
+            /*
 
50
+             * If no value is assigned to max-stale, then the client is willing
 
51
+             * to accept a stale response of any age (RFC2616 14.9.3). We will
 
52
+             * set it to one year in this case as this situation is somewhat
 
53
+             * similar to a "never expires" Expires header (RFC2616 14.21)
 
54
+             * which is set to a date one year from the time the response is
 
55
+             * sent in this case.
 
56
+             */
 
57
+            maxstale = APR_INT64_C(86400*365);
 
58
+        }
 
59
     }
 
60
     else {
 
61
         maxstale = 0;
 
62
@@ -290,7 +306,8 @@
 
63
 
 
64
     /* extract min-fresh */
 
65
     if (!conf->ignorecachecontrol
 
66
-        && cc_req && ap_cache_liststr(r->pool, cc_req, "min-fresh", &val)) {
 
67
+        && cc_req && ap_cache_liststr(r->pool, cc_req, "min-fresh", &val)
 
68
+        && val != NULL) {
 
69
         minfresh = apr_atoi64(val);
 
70
     }
 
71
     else {
 
72
@@ -418,6 +435,9 @@
 
73
                             *val = apr_pstrmemdup(p, val_start,
 
74
                                                   next - val_start);
 
75
                         }
 
76
+                    }
 
77
+                    else {
 
78
+                        *val = NULL;
 
79
                     }
 
80
                 }
 
81
                 return 1;