diff --git a/contrib/sendmail/RELEASE_NOTES b/contrib/sendmail/RELEASE_NOTES index c499d543e0ed..16a2d98a3f5d 100644 --- a/contrib/sendmail/RELEASE_NOTES +++ b/contrib/sendmail/RELEASE_NOTES @@ -1,11 +1,48 @@ SENDMAIL RELEASE NOTES - $Id: RELEASE_NOTES,v 8.1340.2.113 2003/02/11 19:17:41 gshapiro Exp $ + $Id: RELEASE_NOTES,v 8.1340.2.132 2003/03/29 14:02:26 ca Exp $ This listing shows the version of the sendmail binary, the version of the sendmail configuration files, the date of release, and a summary of the changes in that release. +8.12.9/8.12.9 2003/03/29 + SECURITY: Fix a buffer overflow in address parsing due to + a char to int conversion problem which is potentially + remotely exploitable. Problem found by Michal Zalewski. + Note: an MTA that is not patched might be vulnerable to + data that it receives from untrusted sources, which + includes DNS. + To provide partial protection to internal, unpatched sendmail MTAs, + 8.12.9 changes by default (char)0xff to (char)0x7f in + headers etc. To turn off this conversion compile with + -DALLOW_255 or use the command line option -d82.101. + To provide partial protection for internal, unpatched MTAs that may be + performing 7->8 or 8->7 bit MIME conversions, the default + for MaxMimeHeaderLength has been changed to 2048/1024. + Note: this does have a performance impact, and it only + protects against frontal attacks from the outside. + To disable the checks and return to pre-8.12.9 defaults, + set MaxMimeHeaderLength to 0/0. + Do not complain about -ba when submitting mail. Problem noted + by Derek Wueppelmann. + Fix compilation with Berkeley DB 1.85 on systems that do not + have flock(2). Problem noted by Andy Harper of Kings + College London. + Properly initialize data structure for dns maps to avoid various + errors, e.g., looping processes. Problem noted by + Maurice Makaay. + CONFIG: Prevent multiple application of rule to add smart host. + Patch from Andrzej Filip. + CONFIG: Fix queue group declaration in MAILER(`usenet'). + CONTRIB: buildvirtuser: New option -t builds the virtusertable + text file instead of the database map. + Portability: + Revert wrong change made in 8.12.7 and actually use the + builtin getopt() version in sendmail on Linux. + This can be overridden by using -DSM_CONF_GETOPT=0 + in which case the OS supplied version will be used. + 8.12.8/8.12.8 2003/02/11 SECURITY: Fix a remote buffer overflow in header parsing by dropping sender and recipient header comments if the diff --git a/contrib/sendmail/cf/README b/contrib/sendmail/cf/README index dceb1bc5bb7c..1a59f9df54a1 100644 --- a/contrib/sendmail/cf/README +++ b/contrib/sendmail/cf/README @@ -3687,6 +3687,7 @@ confMAX_HEADERS_LENGTH MaxHeadersLength confMAX_MIME_HEADER_LENGTH MaxMimeHeaderLength [undefined] Maximum length of certain MIME header field values. + If not set, sendmail uses 2048/1024. confCONNECTION_RATE_THROTTLE ConnectionRateThrottle [undefined] The maximum number of connections permitted per second per @@ -3849,8 +3850,6 @@ confRUN_AS_USER RunAsUser [undefined] If set, become this user this user. Also, all programs will be run as this user, and all output files will be written as this user. - Intended for use only on firewalls - where users do not have accounts. confMAX_RCPTS_PER_MESSAGE MaxRecipientsPerMessage [infinite] If set, allow no more than the specified number of recipients in @@ -4375,4 +4374,4 @@ M4 DIVERSIONS 8 DNS based blacklists 9 special local rulesets (1 and 2) -$Revision: 8.623.2.21 $, Last updated $Date: 2003/01/17 00:36:57 $ +$Revision: 8.623.2.23 $, Last updated $Date: 2003/03/28 17:28:26 $ diff --git a/contrib/sendmail/cf/cf/submit.cf b/contrib/sendmail/cf/cf/submit.cf index 216716e0500b..84f25304871a 100644 --- a/contrib/sendmail/cf/cf/submit.cf +++ b/contrib/sendmail/cf/cf/submit.cf @@ -24,7 +24,7 @@ ###################################################################### ###################################################################### -##### $Id: cfhead.m4,v 8.108.2.1 2002/08/27 20:19:08 gshapiro Exp $ ##### +##### $Id: cfhead.m4,v 8.108.2.2 2003/03/11 21:24:20 ca Exp $ ##### ##### $Id: cf.m4,v 8.32 1999/02/07 07:26:14 gshapiro Exp $ ##### ##### $Id: submit.mc,v 8.6.2.4 2002/12/29 03:54:34 ca Exp $ ##### ##### $Id: msp.m4,v 1.32 2002/03/26 22:02:03 ca Exp $ ##### @@ -32,7 +32,7 @@ ##### $Id: no_default_msa.m4,v 8.2 2001/02/14 05:03:22 gshapiro Exp $ ##### -##### $Id: proto.m4,v 8.649.2.14 2002/12/30 15:46:02 ca Exp $ ##### +##### $Id: proto.m4,v 8.649.2.17 2003/03/28 17:20:53 ca Exp $ ##### # level 10 config file format V10/Berkeley @@ -110,7 +110,7 @@ D{MTAHost}[127.0.0.1] # Configuration version number -DZ8.12.8/Submit +DZ8.12.9/Submit ############### @@ -283,10 +283,12 @@ O Timeout.queuereturn=5d #O Timeout.queuereturn.normal=5d #O Timeout.queuereturn.urgent=2d #O Timeout.queuereturn.non-urgent=7d + O Timeout.queuewarn=4h #O Timeout.queuewarn.normal=4h #O Timeout.queuewarn.urgent=1h #O Timeout.queuewarn.non-urgent=12h + #O Timeout.hoststatus=30m #O Timeout.resolver.retrans=5s #O Timeout.resolver.retrans.first=5s @@ -437,7 +439,7 @@ O TrustedUser=smmsp #O ControlSocketName=/var/spool/mqueue/.control # Maximum MIME header length to protect MUAs -#O MaxMimeHeaderLength=0/0 +#O MaxMimeHeaderLength=2048/1024 # Maximum length of the sum of all headers #O MaxHeadersLength=32768 @@ -754,7 +756,7 @@ SParse1 # handle numeric address spec R$* < @ [ $+ ] > $* $: $>ParseLocal $1 < @ [ $2 ] > $3 numeric internet spec -R$* < @ [ $+ ] > $* $1 < @ [ $2 ] : $S > $3 Add smart host to path +R$* < @ [ $+ ] > $* $: $1 < @ [ $2 ] : $S > $3 Add smart host to path R$* < @ [ $+ ] : > $* $#esmtp $@ [$2] $: $1 < @ [$2] > $3 no smarthost: send R$* < @ [ $+ ] : $- : $*> $* $#$3 $@ $4 $: $1 < @ [$2] > $5 smarthost with mailer R$* < @ [ $+ ] : $+ > $* $#esmtp $@ $3 $: $1 < @ [$2] > $4 smarthost without mailer diff --git a/contrib/sendmail/cf/m4/proto.m4 b/contrib/sendmail/cf/m4/proto.m4 index f216b2a63d03..1b9481f2340c 100644 --- a/contrib/sendmail/cf/m4/proto.m4 +++ b/contrib/sendmail/cf/m4/proto.m4 @@ -13,7 +13,7 @@ divert(-1) # divert(0) -VERSIONID(`$Id: proto.m4,v 8.649.2.14 2002/12/30 15:46:02 ca Exp $') +VERSIONID(`$Id: proto.m4,v 8.649.2.17 2003/03/28 17:20:53 ca Exp $') # level CF_LEVEL config file format V`'CF_LEVEL/ifdef(`VENDOR_NAME', `VENDOR_NAME', `Berkeley') @@ -424,10 +424,14 @@ _OPTION(Timeout.queuereturn, `confTO_QUEUERETURN', `5d') _OPTION(Timeout.queuereturn.normal, `confTO_QUEUERETURN_NORMAL', `5d') _OPTION(Timeout.queuereturn.urgent, `confTO_QUEUERETURN_URGENT', `2d') _OPTION(Timeout.queuereturn.non-urgent, `confTO_QUEUERETURN_NONURGENT', `7d') +ifdef(`confTO_QUEUERETURN_DSN', `dnl +O Timeout.queuereturn.dsn=confTO_QUEUERETURN_DSN') _OPTION(Timeout.queuewarn, `confTO_QUEUEWARN', `4h') _OPTION(Timeout.queuewarn.normal, `confTO_QUEUEWARN_NORMAL', `4h') _OPTION(Timeout.queuewarn.urgent, `confTO_QUEUEWARN_URGENT', `1h') _OPTION(Timeout.queuewarn.non-urgent, `confTO_QUEUEWARN_NONURGENT', `12h') +ifdef(`confTO_QUEUEWARN_DSN', `dnl +O Timeout.queuewarn.dsn=confTO_QUEUEWARN_DSN') _OPTION(Timeout.hoststatus, `confTO_HOSTSTATUS', `30m') _OPTION(Timeout.resolver.retrans, `confTO_RESOLVER_RETRANS', `5s') _OPTION(Timeout.resolver.retrans.first, `confTO_RESOLVER_RETRANS_FIRST', `5s') @@ -582,7 +586,7 @@ _OPTION(TrustedUser, `confTRUSTED_USER', `root') _OPTION(ControlSocketName, `confCONTROL_SOCKET_NAME', `/var/spool/mqueue/.control') # Maximum MIME header length to protect MUAs -_OPTION(MaxMimeHeaderLength, `confMAX_MIME_HEADER_LENGTH', `0/0') +_OPTION(MaxMimeHeaderLength, `confMAX_MIME_HEADER_LENGTH', `2048/1024') # Maximum length of the sum of all headers _OPTION(MaxHeadersLength, `confMAX_HEADERS_LENGTH', `32768') @@ -1017,7 +1021,7 @@ ifdef(`_MAILER_smtp_', `# handle numeric address spec dnl there is no check whether this is really an IP number R$* < @ [ $+ ] > $* $: $>ParseLocal $1 < @ [ $2 ] > $3 numeric internet spec -R$* < @ [ $+ ] > $* $1 < @ [ $2 ] : $S > $3 Add smart host to path +R$* < @ [ $+ ] > $* $: $1 < @ [ $2 ] : $S > $3 Add smart host to path R$* < @ [ $+ ] : > $* $#_SMTP_ $@ [$2] $: $1 < @ [$2] > $3 no smarthost: send R$* < @ [ $+ ] : $- : $*> $* $#$3 $@ $4 $: $1 < @ [$2] > $5 smarthost with mailer R$* < @ [ $+ ] : $+ > $* $#_SMTP_ $@ $3 $: $1 < @ [$2] > $4 smarthost without mailer', diff --git a/contrib/sendmail/cf/m4/version.m4 b/contrib/sendmail/cf/m4/version.m4 index 2a886db57f0e..7989c5fdca6b 100644 --- a/contrib/sendmail/cf/m4/version.m4 +++ b/contrib/sendmail/cf/m4/version.m4 @@ -11,8 +11,8 @@ divert(-1) # the sendmail distribution. # # -VERSIONID(`$Id: version.m4,v 8.92.2.14 2003/01/15 17:55:43 ca Exp $') +VERSIONID(`$Id: version.m4,v 8.92.2.15 2003/03/19 21:19:52 ca Exp $') # divert(0) # Configuration version number -DZ8.12.8`'ifdef(`confCF_VERSION', `/confCF_VERSION') +DZ8.12.9`'ifdef(`confCF_VERSION', `/confCF_VERSION') diff --git a/contrib/sendmail/cf/mailer/usenet.m4 b/contrib/sendmail/cf/mailer/usenet.m4 index d3ae38b94293..d28c3214d397 100644 --- a/contrib/sendmail/cf/mailer/usenet.m4 +++ b/contrib/sendmail/cf/mailer/usenet.m4 @@ -1,6 +1,6 @@ PUSHDIVERT(-1) # -# Copyright (c) 1998-2000 Sendmail, Inc. and its suppliers. +# Copyright (c) 1998-2000, 2003 Sendmail, Inc. and its suppliers. # All rights reserved. # Copyright (c) 1983 Eric P. Allman. All rights reserved. # Copyright (c) 1988, 1993 @@ -21,8 +21,8 @@ POPDIVERT ### USENET Mailer specification ### #################################### -VERSIONID(`$Id: usenet.m4,v 8.21 2000/10/26 02:08:19 ca Exp $') +VERSIONID(`$Id: usenet.m4,v 8.21.4.1 2003/03/03 22:53:03 ca Exp $') Musenet, P=USENET_MAILER_PATH, F=_MODMF_(USENET_MAILER_FLAGS, `USENET'), S=EnvFromL, R=EnvToL, - _OPTINS(`USENET_MAILER_MAX', `M=', `, ')T=X-Usenet/X-Usenet/X-Unix,USENET_MAILER_QGRP + _OPTINS(`USENET_MAILER_MAX', `M=', `, ')T=X-Usenet/X-Usenet/X-Unix,_USENET_QGRP A=USENET_MAILER_ARGS $u diff --git a/contrib/sendmail/contrib/buildvirtuser b/contrib/sendmail/contrib/buildvirtuser index dcf6d4424452..8c0aa44777aa 100755 --- a/contrib/sendmail/contrib/buildvirtuser +++ b/contrib/sendmail/contrib/buildvirtuser @@ -1,6 +1,6 @@ #!/usr/bin/perl -w -# Copyright (c) 1999-2002 Gregory Neil Shapiro. All Rights Reserved. +# Copyright (c) 1999-2003 Gregory Neil Shapiro. All Rights Reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions @@ -27,7 +27,7 @@ # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. -# $Id: buildvirtuser,v 1.5 2002/02/08 08:10:59 gshapiro Exp $ +# $Id: buildvirtuser,v 1.5.2.1 2003/03/15 23:30:26 gshapiro Exp $ =head1 NAME @@ -35,7 +35,7 @@ buildvirtuser - Build virtusertable support from a directory of files =head1 SYNOPSIS - buildvirtuser [-f] + buildvirtuser [-f] [-t] =head1 DESCRIPTION @@ -53,6 +53,9 @@ the left hand side. The -f option forces the database to be rebuilt regardless of whether any file changes were detected. +The -t option instructs the program to build a text file instead of a +database. The text file can then be used with makemap. + =head1 CONFIGURATION In order to function properly, sendmail must be configured to use these @@ -114,7 +117,13 @@ my $newest = 0; my ($lhs, $domain, $key, $value); my $opts = {}; -getopts('f', $opts) || die "Usage: $0 [-f]\n"; +getopts('ft', $opts) || die "Usage: $0 [-f] [-t]\n"; + +if ($opts->{t}) +{ + $newvirt = "$maildir/virtusertable.new"; + $virt = "$maildir/virtusertable"; +} opendir(VIRTS, $virts) || die "Could not open directory $virts: $!\n"; my @virts = grep { -f "$virts/$_" } readdir(VIRTS); @@ -168,7 +177,15 @@ if ($opts->{f} || $virtmtime < $newest) { print STDOUT "Rebuilding $virt\n"; # logger -s -t ${prog} -p mail.info "Rebuilding ${basedir}/virtusertable" - open(MAKEMAP, "|$makemap $dbtype $newvirt") || die "Could not start makemap: $!\n"; + if ($opts->{t}) + { + open(MAKEMAP, ">$newvirt") || die "Could not open $newvirt: $!\n"; + } + else + { + open(MAKEMAP, "|$makemap $dbtype $newvirt") || die "Could not start makemap: $!\n"; + } + foreach $key (keys %virt) { print MAKEMAP "$key\t\t$virt{$key}\n"; diff --git a/contrib/sendmail/doc/op/op.me b/contrib/sendmail/doc/op/op.me index ca967b2a8c03..6f49c9758f82 100644 --- a/contrib/sendmail/doc/op/op.me +++ b/contrib/sendmail/doc/op/op.me @@ -9,7 +9,7 @@ .\" the sendmail distribution. .\" .\" -.\" $Id: op.me,v 8.609.2.20 2003/01/15 19:17:16 ca Exp $ +.\" $Id: op.me,v 8.609.2.23 2003/03/28 05:51:16 ca Exp $ .\" .\" eqn op.me | pic | troff -me .\" @@ -90,7 +90,7 @@ Sendmail, Inc. .de Ve Version \\$2 .. -.Ve $Revision: 8.609.2.20 $ +.Ve $Revision: 8.609.2.23 $ .rm Ve .sp For Sendmail Version 8.12 @@ -6292,7 +6292,7 @@ Addr Address mask (defaults INADDR_ANY) Family Address family (defaults to INET) SndBufSize Size of TCP send buffer RcvBufSize Size of TCP receive buffer -Modifier Options (flags) for the daemon +Modifier Options (flags) for the client .)b The .i Addr ess @@ -7012,6 +7012,10 @@ Defaults to 25. Specify the maximum message size to be advertised in the ESMTP EHLO response. Messages larger than this will be rejected. +If set to a value greater than zero, +that value will be listed in the SIZE response, +otherwise SIZE is advertised in the ESMTP EHLO response +without a parameter. .ip MaxMimeHeaderLength=\fIN[/M]\fP [no short name] Sets the maximum length of certain MIME header field values to @@ -7029,7 +7033,8 @@ is not specified, one half of .i N will be used. By default, -these values are 0, meaning no checks are done. +these values are 2048 and 1024, respectively. +To allow any length, a value of 0 can be specified. .ip MaxQueueChildren=\fIN\fP [no short name] When set, this limits the number of concurrent queue runner processes to @@ -8954,6 +8959,10 @@ Reject connection if filter unavailable. .ip T Temporary fail connection if filter unavailable. .pp +If neither F=R nor F=T is specified, the message is passed through +.i sendmail +in case of filter errors as if the failing filters were not present. +.pp The timeouts can be set using the four fields inside of the .b T= equate: @@ -10755,7 +10764,7 @@ replace it with a blank sheet for double-sided output. .\".sz 10 .\"Eric Allman .\".sp -.\"Version $Revision: 8.609.2.20 $ +.\"Version $Revision: 8.609.2.23 $ .\".ce 0 .bp 3 .ce diff --git a/contrib/sendmail/editmap/editmap.8 b/contrib/sendmail/editmap/editmap.8 index 9b450c5b242d..deb2f672ec8e 100644 --- a/contrib/sendmail/editmap/editmap.8 +++ b/contrib/sendmail/editmap/editmap.8 @@ -6,9 +6,9 @@ .\" the sendmail distribution. .\" .\" -.\" $Id: editmap.8,v 1.8 2001/06/15 21:33:19 ca Exp $ +.\" $Id: editmap.8,v 1.8.4.1 2003/03/15 23:38:57 gshapiro Exp $ .\" -.TH EDITMAP 8 "$Date: 2001/06/15 21:33:19 $" +.TH EDITMAP 8 "$Date: 2003/03/15 23:38:57 $" .SH NAME .B editmap \- query and edit single records in database maps for sendmail @@ -23,7 +23,7 @@ maptype mapname key [ "value ..." ] .SH DESCRIPTION .B Editmap -queries or edits one record in a database maps used by the keyed map lookups in +queries or edits one record in database maps used by the keyed map lookups in sendmail(8). Arguments are passed on the command line and output (for queries) is directed to standard output. diff --git a/contrib/sendmail/include/sm/bdb.h b/contrib/sendmail/include/sm/bdb.h index 34b6f7bb4dcf..453eaa706c5e 100644 --- a/contrib/sendmail/include/sm/bdb.h +++ b/contrib/sendmail/include/sm/bdb.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002 Sendmail, Inc. and its suppliers. + * Copyright (c) 2002, 2003 Sendmail, Inc. and its suppliers. * All rights reserved. * * By using this file, you agree to the terms and conditions set @@ -7,7 +7,7 @@ * the sendmail distribution. * * - * $Id: bdb.h,v 1.1.2.3 2002/12/05 05:07:44 ca Exp $ + * $Id: bdb.h,v 1.1.2.4 2003/03/06 16:27:38 ca Exp $ */ #ifndef SM_BDB_H @@ -35,11 +35,11 @@ # else /* DB_VERSION_MAJOR >= 4 && DB_VERSION_MINOR >= 1 */ # define DBTXN -# if !HASFLOCK +# if !HASFLOCK && defined(DB_FCNTL_LOCKING) # define SM_DB_FLAG_ADD(flag) (flag) |= DB_FCNTL_LOCKING -# else /* !HASFLOCK */ +# else /* !HASFLOCK && defined(DB_FCNTL_LOCKING) */ # define SM_DB_FLAG_ADD(flag) ((void) 0) -# endif /* !HASFLOCK */ +# endif /* !HASFLOCK && defined(DB_FCNTL_LOCKING) */ # endif /* DB_VERSION_MAJOR >= 4 && DB_VERSION_MINOR >= 1 */ #endif /* NEWDB */ diff --git a/contrib/sendmail/include/sm/conf.h b/contrib/sendmail/include/sm/conf.h index c76ab0f0c5ba..b3863f14a524 100644 --- a/contrib/sendmail/include/sm/conf.h +++ b/contrib/sendmail/include/sm/conf.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998-2002 Sendmail, Inc. and its suppliers. + * Copyright (c) 1998-2003 Sendmail, Inc. and its suppliers. * All rights reserved. * Copyright (c) 1983, 1995-1997 Eric P. Allman. All rights reserved. * Copyright (c) 1988, 1993 @@ -10,7 +10,7 @@ * the sendmail distribution. * * - * $Id: conf.h,v 1.90.2.13 2002/12/10 03:08:56 ca Exp $ + * $Id: conf.h,v 1.90.2.14 2003/03/06 18:38:06 ca Exp $ */ /* @@ -1326,6 +1326,7 @@ extern void *malloc(); # ifndef USESETEUID # define USESETEUID 0 /* has it due to POSIX, but doesn't work */ # endif /* USESETEUID */ +# define SM_CONF_GETOPT 0 /* need a replacement for getopt(3) */ # define HASUNAME 1 /* use System V uname(2) system call */ # define HASUNSETENV 1 /* has unsetenv(3) call */ # define ERRLIST_PREDEFINED /* don't declare sys_errlist */ diff --git a/contrib/sendmail/libmilter/docs/api.html b/contrib/sendmail/libmilter/docs/api.html index af714efd3097..936abed0d0db 100644 --- a/contrib/sendmail/libmilter/docs/api.html +++ b/contrib/sendmail/libmilter/docs/api.html @@ -184,11 +184,11 @@ other callbacks are message-oriented.