pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/mail/exim



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.

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;
+ }



Home | Main Index | Thread Index | Old Index