update exim to version 4.76.

This contains a security fix for CVE-2011-1764.

ok sthen@ and jasper@
This commit is contained in:
fkr 2011-05-09 14:56:56 +00:00
parent ebd4d1f72d
commit 7332caaf6f
4 changed files with 33 additions and 50 deletions

View File

@ -1,12 +1,11 @@
# $OpenBSD: Makefile,v 1.80 2011/02/07 16:01:26 jasper Exp $
# $OpenBSD: Makefile,v 1.81 2011/05/09 14:56:56 fkr Exp $
CATEGORIES = mail
COMMENT-main = flexible mail transfer agent
COMMENT-eximon = X11 monitor tool for Exim MTA
VERSION = 4.73
VERSION = 4.76
DISTNAME = exim-${VERSION}
PKGNAME-main = exim-${VERSION}
REVISION-main = 0
FULLPKGNAME-eximon = exim-eximon-${VERSION}
FULLPKGPATH-eximon = ${PKGPATH},-eximon
MASTER_SITES = ftp://ftp.exim.org/pub/exim/exim4/ \

View File

@ -1,5 +1,5 @@
MD5 (exim-4.73.tar.gz) = 9j+ymqDEobjJjWlfHIJBdA==
RMD160 (exim-4.73.tar.gz) = 81TEbqA2h/yXFcXSKMMybxNqtiw=
SHA1 (exim-4.73.tar.gz) = QaICWyUOISvz1okNxmNu60+gh7k=
SHA256 (exim-4.73.tar.gz) = C6a4ZdUuQwzapZAyLHwbH4tkrflK1+N04ISQR+982aY=
SIZE (exim-4.73.tar.gz) = 2051165
MD5 (exim-4.76.tar.gz) = T8OXDU+7HUlRtbYz3r0NSA==
RMD160 (exim-4.76.tar.gz) = a8MWCKG8H0OjYtvLkUB/ZvqIwsM=
SHA1 (exim-4.76.tar.gz) = ExIWRKnf1sBm9l20rWcDo9xDLIo=
SHA256 (exim-4.76.tar.gz) = mXbJ7+bDBLG/iRoWlZMapdGNw3T3134voIKqx1OyJy0=
SIZE (exim-4.76.tar.gz) = 2068071

View File

@ -248,6 +248,19 @@ SUPPORT_MAILSTORE=yes
SUPPORT_MBX=yes
#------------------------------------------------------------------------------
# See below for dynamic lookup modules.
# LOOKUP_MODULE_DIR=/usr/lib/exim/lookups/
# If not using package management but using this anyway, then think about how
# you perform upgrades and revert them. You should consider the benefit of
# embedding the Exim version number into LOOKUP_MODULE_DIR, so that you can
# maintain two concurrent sets of modules.
# To build a module dynamically, you'll need to define CFLAGS_DYNAMIC for
# your platform. Eg:
# CFLAGS_DYNAMIC=-shared -rdynamic
# CFLAGS_DYNAMIC=-shared -rdynamic -fPIC
#------------------------------------------------------------------------------
# These settings determine which file and database lookup methods are included
# in the binary. See the manual chapter entitled "File and database lookups"
@ -256,6 +269,18 @@ SUPPORT_MBX=yes
# LOOKUP_DNSDB does *not* refer to general mail routing using the DNS. It is
# for the specialist case of using the DNS as a general database facility (not
# common).
# If set to "2" instead of "yes" then the corresponding lookup will be
# built as a module and must be installed into LOOKUP_MODULE_DIR. You need to
# add -export-dynamic -rdynamic to EXTRALIBS. You may also need to add -ldl to
# EXTRALIBS so that dlopen() is available to Exim. You need to define
# LOOKUP_MODULE_DIR above so the exim binary actually loads dynamic lookup
# modules.
# Also, instead of adding all the libraries/includes to LOOKUP_INCLUDE and
# LOOKUP_LIBS, add them to the respective LOOKUP_*_INCLUDE and LOOKUP_*_LIBS
# (where * is the name as given here in this list). That ensures that only
# the dynamic library and not the exim binary will be linked against the
# library.
# NOTE: LDAP cannot be built as a module!
LOOKUP_DBM=yes
LOOKUP_LSEARCH=yes
@ -503,7 +528,7 @@ FIXED_NEVER_USERS=root
#
# As a strictly transient measure to ease migration to 4.73, the
# WHITELIST_D_MACROS value definies a colon-separated list of macro-names
# which are permitted to be overriden from the command-line which will be
# which are permitted to be overridden from the command-line which will be
# honoured by the Exim user. So these are macros that can persist to delivery
# time.
# Examples might be -DTLS or -DSPOOL=/some/dir. The values on the

View File

@ -1,41 +0,0 @@
$OpenBSD: patch-src_log_c,v 1.1 2011/02/07 16:01:26 jasper Exp $
Security fix for CVE-2011-0017
Privilege escalation from exim run-time user to root.
Patch extracted from exim 3.74.
--- src/log.c.orig Sun Dec 26 19:17:23 2010
+++ src/log.c Mon Feb 7 14:11:37 2011
@@ -361,17 +361,26 @@ are neither exim nor root, creation is not attempted.
else if (euid == root_uid)
{
- int status;
+ int status, rv;
pid_t pid = fork();
/* In the subprocess, change uid/gid and do the creation. Return 0 from the
- subprocess on success. There doesn't seem much point in testing for setgid
- and setuid errors. */
+ subprocess on success. If we don't check for setuid failures, then the file
+ can be created as root, so vulnerabilities which cause setuid to fail mean
+ that the Exim user can use symlinks to cause a file to be opened/created as
+ root. We always open for append, so can't nuke existing content but it would
+ still be Rather Bad. */
if (pid == 0)
{
- (void)setgid(exim_gid);
- (void)setuid(exim_uid);
+ rv = setgid(exim_gid);
+ if (rv)
+ die(US"exim: setgid for log-file creation failed, aborting",
+ US"Unexpected log failure, please try later");
+ rv = setuid(exim_uid);
+ if (rv)
+ die(US"exim: setuid for log-file creation failed, aborting",
+ US"Unexpected log failure, please try later");
_exit((create_log(buffer) < 0)? 1 : 0);
}