~ubuntu-branches/ubuntu/lucid/openssl/lucid-proposed

« back to all changes in this revision

Viewing changes to debian/patches/CVE-2009-1377.patch

  • Committer: Bazaar Package Importer
  • Author(s): Nicolas Valcárcel Scerpella (Canonical)
  • Date: 2009-12-06 20:16:24 UTC
  • mfrom: (11.1.9 sid)
  • Revision ID: james.westby@ubuntu.com-20091206201624-u126qjpqm2n2uuhu
Tags: 0.9.8k-7ubuntu1
* Merge from debian unstable, remaining changes (LP: #493392):
  - Link using -Bsymbolic-functions
  - Add support for lpia
  - Disable SSLv2 during compile
  - Ship documentation in openssl-doc, suggested by the package.
  - Use a different priority for libssl0.9.8/restart-services
    depending on whether a desktop, or server dist-upgrade is being
    performed.
  - Display a system restart required notification bubble on libssl0.9.8
    upgrade.
  - Replace duplicate files in the doc directory with symlinks.
  - Move runtime libraries to /lib, for the benefit of wpasupplicant
* Strip the patches out of the source into quilt patches
* Disable CVE-2009-3555.patch

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Index: openssl-0.9.8k/ssl/d1_pkt.c
 
2
===================================================================
 
3
--- openssl-0.9.8k.orig/ssl/d1_pkt.c    2008-10-13 08:43:06.000000000 +0200
 
4
+++ openssl-0.9.8k/ssl/d1_pkt.c 2009-07-19 11:32:41.000000000 +0200
 
5
@@ -167,6 +167,10 @@
 
6
     DTLS1_RECORD_DATA *rdata;
 
7
        pitem *item;
 
8
 
 
9
+       /* Limit the size of the queue to prevent DOS attacks */
 
10
+       if (pqueue_size(queue->q) >= 100)
 
11
+               return 0;
 
12
+               
 
13
        rdata = OPENSSL_malloc(sizeof(DTLS1_RECORD_DATA));
 
14
        item = pitem_new(priority, rdata);
 
15
        if (rdata == NULL || item == NULL)
 
16
Index: openssl-0.9.8k/crypto/pqueue/pqueue.c
 
17
===================================================================
 
18
--- openssl-0.9.8k.orig/crypto/pqueue/pqueue.c  2005-06-28 14:53:33.000000000 +0200
 
19
+++ openssl-0.9.8k/crypto/pqueue/pqueue.c       2009-07-19 11:32:41.000000000 +0200
 
20
@@ -234,3 +234,17 @@
 
21
 
 
22
        return ret;
 
23
        }
 
24
+
 
25
+int
 
26
+pqueue_size(pqueue_s *pq)
 
27
+{
 
28
+       pitem *item = pq->items;
 
29
+       int count = 0;
 
30
+       
 
31
+       while(item != NULL)
 
32
+       {
 
33
+               count++;
 
34
+               item = item->next;
 
35
+       }
 
36
+       return count;
 
37
+}
 
38
Index: openssl-0.9.8k/crypto/pqueue/pqueue.h
 
39
===================================================================
 
40
--- openssl-0.9.8k.orig/crypto/pqueue/pqueue.h  2005-05-31 00:34:27.000000000 +0200
 
41
+++ openssl-0.9.8k/crypto/pqueue/pqueue.h       2009-07-19 11:32:41.000000000 +0200
 
42
@@ -91,5 +91,6 @@
 
43
 pitem *pqueue_next(piterator *iter);
 
44
 
 
45
 void   pqueue_print(pqueue pq);
 
46
+int    pqueue_size(pqueue pq);
 
47
 
 
48
 #endif /* ! HEADER_PQUEUE_H */