diff options
author | Felix Fietkau <nbd@openwrt.org> | 2010-01-28 19:27:57 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2010-01-28 19:27:57 +0000 |
commit | 7417cfdda3528afb5bad75be32bc0df6969e1f6c (patch) | |
tree | 0620396ae479b8223db82be64753f953d75f7d20 /package/openssl/patches/900-CVE-2009-1387.patch | |
parent | 0f34d887179e91550216ff89cd0cae2383026c32 (diff) | |
download | upstream-7417cfdda3528afb5bad75be32bc0df6969e1f6c.tar.gz upstream-7417cfdda3528afb5bad75be32bc0df6969e1f6c.tar.bz2 upstream-7417cfdda3528afb5bad75be32bc0df6969e1f6c.zip |
openssl: add fixes for CVE-2009-1387 and CVE-2009-2409 (thx, puchu)
SVN-Revision: 19369
Diffstat (limited to 'package/openssl/patches/900-CVE-2009-1387.patch')
-rw-r--r-- | package/openssl/patches/900-CVE-2009-1387.patch | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/package/openssl/patches/900-CVE-2009-1387.patch b/package/openssl/patches/900-CVE-2009-1387.patch new file mode 100644 index 0000000000..7a2a47e9b5 --- /dev/null +++ b/package/openssl/patches/900-CVE-2009-1387.patch @@ -0,0 +1,53 @@ +http://bugs.gentoo.org/270305 + +fix from upstream + +--- a/ssl/d1_both.c ++++ b/ssl/d1_both.c +@@ -585,30 +585,31 @@ dtls1_process_out_of_seq_message(SSL *s, + } + } + +- frag = dtls1_hm_fragment_new(frag_len); +- if ( frag == NULL) +- goto err; ++ if (frag_len) ++ { ++ frag = dtls1_hm_fragment_new(frag_len); ++ if ( frag == NULL) ++ goto err; + +- memcpy(&(frag->msg_header), msg_hdr, sizeof(*msg_hdr)); ++ memcpy(&(frag->msg_header), msg_hdr, sizeof(*msg_hdr)); + +- if (frag_len) +- { +- /* read the body of the fragment (header has already been read */ ++ /* read the body of the fragment (header has already been read) */ + i = s->method->ssl_read_bytes(s,SSL3_RT_HANDSHAKE, + frag->fragment,frag_len,0); + if (i<=0 || (unsigned long)i!=frag_len) + goto err; +- } + +- pq_64bit_init(&seq64); +- pq_64bit_assign_word(&seq64, msg_hdr->seq); ++ pq_64bit_init(&seq64); ++ pq_64bit_assign_word(&seq64, msg_hdr->seq); + +- item = pitem_new(seq64, frag); +- pq_64bit_free(&seq64); +- if ( item == NULL) +- goto err; ++ item = pitem_new(seq64, frag); ++ pq_64bit_free(&seq64); ++ if ( item == NULL) ++ goto err; ++ ++ pqueue_insert(s->d1->buffered_messages, item); ++ } + +- pqueue_insert(s->d1->buffered_messages, item); + return DTLS1_HM_FRAGMENT_RETRY; + + err: |