diff options
author | ume <ume@FreeBSD.org> | 2015-12-01 22:33:31 +0800 |
---|---|---|
committer | ume <ume@FreeBSD.org> | 2015-12-01 22:33:31 +0800 |
commit | a2881df3f25d41a14b0fa65727a8723441c5fa57 (patch) | |
tree | f2959cb06974f77555e4bd97b023024bc810c9c4 /mail | |
parent | dbece34b82d537f89e483773491ea09c2dd2e058 (diff) | |
download | freebsd-ports-gnome-a2881df3f25d41a14b0fa65727a8723441c5fa57.tar.gz freebsd-ports-gnome-a2881df3f25d41a14b0fa65727a8723441c5fa57.tar.zst freebsd-ports-gnome-a2881df3f25d41a14b0fa65727a8723441c5fa57.zip |
Apply upstream patches to fix CVE-2015-8077 and CVE-2015-8078.
Obtained from: https://cyrus.foundation/cyrus-imapd/patch/?id=745e161c834f1eb6d62fc14477f51dae799e1e08,
https://cyrus.foundation/cyrus-imapd/patch/?id=6fb6a272171f49c79ba6ab7c6403eb25b39ec1b2
MFH: 2015Q4
Security: d62ec98e-97d8-11e5-8c0e-080027b00c2e
Diffstat (limited to 'mail')
-rw-r--r-- | mail/cyrus-imapd24/Makefile | 2 | ||||
-rw-r--r-- | mail/cyrus-imapd24/files/patch-CVE-2015-8077 | 40 | ||||
-rw-r--r-- | mail/cyrus-imapd24/files/patch-CVE-2015-8078 | 23 |
3 files changed, 64 insertions, 1 deletions
diff --git a/mail/cyrus-imapd24/Makefile b/mail/cyrus-imapd24/Makefile index 22b908cc8b6a..de76be68ad39 100644 --- a/mail/cyrus-imapd24/Makefile +++ b/mail/cyrus-imapd24/Makefile @@ -2,7 +2,7 @@ PORTNAME= cyrus-imapd PORTVERSION= 2.4.18 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= mail ipv6 MASTER_SITES= ftp://ftp.cyrusimap.org/cyrus-imapd/ \ http://cyrusimap.org/releases/ diff --git a/mail/cyrus-imapd24/files/patch-CVE-2015-8077 b/mail/cyrus-imapd24/files/patch-CVE-2015-8077 new file mode 100644 index 000000000000..3432bbdbec4e --- /dev/null +++ b/mail/cyrus-imapd24/files/patch-CVE-2015-8077 @@ -0,0 +1,40 @@ +From 745e161c834f1eb6d62fc14477f51dae799e1e08 Mon Sep 17 00:00:00 2001 +From: ellie timoney <ellie@fastmail.com> +Date: Mon, 26 Oct 2015 16:15:40 +1100 +Subject: urlfetch: protect against overflow in range checks + + +--- imap/index.c.orig 2015-07-06 03:38:29 UTC ++++ imap/index.c +@@ -2712,7 +2712,8 @@ int index_urlfetch(struct index_state *s + int fetchmime = 0, domain = DOMAIN_7BIT; + unsigned size; + int32_t skip = 0; +- int n, r = 0; ++ unsigned long n; ++ int r = 0; + char *decbuf = NULL; + struct mailbox *mailbox = state->mailbox; + struct index_map *im = &state->map[msgno-1]; +@@ -2849,7 +2850,7 @@ int index_urlfetch(struct index_state *s + start_octet = size; + n = 0; + } +- else if (start_octet + n > size) { ++ else if (start_octet + n < start_octet || start_octet + n > size) { + n = size - start_octet; + } + +@@ -2861,10 +2862,10 @@ int index_urlfetch(struct index_state *s + + if (domain == DOMAIN_BINARY) { + /* Write size of literal8 */ +- prot_printf(pout, " ~{%u}\r\n", n); ++ prot_printf(pout, " ~{%lu}\r\n", n); + } else { + /* Write size of literal */ +- prot_printf(pout, " {%u}\r\n", n); ++ prot_printf(pout, " {%lu}\r\n", n); + } + } + diff --git a/mail/cyrus-imapd24/files/patch-CVE-2015-8078 b/mail/cyrus-imapd24/files/patch-CVE-2015-8078 new file mode 100644 index 000000000000..040b9e7f919f --- /dev/null +++ b/mail/cyrus-imapd24/files/patch-CVE-2015-8078 @@ -0,0 +1,23 @@ +From 6fb6a272171f49c79ba6ab7c6403eb25b39ec1b2 Mon Sep 17 00:00:00 2001 +From: ellie timoney <ellie@fastmail.com> +Date: Mon, 26 Oct 2015 16:21:01 +1100 +Subject: urlfetch: and the other bit + + +diff --git a/imap/index.c b/imap/index.c +index f5161cd..da8ce3d 100644 +--- imap/index.c ++++ imap/index.c +@@ -4244,7 +4244,8 @@ EXPORTED int index_urlfetch(struct index_state *state, uint32_t msgno, + size_t section_offset = CACHE_ITEM_BIT32(cacheitem); + size_t section_size = CACHE_ITEM_BIT32(cacheitem + CACHE_ITEM_SIZE_SKIP); + +- if (section_offset + section_size > size) { ++ if (section_offset + section_size < section_offset ++ || section_offset + section_size > size) { + r = IMAP_INTERNAL; + goto done; + } +-- +cgit v0.10.2 + |