]> git.ipfire.org Git - thirdparty/postfix.git/commitdiff
postfix-2.11-20131210-nonprod 20131210-nonprod
authorWietse Venema <wietse@porcupine.org>
Tue, 10 Dec 2013 05:00:00 +0000 (00:00 -0500)
committerViktor Dukhovni <postfix-users@dukhovni.org>
Wed, 11 Dec 2013 17:29:02 +0000 (12:29 -0500)
17 files changed:
postfix/HISTORY
postfix/README_FILES/TLS_README
postfix/html/TLS_README.html
postfix/html/lmdb_table.5.html
postfix/html/postconf.5.html
postfix/man/man5/lmdb_table.5
postfix/man/man5/postconf.5
postfix/proto/TLS_README.html
postfix/proto/lmdb_table
postfix/proto/postconf.proto
postfix/src/global/Makefile.in
postfix/src/global/mail_version.h
postfix/src/global/safe_ultostr.c
postfix/src/global/safe_ultostr.in [new file with mode: 0644]
postfix/src/global/safe_ultostr.ref [new file with mode: 0644]
postfix/src/postconf/postconf_edit.c
postfix/src/tls/tls_dane.c

index 396760acbbbe0eb5e47104add217e0298404b45f..53f08e97112c7b40d97033b0c6b1bfb1743887c5 100644 (file)
@@ -19316,3 +19316,21 @@ Apologies for any names omitted.
        src/smtp/smtp_tls_policy.c src/tls/tls_dane.c
        src/posttls-finger/posttls-finger.c.
 
+20131209
+
+       Cleanup: safe_strtoul() did not report an error for empty
+       or all-space input (the code to report this was in the wrong
+       place). This was not a problem as long as safe_strtoul()
+       was used only for output from safe_ultostr().  Files:
+       global/safe_ultostr.c, global/safe_ultostr.in,
+       global/safe_ultostr.ref.
+
+20131210
+
+       Documentation: updated description of SSL protocol controls.
+       In particular, emabled protocols are psrt of a contiguous
+       range. Viktor Dukhovni.  Files: proto/TLS_README.html,
+       proto/postconf.proto.
+
+       Bugfix (DANE support): handle OpenSSL memory allocation
+       error. Viktor Dukhovni.  File: tls/tls_dane.c.
index 2d07f9a999e2d1b9b19f5f92a797cec47a83c985..552279f728368a4b7db7f43b232ed50ad0968e7a 100644 (file)
@@ -412,7 +412,7 @@ from scratch.
 
 Since Postfix uses multiple smtpd(8) service processes, an in-memory cache is
 not sufficient for session re-use. Clients store at most one cached session per
-server and are very unlikey to repeatedly connect to the same server process.
+server and are very unlikely to repeatedly connect to the same server process.
 Thus session caching in the Postfix SMTP server generally requires a shared
 cache (an alternative available with Postfix >= 2.11 is described below).
 
@@ -617,9 +617,9 @@ ciphers:
         smtpd_tls_mandatory_ciphers = high
         smtpd_tls_mandatory_exclude_ciphers = aNULL, MD5
         smtpd_tls_security_level = encrypt
-        # Postfix >= 2.5:
+        # Preferred syntax with Postfix >= 2.5:
         smtpd_tls_mandatory_protocols = !SSLv2, !SSLv3
-        # Legacy form with Postfix prior to 2.5:
+        # Legacy syntax:
         smtpd_tls_mandatory_protocols = TLSv1
 
 If you want to take advantage of ciphers with ephemeral Diffie-Hellman (EDH)
@@ -931,7 +931,7 @@ not look for TLSA records associated with MX hosts whose "A" or "AAAA" records
 lie in an "insecure" DNS zone. Such lookups have been observed to cause
 interoperability issues with poorly implemented DNS servers, and are in any
 case not expected to ever yield "secure" results, since that would require a
-very unlikey DLV DNS trust anchor configured between the host record and the
+very unlikely DLV DNS trust anchor configured between the host record and the
 associated "_25._tcp" child TLSA record.
 
 The "dane-only" level is a form of secure-channel TLS based on the DANE PKI. If
index fd14e88b60c2bade644484e2855b6ef5dafc2924..cd75ee8ab0ebbac9d0f9406591785f7bb19f27a9 100644 (file)
@@ -607,7 +607,7 @@ from scratch.  </p>
 
 <p> Since Postfix uses multiple <a href="smtpd.8.html">smtpd(8)</a> service processes, an
 in-memory cache is not sufficient for session re-use.  Clients store
-at most one cached session per server and are very unlikey to
+at most one cached session per server and are very unlikely to
 repeatedly connect to the same server process.  Thus session caching
 in the Postfix SMTP server generally requires a shared cache (an
 alternative available with Postfix &ge; 2.11 is described below).
@@ -865,9 +865,9 @@ with high grade ciphers: </p>
     <a href="postconf.5.html#smtpd_tls_mandatory_ciphers">smtpd_tls_mandatory_ciphers</a> = high
     <a href="postconf.5.html#smtpd_tls_mandatory_exclude_ciphers">smtpd_tls_mandatory_exclude_ciphers</a> = aNULL, MD5
     <a href="postconf.5.html#smtpd_tls_security_level">smtpd_tls_security_level</a> = encrypt
-    # Postfix &ge; 2.5:
+    # Preferred syntax with Postfix &ge; 2.5:
     <a href="postconf.5.html#smtpd_tls_mandatory_protocols">smtpd_tls_mandatory_protocols</a> = !SSLv2, !SSLv3
-    # Legacy form with Postfix prior to 2.5:
+    # Legacy syntax:
     <a href="postconf.5.html#smtpd_tls_mandatory_protocols">smtpd_tls_mandatory_protocols</a> = TLSv1
 </pre>
 </blockquote>
@@ -1266,7 +1266,7 @@ with MX hosts whose "A" or "AAAA" records lie in an "insecure" DNS
 zone.  Such lookups have been observed to cause interoperability
 issues with poorly implemented DNS servers, and are in any case not
 expected to ever yield "secure" results, since that would require
-a very unlikey DLV DNS trust anchor configured between the host
+a very unlikely DLV DNS trust anchor configured between the host
 record and the associated "_25._tcp" child TLSA record. </p>
 
 <p> The "dane-only" level is a form of <a
index 6cba132a5fe74caf736bcf223e843c4c4e30c1c5..52075553fd2fe5f73dd6c04b7d7019ff0dcd1fdd 100644 (file)
@@ -34,16 +34,16 @@ LMDB_TABLE(5)                                                    LMDB_TABLE(5)
        When  a  transaction fails due to a full database, Postfix
        resizes the database and retries the transaction.
 
-       Postfix access, address mapping and  routing  tables  will
-       generate  partial search keys such as domain names without
-       one or more subdomains, network addresses without  one  or
-       more  least-significant octets, or email addresses without
-       the localpart, address extension or domain portion.   This
-       behavior  is  also  found  with  <a href="DATABASE_README.html#types">btree</a>:,  <a href="DATABASE_README.html#types">hash</a>:,  or <a href="ldap_table.5.html">ldap</a>:
-       tables.
+       Postfix access, address mapping and routing table  lookups
+       may  generate  partial  search  keys  such as domain names
+       without one or more subdomains, network addresses  without
+       one  or  more least-significant octets, or email addresses
+       without the localpart, address extension  or  domain  por-
+       tion.   This behavior is also found with <a href="DATABASE_README.html#types">btree</a>:, <a href="DATABASE_README.html#types">hash</a>:, or
+       <a href="ldap_table.5.html">ldap</a>: tables.
 
        Unlike other flat-file based Postfix databases, changes to
-       an  LMDB  database do not require automatic daemon program
+       an  LMDB  database do not trigger automatic daemon program
        restart.
 
 <b>RELIABILITY</b>
index 2d5bc198454d15d2b6c78069acc29e07b7502651..44edbb94f77e51ce521549ca0350eeb79e33384a 100644 (file)
@@ -11479,20 +11479,47 @@ whitespace, commas or colons. In the policy table "protocols" attribute
 empty value means allow all protocols. The valid protocol names, (see
 <b>SSL_get_version(3)</b>), are "SSLv2", "SSLv3" and "TLSv1". </p>
 
-<p> Note: As of OpenSSL 1.0.1 two new protocols are defined, "TLSv1.1"
-and "TLSv1.2". If an older Postfix version is linked against OpenSSL
-1.0.1 or later, these, or any other new protocol versions, are
-unconditionally enabled. </p>
-
-<p> With Postfix &ge; 2.5 the parameter syntax is expanded to support
-protocol exclusions. One can now explicitly exclude SSLv2 by setting
-"<a href="postconf.5.html#smtp_tls_mandatory_protocols">smtp_tls_mandatory_protocols</a> = !SSLv2". To exclude both SSLv2 and
-SSLv3 set "<a href="postconf.5.html#smtp_tls_mandatory_protocols">smtp_tls_mandatory_protocols</a> = !SSLv2, !SSLv3". Listing
+<p> With Postfix &ge; 2.5 the parameter syntax was expanded to support
+protocol exclusions. One can explicitly exclude "SSLv2" by setting
+"<a href="postconf.5.html#smtp_tls_mandatory_protocols">smtp_tls_mandatory_protocols</a> = !SSLv2". To exclude both "SSLv2" and
+"SSLv3" set "<a href="postconf.5.html#smtp_tls_mandatory_protocols">smtp_tls_mandatory_protocols</a> = !SSLv2, !SSLv3". Listing
 the protocols to include, rather than protocols to exclude, is
 supported, but not recommended. The exclusion form more closely
-matches the behavior when the OpenSSL library is newer than Postfix.
+matches the underlying OpenSSL interface semantics.
 </p>
 
+<p> The range of protocols advertised by an SSL/TLS client must be
+contiguous.  When a protocol version is enabled, disabling any
+higher version implicitly disables all versions above that higher
+version.  Thus, for example: </p>
+<blockquote>
+<pre>
+<a href="postconf.5.html#smtp_tls_mandatory_protocols">smtp_tls_mandatory_protocols</a> = !SSLv2, !TLSv1
+</pre>
+</blockquote>
+<p> also disables any protocols version higher than TLSv1 leaving
+only "SSLv3" enabled.  </p>
+
+<p> Note: As of OpenSSL 1.0.1 two new protocols are defined, "TLSv1.1"
+and "TLSv1.2". When Postfix &le; 2.5 is linked against OpenSSL 1.0.1
+or later, these, or any other new protocol versions, cannot be
+disabled except by also disabling "TLSv1" (typically leaving just
+"SSLv3").  The latest patch levels of Postfix &ge; 2.6, and all
+versions of Postfix &ge; 2.10 can explicitly disable support for
+"TLSv1.1" or "TLSv1.2". </p>
+
+<p> At the <a href="TLS_README.html#client_tls_dane">dane</a> and
+<a href="TLS_README.html#client_tls_dane">dane-only</a> security
+levels, when usable TLSA records are obtained for the remote SMTP
+server, the Postfix SMTP client is obligated to include the SNI TLS
+extension in its SSL client hello message.  This may help the remote
+SMTP server live up to its promise to provide a certificate that
+matches its TLSA records.  Since TLS extensions require TLS 1.0 or
+later, the Postfix SMTP client must disable "SSLv2" and "SSLv3" when
+SNI is required.  If you use "dane" or "dane-only" do not disable
+TLSv1, except perhaps via the policy table for destinations which
+you are sure will support "TLSv1.1" or "TLSv1.2".  </p>
+
 <p> Since SSL version 2 has known protocol weaknesses and is now
 deprecated, the default setting excludes "SSLv2".  This means that by
 default, SSL version 2 will not be used at the "encrypt" security level
@@ -11504,9 +11531,9 @@ and higher. </p>
 <p> Example: </p>
 
 <pre>
-# Preferred form with Postfix &ge; 2.5:
+# Preferred syntax with Postfix &ge; 2.5:
 <a href="postconf.5.html#smtp_tls_mandatory_protocols">smtp_tls_mandatory_protocols</a> = !SSLv2, !SSLv3
-# Legacy form with Postfix &lt; 2.5:
+# Legacy syntax:
 <a href="postconf.5.html#smtp_tls_mandatory_protocols">smtp_tls_mandatory_protocols</a> = TLSv1
 </pre>
 
@@ -11789,18 +11816,30 @@ separator is colon. An empty value means allow all protocols. The valid
 protocol names, (see <b>SSL_get_version(3)</b>), are "SSLv2", "SSLv3"
 and "TLSv1". </p>
 
+<p> The range of protocols advertised by an SSL/TLS client must be
+contiguous.  When a protocol version is enabled, disabling any
+higher version implicitly disables all versions above that higher
+version.  Thus, for example: </p>
+<blockquote>
+<pre>
+<a href="postconf.5.html#smtp_tls_mandatory_protocols">smtp_tls_mandatory_protocols</a> = !SSLv2, !TLSv1
+</pre>
+</blockquote>
+<p> also disables any protocols version higher than TLSv1 leaving
+only "SSLv3" enabled.  </p>
+
 <p> Note: As of OpenSSL 1.0.1 two new protocols are defined, "TLSv1.1"
-and "TLSv1.2". If an older Postfix version is linked against OpenSSL
-1.0.1 or later, these, or any other new protocol versions, are
-unconditionally enabled. </p>
+and "TLSv1.2". The latest patch levels of Postfix &ge; 2.6, and all
+versions of Postfix &ge; 2.10 can explicitly disable support for
+"TLSv1.1" or "TLSv1.2"</p>
 
 <p> To include a protocol list its name, to exclude it, prefix the name
 with a "!" character. To exclude SSLv2 even for opportunistic TLS set
 "<a href="postconf.5.html#smtp_tls_protocols">smtp_tls_protocols</a> = !SSLv2". To exclude both "SSLv2" and "SSLv3" set
 "<a href="postconf.5.html#smtp_tls_protocols">smtp_tls_protocols</a> = !SSLv2, !SSLv3". Explicitly listing the protocols to
 include, rather than protocols to exclude, is supported, but not
-recommended.  The exclusion form more closely matches the behavior
-when the OpenSSL library is newer than Postfix.  </p>
+recommended.  The exclusion form more closely matches the underlying
+OpenSSL interface semantics. </p>
 
 <p> Example: </p>
 <pre>
@@ -15600,19 +15639,20 @@ list of protocol names separated by whitespace, commas or colons.
 The supported protocol names are "SSLv2", "SSLv3" and "TLSv1", and
 are not case sensitive. </p>
 
-<p> Note: As of OpenSSL 1.0.1 two new protocols are defined, "TLSv1.1"
-and "TLSv1.2". If an older Postfix version is linked against OpenSSL
-1.0.1 or later, these, or any other new protocol versions, are
-unconditionally enabled. </p>
-
-<p> With Postfix &ge; 2.5 the parameter syntax is expanded to support
-protocol exclusions. One can now explicitly exclude SSLv2 by setting
-"<a href="postconf.5.html#smtpd_tls_mandatory_protocols">smtpd_tls_mandatory_protocols</a> = !SSLv2". To exclude both SSLv2 and
-SSLv3 set "<a href="postconf.5.html#smtpd_tls_mandatory_protocols">smtpd_tls_mandatory_protocols</a> = !SSLv2, !SSLv3". Listing
+<p> With Postfix &ge; 2.5 the parameter syntax was expanded to support
+protocol exclusions. One can explicitly exclude "SSLv2" by setting
+"<a href="postconf.5.html#smtpd_tls_mandatory_protocols">smtpd_tls_mandatory_protocols</a> = !SSLv2". To exclude both "SSLv2" and
+"SSLv3" set "<a href="postconf.5.html#smtpd_tls_mandatory_protocols">smtpd_tls_mandatory_protocols</a> = !SSLv2, !SSLv3". Listing
 the protocols to include, rather than protocols to exclude, is
 supported, but not recommended. The exclusion form more closely
-matches the behavior when the OpenSSL library is newer than Postfix.
-</p>
+matches the underlying OpenSSL interface semantics.  </p>
+
+<p> Note: As of OpenSSL 1.0.1 two new protocols are defined, "TLSv1.1"
+and "TLSv1.2". When Postfix &le; 2.5 is linked against OpenSSL 1.0.1
+or later, these, or any other new protocol versions, cannot be
+disabled.  The latest patch levels of Postfix &ge; 2.6, and all
+versions of Postfix &ge; 2.10 can disable support for "TLSv1.1" or
+"TLSv1.2". </p>
 
 <p> Since SSL version 2 has known protocol weaknesses and is now
 deprecated, the default setting excludes "SSLv2".  This means that
@@ -15622,8 +15662,9 @@ level. </p>
 <p> Example: </p>
 
 <pre>
+# Preferred syntax with Postfix &ge; 2.5:
 <a href="postconf.5.html#smtpd_tls_mandatory_protocols">smtpd_tls_mandatory_protocols</a> = !SSLv2, !SSLv3
-# Legacy form with Postfix &lt; 2.5:
+# Legacy syntax:
 <a href="postconf.5.html#smtpd_tls_mandatory_protocols">smtpd_tls_mandatory_protocols</a> = TLSv1
 </pre>
 
@@ -15636,28 +15677,25 @@ level. </p>
 (default: empty)</b></DT><DD>
 
 <p> List of TLS protocols that the Postfix SMTP server will exclude
-or include with opportunistic TLS encryption. This parameter SHOULD be
-left at its default empty value, allowing all protocols to be used with
-opportunistic TLS. </p>
-
-<p> In <a href="postconf.5.html">main.cf</a> the values are separated by whitespace, commas or
-colons. An empty value means allow all protocols. The valid protocol
-names, (see <b>SSL_get_version(3)</b>), are "SSLv2", "SSLv3" and
-"TLSv1". In <a href="postconf.5.html#smtp_tls_policy_maps">smtp_tls_policy_maps</a> table entries, "protocols" attribute
-values are separated by a colon. </p>
+or include with opportunistic TLS encryption. This parameter SHOULD
+be left at its default empty value, allowing all protocols to be
+used with opportunistic TLS.  A non-empty value is a list of protocol
+names separated by whitespace, commas or colons.  The supported
+protocol names are "SSLv2", "SSLv3" and "TLSv1", and are not case
+sensitive. </p>
 
 <p> Note: As of OpenSSL 1.0.1 two new protocols are defined, "TLSv1.1"
-and "TLSv1.2". If an older Postfix version is linked against OpenSSL
-1.0.1 or later, these, or any other new protocol versions, are
-unconditionally enabled. </p>
+and "TLSv1.2". The latest patch levels of Postfix &ge; 2.6, and all
+versions of Postfix &ge; 2.10 can disable support for "TLSv1.1" or
+"TLSv1.2". </p>
 
 <p> To include a protocol list its name, to exclude it, prefix the name
 with a "!" character. To exclude SSLv2 even for opportunistic TLS set
 "<a href="postconf.5.html#smtpd_tls_protocols">smtpd_tls_protocols</a> = !SSLv2". To exclude both "SSLv2" and "SSLv3" set
 "<a href="postconf.5.html#smtpd_tls_protocols">smtpd_tls_protocols</a> = !SSLv2, !SSLv3". Explicitly listing the protocols to
 include, rather than protocols to exclude, is supported, but not
-recommended.  The exclusion form more closely matches the behavior
-when the OpenSSL library is newer than Postfix.  </p>
+recommended.  The exclusion form more closely matches the underlying
+OpenSSL interface semantics. </p>
 
 <p> Example: </p>
 <pre>
@@ -16215,8 +16253,8 @@ is not recommended.  </dd>
 <dd> From each group of well-formed TLSA RRs a non-zero digest
 matching type with the same certificate usage and selector, DANE
 verification examines only those records whose matching type has
-the highest precedence (appear earliest in $<a href="postconf.5.html#tls_dane_digests">tls_dane_digests</a>) are
-considered.  </dd>
+the highest precedence (appear earliest in $<a href="postconf.5.html#tls_dane_digests">tls_dane_digests</a>).
+</dd>
 
 <dt><b>maybe</b></dt>
 <dd> For compatibility with digest algorithm agility, each certificate
index d6315bd715d320b4073bd6e0791d0938d4478903..45b9a4441d97f00a63809ef2cb893405d6255a0a 100644 (file)
@@ -38,8 +38,8 @@ can be stored under a fixed lookup key.
 When a transaction fails due to a full database, Postfix
 resizes the database and retries the transaction.
 
-Postfix access, address mapping and routing tables will
-generate partial search keys such as domain names without
+Postfix access, address mapping and routing table lookups
+may generate partial search keys such as domain names without
 one or more subdomains, network addresses without one or
 more least-significant octets, or email addresses without
 the localpart, address extension or domain portion.
@@ -47,7 +47,7 @@ This behavior is also found with btree:, hash:, or ldap:
 tables.
 
 Unlike other flat-file based Postfix databases, changes to
-an LMDB database do not require automatic daemon program
+an LMDB database do not trigger automatic daemon program
 restart.
 .SH "RELIABILITY"
 .na
index c68d90bc21daaf6a2d2ca83bc649ddc606aff84a..b989d556a9477c0bf1ea714c88c6108ecc3cb761 100644 (file)
@@ -7220,18 +7220,50 @@ whitespace, commas or colons. In the policy table "protocols" attribute
 empty value means allow all protocols. The valid protocol names, (see
 \\fBfBSSL_get_version\fR(3)\fR), are "SSLv2", "SSLv3" and "TLSv1".
 .PP
-Note: As of OpenSSL 1.0.1 two new protocols are defined, "TLSv1.1"
-and "TLSv1.2". If an older Postfix version is linked against OpenSSL
-1.0.1 or later, these, or any other new protocol versions, are
-unconditionally enabled.
-.PP
-With Postfix >= 2.5 the parameter syntax is expanded to support
-protocol exclusions. One can now explicitly exclude SSLv2 by setting
-"smtp_tls_mandatory_protocols = !SSLv2". To exclude both SSLv2 and
-SSLv3 set "smtp_tls_mandatory_protocols = !SSLv2, !SSLv3". Listing
+With Postfix >= 2.5 the parameter syntax was expanded to support
+protocol exclusions. One can explicitly exclude "SSLv2" by setting
+"smtp_tls_mandatory_protocols = !SSLv2". To exclude both "SSLv2" and
+"SSLv3" set "smtp_tls_mandatory_protocols = !SSLv2, !SSLv3". Listing
 the protocols to include, rather than protocols to exclude, is
 supported, but not recommended. The exclusion form more closely
-matches the behavior when the OpenSSL library is newer than Postfix.
+matches the underlying OpenSSL interface semantics.
+.PP
+The range of protocols advertised by an SSL/TLS client must be
+contiguous.  When a protocol version is enabled, disabling any
+higher version implicitly disables all versions above that higher
+version.  Thus, for example:
+.sp
+.in +4
+.nf
+.na
+.ft C
+smtp_tls_mandatory_protocols = !SSLv2, !TLSv1
+.fi
+.ad
+.ft R
+.in -4
+also disables any protocols version higher than TLSv1 leaving
+only "SSLv3" enabled.
+.PP
+Note: As of OpenSSL 1.0.1 two new protocols are defined, "TLSv1.1"
+and "TLSv1.2". When Postfix <= 2.5 is linked against OpenSSL 1.0.1
+or later, these, or any other new protocol versions, cannot be
+disabled except by also disabling "TLSv1" (typically leaving just
+"SSLv3").  The latest patch levels of Postfix >= 2.6, and all
+versions of Postfix >= 2.10 can explicitly disable support for
+"TLSv1.1" or "TLSv1.2".
+.PP
+At the dane and
+dane-only security
+levels, when usable TLSA records are obtained for the remote SMTP
+server, the Postfix SMTP client is obligated to include the SNI TLS
+extension in its SSL client hello message.  This may help the remote
+SMTP server live up to its promise to provide a certificate that
+matches its TLSA records.  Since TLS extensions require TLS 1.0 or
+later, the Postfix SMTP client must disable "SSLv2" and "SSLv3" when
+SNI is required.  If you use "dane" or "dane-only" do not disable
+TLSv1, except perhaps via the policy table for destinations which
+you are sure will support "TLSv1.1" or "TLSv1.2".
 .PP
 Since SSL version 2 has known protocol weaknesses and is now
 deprecated, the default setting excludes "SSLv2".  This means that by
@@ -7246,9 +7278,9 @@ Example:
 .nf
 .na
 .ft C
-# Preferred form with Postfix >= 2.5:
+# Preferred syntax with Postfix >= 2.5:
 smtp_tls_mandatory_protocols = !SSLv2, !SSLv3
-# Legacy form with Postfix < 2.5:
+# Legacy syntax:
 smtp_tls_mandatory_protocols = TLSv1
 .fi
 .ad
@@ -7514,18 +7546,35 @@ separator is colon. An empty value means allow all protocols. The valid
 protocol names, (see \\fBfBSSL_get_version\fR(3)\fR), are "SSLv2", "SSLv3"
 and "TLSv1".
 .PP
+The range of protocols advertised by an SSL/TLS client must be
+contiguous.  When a protocol version is enabled, disabling any
+higher version implicitly disables all versions above that higher
+version.  Thus, for example:
+.sp
+.in +4
+.nf
+.na
+.ft C
+smtp_tls_mandatory_protocols = !SSLv2, !TLSv1
+.fi
+.ad
+.ft R
+.in -4
+also disables any protocols version higher than TLSv1 leaving
+only "SSLv3" enabled.
+.PP
 Note: As of OpenSSL 1.0.1 two new protocols are defined, "TLSv1.1"
-and "TLSv1.2". If an older Postfix version is linked against OpenSSL
-1.0.1 or later, these, or any other new protocol versions, are
-unconditionally enabled.
+and "TLSv1.2". The latest patch levels of Postfix >= 2.6, and all
+versions of Postfix >= 2.10 can explicitly disable support for
+"TLSv1.1" or "TLSv1.2"
 .PP
 To include a protocol list its name, to exclude it, prefix the name
 with a "!" character. To exclude SSLv2 even for opportunistic TLS set
 "smtp_tls_protocols = !SSLv2". To exclude both "SSLv2" and "SSLv3" set
 "smtp_tls_protocols = !SSLv2, !SSLv3". Explicitly listing the protocols to
 include, rather than protocols to exclude, is supported, but not
-recommended.  The exclusion form more closely matches the behavior
-when the OpenSSL library is newer than Postfix.
+recommended.  The exclusion form more closely matches the underlying
+OpenSSL interface semantics.
 .PP
 Example:
 .nf
@@ -10583,18 +10632,20 @@ list of protocol names separated by whitespace, commas or colons.
 The supported protocol names are "SSLv2", "SSLv3" and "TLSv1", and
 are not case sensitive.
 .PP
-Note: As of OpenSSL 1.0.1 two new protocols are defined, "TLSv1.1"
-and "TLSv1.2". If an older Postfix version is linked against OpenSSL
-1.0.1 or later, these, or any other new protocol versions, are
-unconditionally enabled.
-.PP
-With Postfix >= 2.5 the parameter syntax is expanded to support
-protocol exclusions. One can now explicitly exclude SSLv2 by setting
-"smtpd_tls_mandatory_protocols = !SSLv2". To exclude both SSLv2 and
-SSLv3 set "smtpd_tls_mandatory_protocols = !SSLv2, !SSLv3". Listing
+With Postfix >= 2.5 the parameter syntax was expanded to support
+protocol exclusions. One can explicitly exclude "SSLv2" by setting
+"smtpd_tls_mandatory_protocols = !SSLv2". To exclude both "SSLv2" and
+"SSLv3" set "smtpd_tls_mandatory_protocols = !SSLv2, !SSLv3". Listing
 the protocols to include, rather than protocols to exclude, is
 supported, but not recommended. The exclusion form more closely
-matches the behavior when the OpenSSL library is newer than Postfix.
+matches the underlying OpenSSL interface semantics.
+.PP
+Note: As of OpenSSL 1.0.1 two new protocols are defined, "TLSv1.1"
+and "TLSv1.2". When Postfix <= 2.5 is linked against OpenSSL 1.0.1
+or later, these, or any other new protocol versions, cannot be
+disabled.  The latest patch levels of Postfix >= 2.6, and all
+versions of Postfix >= 2.10 can disable support for "TLSv1.1" or
+"TLSv1.2".
 .PP
 Since SSL version 2 has known protocol weaknesses and is now
 deprecated, the default setting excludes "SSLv2".  This means that
@@ -10606,8 +10657,9 @@ Example:
 .nf
 .na
 .ft C
+# Preferred syntax with Postfix >= 2.5:
 smtpd_tls_mandatory_protocols = !SSLv2, !SSLv3
-# Legacy form with Postfix < 2.5:
+# Legacy syntax:
 smtpd_tls_mandatory_protocols = TLSv1
 .fi
 .ad
@@ -10616,28 +10668,25 @@ smtpd_tls_mandatory_protocols = TLSv1
 This feature is available in Postfix 2.3 and later.
 .SH smtpd_tls_protocols (default: empty)
 List of TLS protocols that the Postfix SMTP server will exclude
-or include with opportunistic TLS encryption. This parameter SHOULD be
-left at its default empty value, allowing all protocols to be used with
-opportunistic TLS.
-.PP
-In main.cf the values are separated by whitespace, commas or
-colons. An empty value means allow all protocols. The valid protocol
-names, (see \\fBfBSSL_get_version\fR(3)\fR), are "SSLv2", "SSLv3" and
-"TLSv1". In smtp_tls_policy_maps table entries, "protocols" attribute
-values are separated by a colon.
+or include with opportunistic TLS encryption. This parameter SHOULD
+be left at its default empty value, allowing all protocols to be
+used with opportunistic TLS.  A non-empty value is a list of protocol
+names separated by whitespace, commas or colons.  The supported
+protocol names are "SSLv2", "SSLv3" and "TLSv1", and are not case
+sensitive.
 .PP
 Note: As of OpenSSL 1.0.1 two new protocols are defined, "TLSv1.1"
-and "TLSv1.2". If an older Postfix version is linked against OpenSSL
-1.0.1 or later, these, or any other new protocol versions, are
-unconditionally enabled.
+and "TLSv1.2". The latest patch levels of Postfix >= 2.6, and all
+versions of Postfix >= 2.10 can disable support for "TLSv1.1" or
+"TLSv1.2".
 .PP
 To include a protocol list its name, to exclude it, prefix the name
 with a "!" character. To exclude SSLv2 even for opportunistic TLS set
 "smtpd_tls_protocols = !SSLv2". To exclude both "SSLv2" and "SSLv3" set
 "smtpd_tls_protocols = !SSLv2, !SSLv3". Explicitly listing the protocols to
 include, rather than protocols to exclude, is supported, but not
-recommended.  The exclusion form more closely matches the behavior
-when the OpenSSL library is newer than Postfix.
+recommended.  The exclusion form more closely matches the underlying
+OpenSSL interface semantics.
 .PP
 Example:
 .nf
@@ -11002,8 +11051,7 @@ is not recommended.
 From each group of well-formed TLSA RRs a non-zero digest
 matching type with the same certificate usage and selector, DANE
 verification examines only those records whose matching type has
-the highest precedence (appear earliest in $tls_dane_digests) are
-considered.
+the highest precedence (appear earliest in $tls_dane_digests).
 .br
 .IP "\fBmaybe\fR"
 For compatibility with digest algorithm agility, each certificate
index 10527fc93620c48e91078c1e3912d332dc5d2cab..0e538d47b99501d44eebcfb3b52c8f778046c0ef 100644 (file)
@@ -607,7 +607,7 @@ from scratch.  </p>
 
 <p> Since Postfix uses multiple smtpd(8) service processes, an
 in-memory cache is not sufficient for session re-use.  Clients store
-at most one cached session per server and are very unlikey to
+at most one cached session per server and are very unlikely to
 repeatedly connect to the same server process.  Thus session caching
 in the Postfix SMTP server generally requires a shared cache (an
 alternative available with Postfix &ge; 2.11 is described below).
@@ -865,9 +865,9 @@ with high grade ciphers: </p>
     smtpd_tls_mandatory_ciphers = high
     smtpd_tls_mandatory_exclude_ciphers = aNULL, MD5
     smtpd_tls_security_level = encrypt
-    # Postfix &ge; 2.5:
+    # Preferred syntax with Postfix &ge; 2.5:
     smtpd_tls_mandatory_protocols = !SSLv2, !SSLv3
-    # Legacy form with Postfix prior to 2.5:
+    # Legacy syntax:
     smtpd_tls_mandatory_protocols = TLSv1
 </pre>
 </blockquote>
@@ -1266,7 +1266,7 @@ with MX hosts whose "A" or "AAAA" records lie in an "insecure" DNS
 zone.  Such lookups have been observed to cause interoperability
 issues with poorly implemented DNS servers, and are in any case not
 expected to ever yield "secure" results, since that would require
-a very unlikey DLV DNS trust anchor configured between the host
+a very unlikely DLV DNS trust anchor configured between the host
 record and the associated "_25._tcp" child TLSA record. </p>
 
 <p> The "dane-only" level is a form of <a
index aa59635aa2161788d2df38467d402de4e205cb23..8f2829753f3e13c6bbc7310474b102a925445d79 100644 (file)
@@ -30,8 +30,8 @@
 #      When a transaction fails due to a full database, Postfix
 #      resizes the database and retries the transaction.
 #
-#      Postfix access, address mapping and routing tables will
-#      generate partial search keys such as domain names without
+#      Postfix access, address mapping and routing table lookups
+#      may generate partial search keys such as domain names without
 #      one or more subdomains, network addresses without one or
 #      more least-significant octets, or email addresses without
 #      the localpart, address extension or domain portion.
@@ -39,7 +39,7 @@
 #      tables.
 #
 #      Unlike other flat-file based Postfix databases, changes to
-#      an LMDB database do not require automatic daemon program
+#      an LMDB database do not trigger automatic daemon program
 #      restart.
 # RELIABILITY
 # .ad
index 4b8d976d87fefd133e62fb72d48c2b1faa8e5f0c..faebacf636b9f565a26c7412797fe8b40b7b8a14 100644 (file)
@@ -10771,20 +10771,47 @@ whitespace, commas or colons. In the policy table "protocols" attribute
 empty value means allow all protocols. The valid protocol names, (see
 <b>SSL_get_version(3)</b>), are "SSLv2", "SSLv3" and "TLSv1". </p>
 
-<p> Note: As of OpenSSL 1.0.1 two new protocols are defined, "TLSv1.1"
-and "TLSv1.2". If an older Postfix version is linked against OpenSSL
-1.0.1 or later, these, or any other new protocol versions, are
-unconditionally enabled. </p>
-
-<p> With Postfix &ge; 2.5 the parameter syntax is expanded to support
-protocol exclusions. One can now explicitly exclude SSLv2 by setting
-"smtp_tls_mandatory_protocols = !SSLv2". To exclude both SSLv2 and
-SSLv3 set "smtp_tls_mandatory_protocols = !SSLv2, !SSLv3". Listing
+<p> With Postfix &ge; 2.5 the parameter syntax was expanded to support
+protocol exclusions. One can explicitly exclude "SSLv2" by setting
+"smtp_tls_mandatory_protocols = !SSLv2". To exclude both "SSLv2" and
+"SSLv3" set "smtp_tls_mandatory_protocols = !SSLv2, !SSLv3". Listing
 the protocols to include, rather than protocols to exclude, is
 supported, but not recommended. The exclusion form more closely
-matches the behavior when the OpenSSL library is newer than Postfix.
+matches the underlying OpenSSL interface semantics.
 </p>
 
+<p> The range of protocols advertised by an SSL/TLS client must be
+contiguous.  When a protocol version is enabled, disabling any
+higher version implicitly disables all versions above that higher
+version.  Thus, for example: </p>
+<blockquote>
+<pre>
+smtp_tls_mandatory_protocols = !SSLv2, !TLSv1
+</pre>
+</blockquote>
+<p> also disables any protocols version higher than TLSv1 leaving
+only "SSLv3" enabled.  </p>
+
+<p> Note: As of OpenSSL 1.0.1 two new protocols are defined, "TLSv1.1"
+and "TLSv1.2". When Postfix &le; 2.5 is linked against OpenSSL 1.0.1
+or later, these, or any other new protocol versions, cannot be
+disabled except by also disabling "TLSv1" (typically leaving just
+"SSLv3").  The latest patch levels of Postfix &ge; 2.6, and all
+versions of Postfix &ge; 2.10 can explicitly disable support for
+"TLSv1.1" or "TLSv1.2". </p>
+
+<p> At the <a href="TLS_README.html#client_tls_dane">dane</a> and
+<a href="TLS_README.html#client_tls_dane">dane-only</a> security
+levels, when usable TLSA records are obtained for the remote SMTP
+server, the Postfix SMTP client is obligated to include the SNI TLS
+extension in its SSL client hello message.  This may help the remote
+SMTP server live up to its promise to provide a certificate that
+matches its TLSA records.  Since TLS extensions require TLS 1.0 or
+later, the Postfix SMTP client must disable "SSLv2" and "SSLv3" when
+SNI is required.  If you use "dane" or "dane-only" do not disable
+TLSv1, except perhaps via the policy table for destinations which
+you are sure will support "TLSv1.1" or "TLSv1.2".  </p>
+
 <p> Since SSL version 2 has known protocol weaknesses and is now
 deprecated, the default setting excludes "SSLv2".  This means that by
 default, SSL version 2 will not be used at the "encrypt" security level
@@ -10796,9 +10823,9 @@ TLS_README for more information about security levels. </p>
 <p> Example: </p>
 
 <pre>
-# Preferred form with Postfix &ge; 2.5:
+# Preferred syntax with Postfix &ge; 2.5:
 smtp_tls_mandatory_protocols = !SSLv2, !SSLv3
-# Legacy form with Postfix &lt; 2.5:
+# Legacy syntax:
 smtp_tls_mandatory_protocols = TLSv1
 </pre>
 
@@ -10958,19 +10985,20 @@ list of protocol names separated by whitespace, commas or colons.
 The supported protocol names are "SSLv2", "SSLv3" and "TLSv1", and
 are not case sensitive. </p>
 
-<p> Note: As of OpenSSL 1.0.1 two new protocols are defined, "TLSv1.1"
-and "TLSv1.2". If an older Postfix version is linked against OpenSSL
-1.0.1 or later, these, or any other new protocol versions, are
-unconditionally enabled. </p>
-
-<p> With Postfix &ge; 2.5 the parameter syntax is expanded to support
-protocol exclusions. One can now explicitly exclude SSLv2 by setting
-"smtpd_tls_mandatory_protocols = !SSLv2". To exclude both SSLv2 and
-SSLv3 set "smtpd_tls_mandatory_protocols = !SSLv2, !SSLv3". Listing
+<p> With Postfix &ge; 2.5 the parameter syntax was expanded to support
+protocol exclusions. One can explicitly exclude "SSLv2" by setting
+"smtpd_tls_mandatory_protocols = !SSLv2". To exclude both "SSLv2" and
+"SSLv3" set "smtpd_tls_mandatory_protocols = !SSLv2, !SSLv3". Listing
 the protocols to include, rather than protocols to exclude, is
 supported, but not recommended. The exclusion form more closely
-matches the behavior when the OpenSSL library is newer than Postfix.
-</p>
+matches the underlying OpenSSL interface semantics.  </p>
+
+<p> Note: As of OpenSSL 1.0.1 two new protocols are defined, "TLSv1.1"
+and "TLSv1.2". When Postfix &le; 2.5 is linked against OpenSSL 1.0.1
+or later, these, or any other new protocol versions, cannot be
+disabled.  The latest patch levels of Postfix &ge; 2.6, and all
+versions of Postfix &ge; 2.10 can disable support for "TLSv1.1" or
+"TLSv1.2". </p>
 
 <p> Since SSL version 2 has known protocol weaknesses and is now
 deprecated, the default setting excludes "SSLv2".  This means that
@@ -10980,8 +11008,9 @@ level. </p>
 <p> Example: </p>
 
 <pre>
+# Preferred syntax with Postfix &ge; 2.5:
 smtpd_tls_mandatory_protocols = !SSLv2, !SSLv3
-# Legacy form with Postfix &lt; 2.5:
+# Legacy syntax:
 smtpd_tls_mandatory_protocols = TLSv1
 </pre>
 
@@ -12106,18 +12135,30 @@ separator is colon. An empty value means allow all protocols. The valid
 protocol names, (see <b>SSL_get_version(3)</b>), are "SSLv2", "SSLv3"
 and "TLSv1". </p>
 
+<p> The range of protocols advertised by an SSL/TLS client must be
+contiguous.  When a protocol version is enabled, disabling any
+higher version implicitly disables all versions above that higher
+version.  Thus, for example: </p>
+<blockquote>
+<pre>
+smtp_tls_mandatory_protocols = !SSLv2, !TLSv1
+</pre>
+</blockquote>
+<p> also disables any protocols version higher than TLSv1 leaving
+only "SSLv3" enabled.  </p>
+
 <p> Note: As of OpenSSL 1.0.1 two new protocols are defined, "TLSv1.1"
-and "TLSv1.2". If an older Postfix version is linked against OpenSSL
-1.0.1 or later, these, or any other new protocol versions, are
-unconditionally enabled. </p>
+and "TLSv1.2". The latest patch levels of Postfix &ge; 2.6, and all
+versions of Postfix &ge; 2.10 can explicitly disable support for
+"TLSv1.1" or "TLSv1.2"</p>
 
 <p> To include a protocol list its name, to exclude it, prefix the name
 with a "!" character. To exclude SSLv2 even for opportunistic TLS set
 "smtp_tls_protocols = !SSLv2". To exclude both "SSLv2" and "SSLv3" set
 "smtp_tls_protocols = !SSLv2, !SSLv3". Explicitly listing the protocols to
 include, rather than protocols to exclude, is supported, but not
-recommended.  The exclusion form more closely matches the behavior
-when the OpenSSL library is newer than Postfix.  </p>
+recommended.  The exclusion form more closely matches the underlying
+OpenSSL interface semantics. </p>
 
 <p> Example: </p>
 <pre>
@@ -12130,28 +12171,25 @@ smtp_tls_protocols = !SSLv2, !SSLv3
 %PARAM smtpd_tls_protocols
 
 <p> List of TLS protocols that the Postfix SMTP server will exclude
-or include with opportunistic TLS encryption. This parameter SHOULD be
-left at its default empty value, allowing all protocols to be used with
-opportunistic TLS. </p>
-
-<p> In main.cf the values are separated by whitespace, commas or
-colons. An empty value means allow all protocols. The valid protocol
-names, (see <b>SSL_get_version(3)</b>), are "SSLv2", "SSLv3" and
-"TLSv1". In smtp_tls_policy_maps table entries, "protocols" attribute
-values are separated by a colon. </p>
+or include with opportunistic TLS encryption. This parameter SHOULD
+be left at its default empty value, allowing all protocols to be
+used with opportunistic TLS.  A non-empty value is a list of protocol
+names separated by whitespace, commas or colons.  The supported
+protocol names are "SSLv2", "SSLv3" and "TLSv1", and are not case
+sensitive. </p>
 
 <p> Note: As of OpenSSL 1.0.1 two new protocols are defined, "TLSv1.1"
-and "TLSv1.2". If an older Postfix version is linked against OpenSSL
-1.0.1 or later, these, or any other new protocol versions, are
-unconditionally enabled. </p>
+and "TLSv1.2". The latest patch levels of Postfix &ge; 2.6, and all
+versions of Postfix &ge; 2.10 can disable support for "TLSv1.1" or
+"TLSv1.2". </p>
 
 <p> To include a protocol list its name, to exclude it, prefix the name
 with a "!" character. To exclude SSLv2 even for opportunistic TLS set
 "smtpd_tls_protocols = !SSLv2". To exclude both "SSLv2" and "SSLv3" set
 "smtpd_tls_protocols = !SSLv2, !SSLv3". Explicitly listing the protocols to
 include, rather than protocols to exclude, is supported, but not
-recommended.  The exclusion form more closely matches the behavior
-when the OpenSSL library is newer than Postfix.  </p>
+recommended.  The exclusion form more closely matches the underlying
+OpenSSL interface semantics. </p>
 
 <p> Example: </p>
 <pre>
@@ -15433,8 +15471,8 @@ is not recommended.  </dd>
 <dd> From each group of well-formed TLSA RRs a non-zero digest
 matching type with the same certificate usage and selector, DANE
 verification examines only those records whose matching type has
-the highest precedence (appear earliest in $tls_dane_digests) are
-considered.  </dd>
+the highest precedence (appear earliest in $tls_dane_digests).
+</dd>
 
 <dt><b>maybe</b></dt>
 <dd> For compatibility with digest algorithm agility, each certificate
index d85eabdce71d87edd157881d714019e73eb9296c..f008a0d073f2d86ef5b4520519af8309ce38efeb 100644 (file)
@@ -312,6 +312,7 @@ tests: tok822_test mime_tests strip_addr_test tok822_limit_test \
        xtext_test scache_multi_test ehlo_mask_test \
        namadr_list_test mail_conf_time_test header_body_checks_tests \
        mail_version_test server_acl_test resolve_local_test maps_test
+       safe_ultostr_test
 
 mime_tests: mime_test mime_nest mime_8bit mime_dom mime_trunc mime_cvt \
        mime_cvt2 mime_cvt3 mime_garb1 mime_garb2 mime_garb3 mime_garb4
@@ -516,6 +517,11 @@ mail_conf_time_test: mail_conf_time mail_conf_time.ref
        diff mail_conf_time.ref mail_conf_time.tmp
        rm -f mail_conf_time.tmp
 
+safe_ultostr_test: safe_ultostr safe_ultostr.in safe_ultostr.ref
+       ./safe_ultostr <safe_ultostr.in >safe_ultostr.tmp 2>&1
+       diff safe_ultostr.ref safe_ultostr.tmp
+       rm -f safe_ultostr.tmp
+
 header_body_checks_null_test: header_body_checks header_body_checks_null.ref
        ./header_body_checks "" "" "" "" \
                <mime_test.in >header_body_checks_null.tmp 2>&1
index f5154456c672a83592b41b64ab58e0e7033c4802..32071c698d5eaf22da8695efaf79b4a6745a0306 100644 (file)
@@ -20,7 +20,7 @@
   * Patches change both the patchlevel and the release date. Snapshots have no
   * patchlevel; they change the release date only.
   */
-#define MAIL_RELEASE_DATE      "20131208"
+#define MAIL_RELEASE_DATE      "20131210"
 #define MAIL_VERSION_NUMBER    "2.11"
 
 #ifdef SNAPSHOT
index 1457e1fa72f7e06cf73e9067b0e0fa6674ba2720..910c2ee68c5468e2df07ce85af7603ab8dc96909 100644 (file)
@@ -97,7 +97,7 @@ static unsigned char safe_chars[] =
 /* safe_ultostr - convert unsigned long to safe alphanumerical string */
 
 char   *safe_ultostr(VSTRING *buf, unsigned long ulval, int base,
-                              int padlen, int padchar)
+                            int padlen, int padchar)
 {
     const char *myname = "safe_ultostr";
     char   *start;
@@ -171,6 +171,8 @@ unsigned long safe_strtoul(const char *start, char **end, int base)
     /*
      * Skip leading whitespace. We don't implement sign/base prefixes.
      */
+    if (end)
+       *end = (char *) start;
     while (ISSPACE(*start))
        ++start;
 
@@ -178,13 +180,7 @@ unsigned long safe_strtoul(const char *start, char **end, int base)
      * Start the conversion.
      */
     errno = 0;
-    for (cp = (unsigned char *) start; *cp; cp++) {
-       /* Return (0, EINVAL) if no conversion was made. */
-       if ((char_val = char_map[*cp]) >= base) {
-           if (cp == (unsigned char *) start)
-               errno = EINVAL;
-           break;
-       }
+    for (cp = (unsigned char *) start; (char_val = char_map[*cp]) < base; cp++) {
        /* Return (ULONG_MAX, ERANGE) if the result is too large. */
        if (sum > div_limit
            || (sum == div_limit && char_val > mod_limit)) {
@@ -197,7 +193,10 @@ unsigned long safe_strtoul(const char *start, char **end, int base)
        }
        sum = sum * base + char_val;
     }
-    if (end)
+    /* Return (0, EINVAL) after no conversion. Test moved here 20131209. */
+    if (cp == (unsigned char *) start)
+       errno = EINVAL;
+    else if (end)
        *end = (char *) cp;
     return (sum);
 }
@@ -225,6 +224,16 @@ int     main(int unused_argc, char **unused_argv)
 #define strtoul strtol
 #endif
 
+    /*
+     * Hard-coded string-to-number test.
+     */
+    ulval2 = safe_strtoul("  ", &junk, 10);
+    if (*junk == 0 || errno != EINVAL)
+       msg_warn("input=' ' result=%lu errno=%m", ulval2);
+
+    /*
+     * Configurable number-to-string-to-number test.
+     */
     while (vstring_get_nonl(buf, VSTREAM_IN) != VSTREAM_EOF) {
        ch = 0;
        if (sscanf(STR(buf), "%lu %d%c", &ulval, &base, &ch) != 2 || ch) {
diff --git a/postfix/src/global/safe_ultostr.in b/postfix/src/global/safe_ultostr.in
new file mode 100644 (file)
index 0000000..49e2743
--- /dev/null
@@ -0,0 +1,4 @@
+4294967295 2
+4294967295 10
+4294967295 16
+4294967295 52
diff --git a/postfix/src/global/safe_ultostr.ref b/postfix/src/global/safe_ultostr.ref
new file mode 100644 (file)
index 0000000..829b79e
--- /dev/null
@@ -0,0 +1,4 @@
+4294967295 = 11111111111111111111111111111111
+4294967295 = 4294967295
+4294967295 = HHHHHHHH
+4294967295 = CHPgSv
index 05fdc1f403c2820ee355f0905bbccc80c6c6684a..49114b902b9b524da4cc9bdefb397ed8c4ae3ae9 100644 (file)
@@ -341,6 +341,10 @@ void    edit_master(int mode, int argc, char **argv)
        if (mode & EDIT_CONF) {
            if ((err = split_nameval(cp, &pattern, &req->edit_value)) != 0)
                msg_fatal("%s: \"%s\"", err, req->raw_text);
+           if ((mode & MASTER_PARAM)
+            && req->edit_value[strcspn(req->edit_value, PC_MASTER_BLANKS)])
+               msg_fatal("whitespace in parameter value: \"%s\"",
+                         req->raw_text);
        } else if (mode & (COMMENT_OUT | EDIT_EXCL)) {
            if (strchr(cp, '=') != 0)
                msg_fatal("-X or -# requires names without value");
index 3efb2eb6fa59ddc3f3993cf01e5597d2d7ad3c3b..b6a78e92f2a5475cb03f803c6fa6eec933eaafc0 100644 (file)
@@ -305,7 +305,7 @@ static dane_digest *add_digest(char *mdalg, int pref)
        /*
         * XXX: safe_strtoul() does not flag empty or white-space only input.
         * Since we get idbuf by splitting white-space/comma delimited
-        * tokens, this is not a problem here.
+        * tokens, this is not a problem here. Fixed as of 210131209.
         */
        l = safe_strtoul(value, &endcp, 10);
        if ((l == 0 && (errno == EINVAL || endcp == value))
@@ -758,6 +758,10 @@ static DNS_RR *tlsa_apply(DNS_RR *rr, tlsa_filter filter, filter_ctx *ctx)
     DNS_RR *tail = 0;                  /* Last retained RR */
     DNS_RR *next;
 
+    /*
+     * XXX Code that modifies or destroys DNS_RR lists or entries belongs in
+     * the DNS library, not here.
+     */
     for ( /* nop */ ; rr; rr = next) {
        next = rr->next;
 
@@ -1352,6 +1356,8 @@ static int add_ext(X509 *issuer, X509 *subject, int ext_nid, char *ext_val)
     X509V3_set_ctx(&v3ctx, issuer, subject, 0, 0, 0);
     if ((exts = subject->cert_info->extensions) == 0)
        exts = subject->cert_info->extensions = sk_X509_EXTENSION_new_null();
+    if (!exts)
+       return (0);
 
     if ((ext = X509V3_EXT_conf_nid(0, &v3ctx, ext_nid, ext_val)) != 0
        && sk_X509_EXTENSION_push(exts, ext))