summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHeiko Schlittermann (HS12-RIPE) <hs@schlittermann.de>2019-08-27 21:58:27 +0200
committerHeiko Schlittermann (HS12-RIPE) <hs@schlittermann.de>2019-08-29 16:15:17 +0200
commitfc55624df0c1956b7b6b4ae35605a6b95704d022 (patch)
tree3918345480134eb89e5ce443c8d5dfe0a18022e5
parentc5b0340697326238b0e2afd9d341185077d60d35 (diff)
Testcase for handling of -H files for excessive long '-KEY' lines
Thanks to Qualys for their analysis. This bug was fixed independently by JGH. Tidy.
-rw-r--r--doc/doc-txt/ChangeLog3
-rw-r--r--src/src/spool_in.c8
-rw-r--r--test/aux-fixed/0910/input/1i3FVM-0008QX-DU-D49
-rw-r--r--test/aux-fixed/0910/input/1i3FVM-0008QX-DU-H29
-rw-r--r--test/confs/09103
-rw-r--r--test/scripts/0000-Basic/09102
-rw-r--r--test/stdout/09101
7 files changed, 92 insertions, 3 deletions
diff --git a/doc/doc-txt/ChangeLog b/doc/doc-txt/ChangeLog
index c3972d2da..158871bed 100644
--- a/doc/doc-txt/ChangeLog
+++ b/doc/doc-txt/ChangeLog
@@ -17,6 +17,9 @@ JH/02 OpenSSL: Suppress the sending of (stateful) TLS1.3 session tickets.
JH/03 Debug output for ACL now gives the config file name and line number for
each verb.
+HS/01 Fix handling of very log lines in -H files. If a -<key> <value>
+ line caused the extension of big_buffer, the following lines where
+ ignored.
JH/04 The default received_header_text now uses the RFC 8314 tls cipher clause.
diff --git a/src/src/spool_in.c b/src/src/spool_in.c
index 25e431b2b..f393d4d3e 100644
--- a/src/src/spool_in.c
+++ b/src/src/spool_in.c
@@ -341,7 +341,6 @@ int n;
int rcount = 0;
long int uid, gid;
BOOL inheader = FALSE;
-uschar *p;
/* Reset all the global variables to their default values. However, there is
one exception. DO NOT change the default value of dont_deliver, because it may
@@ -387,7 +386,8 @@ and the number of warning messages for delivery delays that have been sent. */
if (Ufgets(big_buffer, big_buffer_size, fp) == NULL) goto SPOOL_READ_ERROR;
-p = big_buffer + Ustrlen(big_buffer);
+{
+uschar *p = big_buffer + Ustrlen(big_buffer);
while (p > big_buffer && isspace(p[-1])) p--;
*p = 0;
if (!isdigit(p[-1])) goto SPOOL_FORMAT_ERROR;
@@ -400,6 +400,7 @@ while (p > big_buffer && (isdigit(p[-1]) || '-' == p[-1])) p--;
uid = Uatoi(p);
if (p <= big_buffer || *(--p) != ' ') goto SPOOL_FORMAT_ERROR;
*p = 0;
+}
originator_login = string_copy(big_buffer);
originator_uid = (uid_t)uid;
@@ -449,6 +450,7 @@ for (;;)
int len;
BOOL tainted;
uschar * var;
+ const uschar * p;
if (Ufgets(big_buffer, big_buffer_size, fp) == NULL) goto SPOOL_READ_ERROR;
if (big_buffer[0] != '-') break;
@@ -659,7 +661,7 @@ for (;;)
case 't':
if (Ustrncmp(p, "ls_", 3) == 0)
{
- uschar * q = p + 3;
+ const uschar * q = p + 3;
if (Ustrncmp(q, "certificate_verified", 20) == 0)
tls_in.certificate_verified = TRUE;
else if (Ustrncmp(q, "cipher", 6) == 0)
diff --git a/test/aux-fixed/0910/input/1i3FVM-0008QX-DU-D b/test/aux-fixed/0910/input/1i3FVM-0008QX-DU-D
new file mode 100644
index 000000000..3e9df9624
--- /dev/null
+++ b/test/aux-fixed/0910/input/1i3FVM-0008QX-DU-D
@@ -0,0 +1,49 @@
+1i3FVM-0008QX-DU-D
+--1567066204-eximdsn-2077839047
+Content-type: text/plain; charset=us-ascii
+
+This message was created automatically by mail delivery software.
+
+A message that you sent could not be delivered to one or more of its
+recipients. This is a permanent error. The following address(es) failed:
+
+ root@example.com
+ (generated from root@muli.example.com)
+ host ssl.example.com [212.80.235.130]
+ SMTP error from remote mail server after pipelined MAIL FROM:<root@example.com> SIZE=1882:
+ 550 Authenticated connections only.
+
+--1567066204-eximdsn-2077839047
+Content-type: message/delivery-status
+
+Reporting-MTA: dns; muli.example.com
+
+Action: failed
+Final-Recipient: rfc822;root@example.com
+Status: 5.0.0
+Remote-MTA: dns; ssl.example.com
+Diagnostic-Code: smtp; 550 Authenticated connections only.
+
+--1567066204-eximdsn-2077839047
+Content-type: text/rfc822-headers
+
+Return-path: <root@example.com>
+Received: from root by muli.example.com with local (Exim 4.89)
+ (envelope-from <root@example.com>)
+ id 1i3FVJ-0008QS-Ca
+ for root@muli.example.com; Thu, 29 Aug 2019 10:10:01 +0200
+From: root@muli.example.com (Cron Daemon)
+To: root@muli.example.com
+Subject: Cron <root@muli> /root/dbsync
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+X-Cron-Env: <SHELL=/bin/sh>
+X-Cron-Env: <PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin>
+X-Cron-Env: <HOME=/root>
+X-Cron-Env: <LOGNAME=root>
+Message-Id: <E1i3FVJ-0008QS-Ca@muli.example.com>
+Date: Thu, 29 Aug 2019 10:10:01 +0200
+
+
+--1567066204-eximdsn-2077839047--
diff --git a/test/aux-fixed/0910/input/1i3FVM-0008QX-DU-H b/test/aux-fixed/0910/input/1i3FVM-0008QX-DU-H
new file mode 100644
index 000000000..47956fe38
--- /dev/null
+++ b/test/aux-fixed/0910/input/1i3FVM-0008QX-DU-H
@@ -0,0 +1,29 @@
+1i3FVM-0008QX-DU-H
+Debian-exim 107 110
+<>
+1567066204 0
+-ident Debian-exim
+-received_protocol local
+-max_received_linelength 94
+-allow_unqualified_recipient
+-allow_unqualified_sender
+-frozen 1567066205
+-localerror
+-foo This is a very long line (about 20k) xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx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xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+-body_linecount 48
+XX
+1
+root@example.com
+
+146P Received: from Debian-exim by muli.example.com with local (Exim 4.89)
+ id 1i3FVM-0008QX-DU
+ for root@example.com; Thu, 29 Aug 2019 10:10:04 +0200
+038 X-Failed-Recipients: root@example.com
+029 Auto-Submitted: auto-replied
+060F From: Mail Delivery System <Mailer-Daemon@muli.example.com>
+021T To: root@example.com
+100 Content-Type: multipart/report; report-type=delivery-status; boundary=1567066204-eximdsn-2077839047
+018 MIME-Version: 1.0
+059 Subject: Mail delivery failed: returning message to sender
+049I Message-Id: <E1i3FVM-0008QX-DU@muli.example.com>
+038 Date: Thu, 29 Aug 2019 10:10:04 +0200
diff --git a/test/confs/0910 b/test/confs/0910
new file mode 100644
index 000000000..3e754c071
--- /dev/null
+++ b/test/confs/0910
@@ -0,0 +1,3 @@
+keep_environment =
+tls_advertise_hosts =
+spool_directory = DIR/aux-fixed/0910
diff --git a/test/scripts/0000-Basic/0910 b/test/scripts/0000-Basic/0910
new file mode 100644
index 000000000..5487842c9
--- /dev/null
+++ b/test/scripts/0000-Basic/0910
@@ -0,0 +1,2 @@
+# Properly handle lines after very long ones from -H file
+exim -Mset 1i3FVM-0008QX-DU -be '$body_linecount'
diff --git a/test/stdout/0910 b/test/stdout/0910
new file mode 100644
index 000000000..21e72e8ac
--- /dev/null
+++ b/test/stdout/0910
@@ -0,0 +1 @@
+48