From owner-svn-ports-head@freebsd.org Tue Dec 1 14:33:33 2015 Return-Path: Delivered-To: svn-ports-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4568EA3E95A; Tue, 1 Dec 2015 14:33:33 +0000 (UTC) (envelope-from ume@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1A2BC1180; Tue, 1 Dec 2015 14:33:33 +0000 (UTC) (envelope-from ume@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB1EXWC2073435; Tue, 1 Dec 2015 14:33:32 GMT (envelope-from ume@FreeBSD.org) Received: (from ume@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB1EXWB4073432; Tue, 1 Dec 2015 14:33:32 GMT (envelope-from ume@FreeBSD.org) Message-Id: <201512011433.tB1EXWB4073432@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ume set sender to ume@FreeBSD.org using -f From: Hajimu UMEMOTO Date: Tue, 1 Dec 2015 14:33:32 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r402745 - in head/mail/cyrus-imapd24: . files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Dec 2015 14:33:33 -0000 Author: ume Date: Tue Dec 1 14:33:31 2015 New Revision: 402745 URL: https://svnweb.freebsd.org/changeset/ports/402745 Log: 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 Added: head/mail/cyrus-imapd24/files/patch-CVE-2015-8077 (contents, props changed) head/mail/cyrus-imapd24/files/patch-CVE-2015-8078 (contents, props changed) Modified: head/mail/cyrus-imapd24/Makefile Modified: head/mail/cyrus-imapd24/Makefile ============================================================================== --- head/mail/cyrus-imapd24/Makefile Tue Dec 1 14:30:48 2015 (r402744) +++ head/mail/cyrus-imapd24/Makefile Tue Dec 1 14:33:31 2015 (r402745) @@ -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/ Added: head/mail/cyrus-imapd24/files/patch-CVE-2015-8077 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/mail/cyrus-imapd24/files/patch-CVE-2015-8077 Tue Dec 1 14:33:31 2015 (r402745) @@ -0,0 +1,40 @@ +From 745e161c834f1eb6d62fc14477f51dae799e1e08 Mon Sep 17 00:00:00 2001 +From: ellie timoney +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); + } + } + Added: head/mail/cyrus-imapd24/files/patch-CVE-2015-8078 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/mail/cyrus-imapd24/files/patch-CVE-2015-8078 Tue Dec 1 14:33:31 2015 (r402745) @@ -0,0 +1,23 @@ +From 6fb6a272171f49c79ba6ab7c6403eb25b39ec1b2 Mon Sep 17 00:00:00 2001 +From: ellie timoney +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 +