Prereq: "3.6.0" diff -ur --new-file /var/tmp/postfix-3.6.0/src/global/mail_version.h ./src/global/mail_version.h --- /var/tmp/postfix-3.6.0/src/global/mail_version.h 2021-04-29 12:13:09.000000000 -0400 +++ ./src/global/mail_version.h 2021-06-13 14:50:57.000000000 -0400 @@ -20,8 +20,8 @@ * Patches change both the patchlevel and the release date. Snapshots have no * patchlevel; they change the release date only. */ -#define MAIL_RELEASE_DATE "20210429" -#define MAIL_VERSION_NUMBER "3.6.0" +#define MAIL_RELEASE_DATE "20210613" +#define MAIL_VERSION_NUMBER "3.6.1" #ifdef SNAPSHOT #define MAIL_VERSION_DATE "-" MAIL_RELEASE_DATE diff -ur --new-file /var/tmp/postfix-3.6.0/HISTORY ./HISTORY --- /var/tmp/postfix-3.6.0/HISTORY 2021-04-29 16:11:42.000000000 -0400 +++ ./HISTORY 2021-06-13 14:47:56.000000000 -0400 @@ -25557,3 +25557,17 @@ 20210428 Documentation: update by Paul Menzel. File: proto/SASL_README.html. + +20210601 + + Bugfix (introduced: Postfix 2.11): the command "postmap + lmdb:/file/name" handled duplicate keys ungracefully, + discarding entries stored up to and including the duplicate + key, and causing a double free() call with lmdb versions + 0.9.17 and later. Reported by Adi Prasaja; double free() + root cause analysis by Howard Chu. File: util/slmdb.c. + +20210609 + + Typo (introduced: Postfix 3.4): silent_discard should be + silent-discard. File: proto/BDAT_README.html. diff -ur --new-file /var/tmp/postfix-3.6.0/README_FILES/BDAT_README ./README_FILES/BDAT_README --- /var/tmp/postfix-3.6.0/README_FILES/BDAT_README 2020-08-29 13:52:25.000000000 -0400 +++ ./README_FILES/BDAT_README 2021-06-13 14:51:55.000000000 -0400 @@ -23,7 +23,7 @@ # The logging alternative: smtpd_discard_ehlo_keywords = chunking # The non-logging alternative: - smtpd_discard_ehlo_keywords = chunking, silent_discard + smtpd_discard_ehlo_keywords = chunking, silent-discard Specify '-o smtpd_discard_ehlo_keywords=' in master.cf for the submission and smtps services, if you have clients that benefit from CHUNKING support. diff -ur --new-file /var/tmp/postfix-3.6.0/html/BDAT_README.html ./html/BDAT_README.html --- /var/tmp/postfix-3.6.0/html/BDAT_README.html 2020-08-29 13:52:15.000000000 -0400 +++ ./html/BDAT_README.html 2021-06-13 14:51:55.000000000 -0400 @@ -51,7 +51,7 @@ # The logging alternative: smtpd_discard_ehlo_keywords = chunking # The non-logging alternative: - smtpd_discard_ehlo_keywords = chunking, silent_discard + smtpd_discard_ehlo_keywords = chunking, silent-discard diff -ur --new-file /var/tmp/postfix-3.6.0/proto/BDAT_README.html ./proto/BDAT_README.html --- /var/tmp/postfix-3.6.0/proto/BDAT_README.html 2020-08-29 13:51:42.000000000 -0400 +++ ./proto/BDAT_README.html 2021-06-09 08:46:08.000000000 -0400 @@ -51,7 +51,7 @@ # The logging alternative: smtpd_discard_ehlo_keywords = chunking # The non-logging alternative: - smtpd_discard_ehlo_keywords = chunking, silent_discard + smtpd_discard_ehlo_keywords = chunking, silent-discard diff -ur --new-file /var/tmp/postfix-3.6.0/src/util/slmdb.c ./src/util/slmdb.c --- /var/tmp/postfix-3.6.0/src/util/slmdb.c 2017-02-18 20:58:21.000000000 -0500 +++ ./src/util/slmdb.c 2021-06-01 17:02:52.000000000 -0400 @@ -386,12 +386,16 @@ * - With a bulk-mode transaction we commit when the database is closed. */ if (slmdb->open_flags & O_TRUNC) { - if ((status = mdb_drop(slmdb->txn, slmdb->dbi, 0)) != 0) + if ((status = mdb_drop(slmdb->txn, slmdb->dbi, 0)) != 0) { + mdb_txn_abort(slmdb->txn); + slmdb->txn = 0; return (status); + } if ((slmdb->slmdb_flags & SLMDB_FLAG_BULK) == 0) { - if ((status = mdb_txn_commit(slmdb->txn)) != 0) - return (status); + status = mdb_txn_commit(slmdb->txn); slmdb->txn = 0; + if (status != 0) + return (status); } } else if ((slmdb->lmdb_flags & MDB_RDONLY) != 0 || (slmdb->slmdb_flags & SLMDB_FLAG_BULK) == 0) { @@ -582,11 +586,15 @@ * Do the update. */ if ((status = mdb_put(txn, slmdb->dbi, mdb_key, mdb_value, flags)) != 0) { - mdb_txn_abort(txn); if (status != MDB_KEYEXIST) { + mdb_txn_abort(txn); if ((status = slmdb_recover(slmdb, status)) == 0) status = slmdb_put(slmdb, mdb_key, mdb_value, flags); SLMDB_API_RETURN(slmdb, status); + } else { + /* Abort non-bulk transaction only. */ + if (slmdb->txn == 0) + mdb_txn_abort(txn); } }