git://git.exim.org
/
users
/
jgh
/
exim.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
adc4ecf
)
Taint: invert the taint-check implementation control #define
author
Jeremy Harris
<jgh146exb@wizmail.org>
Tue, 10 Dec 2019 13:19:09 +0000
(13:19 +0000)
committer
Jeremy Harris
<jgh146exb@wizmail.org>
Tue, 10 Dec 2019 16:02:48 +0000
(16:02 +0000)
src/OS/Makefile-FreeBSD
patch
|
blob
|
history
src/OS/Makefile-Linux
patch
|
blob
|
history
src/OS/Makefile-OpenBSD
patch
|
blob
|
history
src/OS/Makefile-SunOS5
patch
|
blob
|
history
src/src/mytypes.h
patch
|
blob
|
history
src/src/store.c
patch
|
blob
|
history
diff --git
a/src/OS/Makefile-FreeBSD
b/src/OS/Makefile-FreeBSD
index 1a2f8ecab05f103475a4bd881b506a2e11ebeede..8dbdab79d3bb56ca6ecb0f4e1c31b9bf7a619a8a 100644
(file)
--- a/
src/OS/Makefile-FreeBSD
+++ b/
src/OS/Makefile-FreeBSD
@@
-4,7
+4,6
@@
CHOWN_COMMAND=/usr/sbin/chown
STRIP_COMMAND=/usr/bin/strip
CHMOD_COMMAND=/bin/chmod
STRIP_COMMAND=/usr/bin/strip
CHMOD_COMMAND=/bin/chmod
-CFLAGS += -DTAINT_CHECK_SLOW
# FreeBSD Ports no longer insert compatibility symlinks into /usr/bin for
# scripting languages which traditionally have had them.
# FreeBSD Ports no longer insert compatibility symlinks into /usr/bin for
# scripting languages which traditionally have had them.
diff --git
a/src/OS/Makefile-Linux
b/src/OS/Makefile-Linux
index ae9f249a9abd896b1ac450524e3d9853cdf1ada5..d1d501376afc48bb45d8462e5faf25f9a8266bb7 100644
(file)
--- a/
src/OS/Makefile-Linux
+++ b/
src/OS/Makefile-Linux
@@
-18,6
+18,9
@@
CC=cc
CFLAGS ?= -O -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
CFLAGS_DYNAMIC ?= -shared -rdynamic
CFLAGS ?= -O -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
CFLAGS_DYNAMIC ?= -shared -rdynamic
+# We have mmap/malloc addr spaces separate
+CFLAGS += -DTAINT_CHECK_FAST
+
DBMLIB = -ldb
USE_DB = yes
DBMLIB = -ldb
USE_DB = yes
diff --git
a/src/OS/Makefile-OpenBSD
b/src/OS/Makefile-OpenBSD
index 8bff1b058874296165fc296eece0273493470f3e..1855e55bde9f826b5d8c03c7dc8d14c631b45d04 100644
(file)
--- a/
src/OS/Makefile-OpenBSD
+++ b/
src/OS/Makefile-OpenBSD
@@
-6,7
+6,6
@@
CHMOD_COMMAND=/bin/chmod
CC=cc
CFLAGS=-O2 -Wall -Wno-parentheses -Wno-self-assign -Wno-logical-op-parentheses
CC=cc
CFLAGS=-O2 -Wall -Wno-parentheses -Wno-self-assign -Wno-logical-op-parentheses
-CFLAGS += -DTAINT_CHECK_SLOW
LIBS=-lm
LIBS=-lm
diff --git
a/src/OS/Makefile-SunOS5
b/src/OS/Makefile-SunOS5
index fc3fd96cfb6f4bf2fca8c8e162040c6ba978a419..33cb1f0337fcf776265bf800b313ec66be712fd7 100644
(file)
--- a/
src/OS/Makefile-SunOS5
+++ b/
src/OS/Makefile-SunOS5
@@
-1,7
+1,5
@@
# Exim: OS-specific make file for SunOS5
# Exim: OS-specific make file for SunOS5
-CFLAGS=-O -DTAINT_CHECK_SLOW
-
HAVE_ICONV=yes
BASENAME_COMMAND=look_for_it
HAVE_ICONV=yes
BASENAME_COMMAND=look_for_it
diff --git
a/src/src/mytypes.h
b/src/src/mytypes.h
index ceb9f1b5592569ecc48e5ffe484104f37c1b326a..fd33168f717dc692c49b8c0c12135c15c3dba5d0 100644
(file)
--- a/
src/src/mytypes.h
+++ b/
src/src/mytypes.h
@@
-137,7
+137,7
@@
is_tainted(const void * p)
#if defined(COMPILE_UTILITY) || defined(MACRO_PREDEF)
return FALSE;
#if defined(COMPILE_UTILITY) || defined(MACRO_PREDEF)
return FALSE;
-#elif
defined(TAINT_CHECK_SLOW
)
+#elif
!defined(TAINT_CHECK_FAST
)
extern BOOL is_tainted_fn(const void *);
return is_tainted_fn(p);
extern BOOL is_tainted_fn(const void *);
return is_tainted_fn(p);
diff --git
a/src/src/store.c
b/src/src/store.c
index fbfd20d1de64d34fb276e183aad8483b91cc872b..a8f5a07fcecfaaacced5c588d0eadc6ec7634fe6 100644
(file)
--- a/
src/src/store.c
+++ b/
src/src/store.c
@@
-180,6
+180,7
@@
static void internal_tainted_free(storeblock *, const char *, int linenumber);
/******************************************************************************/
/******************************************************************************/
+#ifndef TAINT_CHECK_FAST
/* Slower version check, for use when platform intermixes malloc and mmap area
addresses. */
/* Slower version check, for use when platform intermixes malloc and mmap area
addresses. */
@@
-207,6
+208,7
@@
return FALSE;
hit:
return pool >= POOL_TAINT_BASE;
}
hit:
return pool >= POOL_TAINT_BASE;
}
+#endif
void
void