summaryrefslogtreecommitdiffstats
path: root/debian/patches/75_70-Fix-variable-initialisation-in-smtp-transport.-Bug-2.patch
diff options
context:
space:
mode:
Diffstat (limited to 'debian/patches/75_70-Fix-variable-initialisation-in-smtp-transport.-Bug-2.patch')
-rw-r--r--debian/patches/75_70-Fix-variable-initialisation-in-smtp-transport.-Bug-2.patch46
1 files changed, 46 insertions, 0 deletions
diff --git a/debian/patches/75_70-Fix-variable-initialisation-in-smtp-transport.-Bug-2.patch b/debian/patches/75_70-Fix-variable-initialisation-in-smtp-transport.-Bug-2.patch
new file mode 100644
index 0000000..4a2e3b5
--- /dev/null
+++ b/debian/patches/75_70-Fix-variable-initialisation-in-smtp-transport.-Bug-2.patch
@@ -0,0 +1,46 @@
+From a8786a66feb3c003c74551399b345b1634cc6739 Mon Sep 17 00:00:00 2001
+From: Jeremy Harris <jgh146exb@wizmail.org>
+Date: Thu, 4 May 2023 15:41:46 +0100
+Subject: [PATCH 1/3] Fix variable initialisation in smtp transport. Bug 2996
+
+---
+ doc/ChangeLog | 8 ++++++++
+ src/transports/smtp.c | 2 +-
+ 2 files changed, 9 insertions(+), 1 deletion(-)
+
+--- a/doc/ChangeLog
++++ b/doc/ChangeLog
+@@ -61,10 +61,18 @@ JH/23 Fix crash in string expansions. Pr
+ was done, killing the process.
+
+ JH/27 Fix ${srs_encode ..}. Previously it would give a bad result for one day
+ every 1024 days.
+
++JH/28 Bug 2996: Fix a crash in the smtp transport. When finding that the
++ message being considered for delivery was already being handled by
++ another process, and having an SMTP connection already open, the function
++ to close it tried to use an uninitialized variable. This would afftect
++ high-volume sites more, especially when running mailing-list-style loads.
++ Pollution of logs was the major effect, as the other process delivered
++ the message. Found and partly investigated by Graeme Fowler.
++
+
+ Exim version 4.96
+ -----------------
+
+ JH/01 Move the wait-for-next-tick (needed for unique message IDs) from
+--- a/src/transports/smtp.c
++++ b/src/transports/smtp.c
+@@ -4950,11 +4950,11 @@ Returns: nothing
+ void
+ smtp_transport_closedown(transport_instance *tblock)
+ {
+ smtp_transport_options_block * ob = SOB tblock->options_block;
+ client_conn_ctx cctx;
+-smtp_context sx;
++smtp_context sx = {0};
+ uschar buffer[256];
+ uschar inbuffer[4096];
+ uschar outbuffer[16];
+
+ /*XXX really we need an active-smtp-client ctx, rather than assuming stdout */