~ubuntu-branches/ubuntu/feisty/lighttpd/feisty-updates

« back to all changes in this revision

Viewing changes to debian/patches/11_security_lighttpd-1.4.x_etags.dpatch

  • Committer: Bazaar Package Importer
  • Author(s): Jamie Strandboge
  • Date: 2007-09-10 14:57:39 UTC
  • Revision ID: james.westby@ubuntu.com-20070910145739-sb4j09hngy0wcvo1
Tags: 1.4.13-9ubuntu4.2
* SECURITY UPDATE: fix DoS crash from improper EOL handling in mod_cgi.c
  (backported from upstream 1.4.17)
* SECURITY UPDATE: fix potential DoS crash in etag.c. This patch also fixes
  possible dereferencing a NULL pointer in buffer.c (both backported from
  upstream 1.4.17)
* SECURITY UPDATE: fix arbitrary code execution in mod_fastcgi.c due to
  improper handling of content length in HTTP headers.  Patch from upstream
* References
  https://bugs.launchpad.net/ubuntu/+source/lighttpd/+bug/138309
  https://bugs.launchpad.net/ubuntu/+source/lighttpd/+bug/138310
  http://www.lighttpd.net/assets/2007/9/9/lighttpd_sa_2007_12.txt
  CVE-2007-4727

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#! /bin/sh /usr/share/dpatch/dpatch-run
 
2
## 11_security_lighttpd-1.4.x_etags.dpatch.dpatch by Jamie Strandboge <jamie@ubuntu.com>
 
3
##
 
4
## All lines beginning with `## DP:' are a description of the patch.
 
5
## DP: etags dereference NULL pointer fix
 
6
 
 
7
@DPATCH@
 
8
 
 
9
diff -Nru lighttpd-1.4.13.orig/src/buffer.c lighttpd-1.4.13/src/buffer.c
 
10
--- lighttpd-1.4.13.orig/src/buffer.c   2006-10-04 09:29:17.000000000 -0400
 
11
+++ lighttpd-1.4.13/src/buffer.c        2007-09-08 15:23:55.000000000 -0400
 
12
@@ -503,6 +503,7 @@
 
13
 }
 
14
 
 
15
 int buffer_is_empty(buffer *b) {
 
16
+       if (!b) return 1;
 
17
        return (b->used == 0);
 
18
 }
 
19
 
 
20
diff -Nru lighttpd-1.4.13.orig/src/etag.c lighttpd-1.4.13/src/etag.c
 
21
--- lighttpd-1.4.13.orig/src/etag.c     2006-10-04 09:29:17.000000000 -0400
 
22
+++ lighttpd-1.4.13/src/etag.c  2007-09-08 15:23:55.000000000 -0400
 
23
@@ -4,7 +4,7 @@
 
24
 #include "etag.h"
 
25
 
 
26
 int etag_is_equal(buffer *etag, const char *matches) {
 
27
-       if (0 == strcmp(etag->ptr, matches)) return 1;
 
28
+       if (etag && !buffer_is_empty(etag) && 0 == strcmp(etag->ptr, matches)) return 1;
 
29
        return 0;
 
30
 }
 
31