Date: Wednesday, January 23, 2019 @ 09:34:59 Author: foxxx0 Revision: 427229
upgpkg: dovecot 2.3.4-3 add mysql-double-free patch from upstream Added: dovecot/trunk/fix-mysql-double-free.patch Modified: dovecot/trunk/PKGBUILD Deleted: dovecot/trunk/include-crypt-h.patch -----------------------------+ PKGBUILD | 8 +++++--- fix-mysql-double-free.patch | 36 ++++++++++++++++++++++++++++++++++++ include-crypt-h.patch | 11 ----------- 3 files changed, 41 insertions(+), 14 deletions(-) Modified: PKGBUILD =================================================================== --- PKGBUILD 2019-01-23 08:57:55 UTC (rev 427228) +++ PKGBUILD 2019-01-23 09:34:59 UTC (rev 427229) @@ -10,7 +10,7 @@ pkgname=dovecot pkgver=2.3.4 -pkgrel=2 +pkgrel=3 pkgdesc="An IMAP and POP3 server written with security primarily in mind" url="https://dovecot.org/" @@ -29,13 +29,15 @@ source=("https://dovecot.org/releases/2.3/${pkgname}-${pkgver}.tar.gz"{,.sig} 'dovecot.sysusersd' 'dovecot.tmpfilesd' - 'dovecot.ld.so.conf') + 'dovecot.ld.so.conf' + 'fix-mysql-double-free.patch') sha256sums=('d91b76eff8df6185c1799f1b279f780105bdeeea27e3286b42f4cab18efbef05' 'SKIP' 'c5e3a8ffe23e5deb4f7893d9877d972347c2ee45c4ebf713de85c537e47cfcaf' '0b0625b1e66ca6a95d506fd00d6a68e70620c8ea28606e2528953ffb1806b08e' - 'a457a1691cfa82495fc0503bfa4b61e54b149e63400fe0f568dff2c24a3f7858') + 'a457a1691cfa82495fc0503bfa4b61e54b149e63400fe0f568dff2c24a3f7858' + 'a97bd93b07c96e03d3c7540c8cd6c2d465a12728f31d9164ea4546e257e8a203') validpgpkeys=( 'E643F0BDFDCD04D9FFCB6279C948525140558AC9' # Timo Sirainen <[email protected]> Added: fix-mysql-double-free.patch =================================================================== --- fix-mysql-double-free.patch (rev 0) +++ fix-mysql-double-free.patch 2019-01-23 09:34:59 UTC (rev 427229) @@ -0,0 +1,36 @@ +From 3c5101ffdd2a8115e03ed7180d53578765dea4c9 Mon Sep 17 00:00:00 2001 +From: Aki Tuomi <[email protected]> +Date: Tue, 4 Dec 2018 14:40:04 +0200 +Subject: [PATCH] driver-mysql: Avoid double-closing MySQL connection + +Fixes double-free +--- + src/lib-sql/driver-mysql.c | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) + +diff --git a/src/lib-sql/driver-mysql.c b/src/lib-sql/driver-mysql.c +index c87e825e4b..5dd1c3124f 100644 +--- a/src/lib-sql/driver-mysql.c ++++ b/src/lib-sql/driver-mysql.c +@@ -173,7 +173,9 @@ static int driver_mysql_connect(struct sql_db *_db) + static void driver_mysql_disconnect(struct sql_db *_db) + { + struct mysql_db *db = (struct mysql_db *)_db; +- mysql_close(db->mysql); ++ if (db->mysql != NULL) ++ mysql_close(db->mysql); ++ db->mysql = NULL; + } + + static int driver_mysql_parse_connect_string(struct mysql_db *db, +@@ -311,7 +313,9 @@ static void driver_mysql_deinit_v(struct sql_db *_db) + _db->no_reconnect = TRUE; + sql_db_set_state(&db->api, SQL_DB_STATE_DISCONNECTED); + +- mysql_close(db->mysql); ++ if (db->mysql != NULL) ++ mysql_close(db->mysql); ++ db->mysql = NULL; + + sql_connection_log_finished(_db); + event_unref(&_db->event); Deleted: include-crypt-h.patch =================================================================== --- include-crypt-h.patch 2019-01-23 08:57:55 UTC (rev 427228) +++ include-crypt-h.patch 2019-01-23 09:34:59 UTC (rev 427229) @@ -1,11 +0,0 @@ -diff -up dovecot-2.3.0.1/src/auth/mycrypt.c.libxcrypt dovecot-2.3.0.1/src/auth/mycrypt.c ---- dovecot-2.3.0.1/src/auth/mycrypt.c.libxcrypt 2018-02-28 15:28:58.000000000 +0100 -+++ dovecot-2.3.0.1/src/auth/mycrypt.c 2018-03-27 10:57:38.447769201 +0200 -@@ -14,6 +14,7 @@ - # define _XPG6 /* Some Solaris versions require this, some break with this */ - #endif - #include <unistd.h> -+#include <crypt.h> - - #include "mycrypt.h" -
