Control: tags 918339 + patch Control: tags 918339 + pending
Dear maintainer, I've prepared an NMU for dovecot (versioned as 1:2.3.4.1-1.1) and uploaded it to DELAYED/3. Please feel free to tell me if I should delay it longer. Regards. diff -Nru dovecot-2.3.4.1/debian/changelog dovecot-2.3.4.1/debian/changelog --- dovecot-2.3.4.1/debian/changelog 2019-02-05 15:19:12.000000000 +0100 +++ dovecot-2.3.4.1/debian/changelog 2019-03-13 13:12:49.000000000 +0100 @@ -1,3 +1,12 @@ +dovecot (1:2.3.4.1-1.1) unstable; urgency=medium + + * Non-maintainer upload. + * debian/patches/avoid-double-closing-mysql.patch: Fix double closing of the + connection in the mysql driver, this should fix the crash in the dovecot + auth process, taken from upstream (Closes: #918339) + + -- Laurent Bigonville <bi...@debian.org> Wed, 13 Mar 2019 13:12:49 +0100 + dovecot (1:2.3.4.1-1) unstable; urgency=high * [bebf0b4] New upstream version 2.3.4.1 diff -Nru dovecot-2.3.4.1/debian/patches/avoid-double-closing-mysql.patch dovecot-2.3.4.1/debian/patches/avoid-double-closing-mysql.patch --- dovecot-2.3.4.1/debian/patches/avoid-double-closing-mysql.patch 1970-01-01 01:00:00.000000000 +0100 +++ dovecot-2.3.4.1/debian/patches/avoid-double-closing-mysql.patch 2019-03-13 13:09:24.000000000 +0100 @@ -0,0 +1,36 @@ +From 3c5101ffdd2a8115e03ed7180d53578765dea4c9 Mon Sep 17 00:00:00 2001 +From: Aki Tuomi <aki.tu...@dovecot.fi> +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); diff -Nru dovecot-2.3.4.1/debian/patches/series dovecot-2.3.4.1/debian/patches/series --- dovecot-2.3.4.1/debian/patches/series 2019-02-05 15:19:12.000000000 +0100 +++ dovecot-2.3.4.1/debian/patches/series 2019-03-13 13:09:51.000000000 +0100 @@ -9,3 +9,4 @@ ssl-dh-params-location.patch lib-master-test-event-stats-Use-PRIu64-format.patch debian-changes +avoid-double-closing-mysql.patch