Received: by mail.netbsd.org (Postfix, from userid 605) id 8EB7384ECB; Thu, 20 Aug 2020 16:40:58 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.netbsd.org (Postfix) with ESMTP id 15FF684EC6 for ; Thu, 20 Aug 2020 16:40:58 +0000 (UTC) X-Virus-Scanned: amavisd-new at netbsd.org Received: from mail.netbsd.org ([IPv6:::1]) by localhost (mail.netbsd.org [IPv6:::1]) (amavisd-new, port 10025) with ESMTP id fbFvUw5NLIN7 for ; Thu, 20 Aug 2020 16:40:57 +0000 (UTC) Received: from cvs.NetBSD.org (ivanova.NetBSD.org [IPv6:2001:470:a085:999:28c:faff:fe03:5984]) by mail.netbsd.org (Postfix) with ESMTP id 7F19C84CE2 for ; Thu, 20 Aug 2020 16:40:57 +0000 (UTC) Received: by cvs.NetBSD.org (Postfix, from userid 500) id 77EACFB28; Thu, 20 Aug 2020 16:40:57 +0000 (UTC) Content-Transfer-Encoding: 7bit Content-Type: multipart/mixed; boundary="_----------=_1597941657282870" MIME-Version: 1.0 Date: Thu, 20 Aug 2020 16:40:57 +0000 From: "Gavan Fantom" Subject: CVS commit: pkgsrc/mail/exim To: pkgsrc-changes@NetBSD.org Reply-To: gavan@netbsd.org X-Mailer: log_accum Message-Id: <20200820164057.77EACFB28@cvs.NetBSD.org> Sender: pkgsrc-changes-owner@NetBSD.org List-Id: pkgsrc-changes.NetBSD.org Precedence: bulk List-Unsubscribe: This is a multi-part message in MIME format. --_----------=_1597941657282870 Content-Disposition: inline Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" Module Name: pkgsrc Committed By: gavan Date: Thu Aug 20 16:40:57 UTC 2020 Modified Files: pkgsrc/mail/exim: Makefile distinfo Added Files: pkgsrc/mail/exim/patches: patch-src_store.c Log Message: exim: fix crash on startup if log_buffer is allocated right after taint pool The check whether a block of memory is tainted erroneously returns true if the block in question starts the very next byte after a block in the tainted pool. Depending on the memory allocator, this can cause problems. For example, on NetBSD/amd64 9.0, this seems to allocate the first tainted block immediately before log_buffer. This leads to a recursive error in log_write the first time anything is written to the log, leading to a segmentation fault when the stack fills up. To generate a diff of this commit: cvs rdiff -u -r1.180 -r1.181 pkgsrc/mail/exim/Makefile cvs rdiff -u -r1.77 -r1.78 pkgsrc/mail/exim/distinfo cvs rdiff -u -r0 -r1.1 pkgsrc/mail/exim/patches/patch-src_store.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. --_----------=_1597941657282870 Content-Disposition: inline Content-Length: 2419 Content-Transfer-Encoding: binary Content-Type: text/x-diff; charset=us-ascii Modified files: Index: pkgsrc/mail/exim/Makefile diff -u pkgsrc/mail/exim/Makefile:1.180 pkgsrc/mail/exim/Makefile:1.181 --- pkgsrc/mail/exim/Makefile:1.180 Tue Jun 2 08:24:14 2020 +++ pkgsrc/mail/exim/Makefile Thu Aug 20 16:40:57 2020 @@ -1,7 +1,7 @@ -# $NetBSD: Makefile,v 1.180 2020/06/02 08:24:14 adam Exp $ +# $NetBSD: Makefile,v 1.181 2020/08/20 16:40:57 gavan Exp $ DISTNAME= exim-4.94 -PKGREVISION= 1 +PKGREVISION= 2 CATEGORIES= mail net MASTER_SITES= ftp://ftp.exim.org/pub/exim/exim4/ MASTER_SITES+= https://ftp.exim.org/pub/exim/exim4/ Index: pkgsrc/mail/exim/distinfo diff -u pkgsrc/mail/exim/distinfo:1.77 pkgsrc/mail/exim/distinfo:1.78 --- pkgsrc/mail/exim/distinfo:1.77 Mon Jun 1 19:42:48 2020 +++ pkgsrc/mail/exim/distinfo Thu Aug 20 16:40:57 2020 @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.77 2020/06/01 19:42:48 adam Exp $ +$NetBSD: distinfo,v 1.78 2020/08/20 16:40:57 gavan Exp $ SHA1 (exim-4.94.tar.xz) = 60323c206be7d9f535c4bd369b470a514e489cd5 RMD160 (exim-4.94.tar.xz) = 6b51d059d9667c732df9ccb87f0de9b341c35281 @@ -9,3 +9,4 @@ SHA1 (patch-OS_Makefile-Default) = 6af17 SHA1 (patch-lookups_Makefile) = cfc40dba3f75ef37b9887f7767139ad50cf9d4e5 SHA1 (patch-scripts_exim__install) = aa0a31e77d5f76e33bc92140c14d39c79f710b95 SHA1 (patch-src_exicyclog.src) = cea5f04f52c9264fd7d279c046686dac2dc57a65 +SHA1 (patch-src_store.c) = db12aefb50c2741cb525b7363c4bafbe353dfc5f Added files: Index: pkgsrc/mail/exim/patches/patch-src_store.c diff -u /dev/null pkgsrc/mail/exim/patches/patch-src_store.c:1.1 --- /dev/null Thu Aug 20 16:40:57 2020 +++ pkgsrc/mail/exim/patches/patch-src_store.c Thu Aug 20 16:40:57 2020 @@ -0,0 +1,21 @@ +$NetBSD: patch-src_store.c,v 1.1 2020/08/20 16:40:57 gavan Exp $ + +--- src/store.c.orig 2020-05-30 20:35:38.000000000 +0000 ++++ src/store.c +@@ -188,14 +188,14 @@ for (int pool = POOL_TAINT_BASE; pool < + if ((b = current_block[pool])) + { + uschar * bc = US b + ALIGNED_SIZEOF_STOREBLOCK; +- if (US p >= bc && US p <= bc + b->length) return TRUE; ++ if (US p >= bc && US p < bc + b->length) return TRUE; + } + + for (int pool = POOL_TAINT_BASE; pool < nelem(chainbase); pool++) + for (b = chainbase[pool]; b; b = b->next) + { + uschar * bc = US b + ALIGNED_SIZEOF_STOREBLOCK; +- if (US p >= bc && US p <= bc + b->length) return TRUE; ++ if (US p >= bc && US p < bc + b->length) return TRUE; + } + return FALSE; + } --_----------=_1597941657282870--