From 054ce030a60f22a1acc26c419907d276406080f9 Mon Sep 17 00:00:00 2001 From: Jeremy Harris Date: Thu, 12 Dec 2019 19:17:47 +0000 Subject: Testsuite: testcase for misordered ARC headers. Bug 2493 --- test/scripts/4560-ARC/4562 | 48 -------------------------------- test/scripts/4560-ARC/4563 | 69 ++++++++++++++++++++++++++++++++++++++++++++++ test/scripts/4560-ARC/4565 | 48 ++++++++++++++++++++++++++++++++ 3 files changed, 117 insertions(+), 48 deletions(-) delete mode 100644 test/scripts/4560-ARC/4562 create mode 100644 test/scripts/4560-ARC/4563 create mode 100644 test/scripts/4560-ARC/4565 (limited to 'test/scripts/4560-ARC') diff --git a/test/scripts/4560-ARC/4562 b/test/scripts/4560-ARC/4562 deleted file mode 100644 index 3f21e1ebd..000000000 --- a/test/scripts/4560-ARC/4562 +++ /dev/null @@ -1,48 +0,0 @@ -# ARC sign, DKIM header interactions -# -exim -DSERVER=server -bd -oX PORT_D -**** -# -# Random-ish input message, having a DKIM header -client 127.0.0.1 PORT_D -??? 220 -HELO xxx -??? 250 -MAIL FROM: -??? 250 -RCPT TO: -??? 250 -DATA -??? 354 -DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; - d=example.com; s=sel; h=List-Archive; - bh=47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU=; b=uslVEq1LzHDR2ACoSTiErsGhe - GcuqL5no/4XYjsEJOIXkKFp4FFTj7QTcblHqyqsjgd5Dgs7zuFV4U3lwU9jSZtqJNQI+BtYZ5dS48 - sjr9PbLiguw8rAv5eDXBQKi5XcNCnZlUnWEjl10OXEgJZ9UXdKToWHpSfWEw1nFvOlKAfPBfkznnA - EOQXSTJOTanLpr7EZ4Yw5LWE+9BWJfnl6snn6W0mmJl4tbfEXEV1ZzOxdQF1rwjJqmojoCG36Z+v5 - sWKswl7HgSlKo2GKgxh9zIIhoxg5+7zfmHdKUQ2/6zuR8nqjDAjl3bSdOMgZVM0L6G6EMxQP6Sj6f - oEr6ePt9A==; -From: mrgus@text.ex -To: bakawolf@yahoo.com -Date: Thu, 19 Nov 2015 17:00:07 -0700 -Message-ID: -Subject: simple test - -This is a simple test. -. -??? 250 -QUIT -??? 221 -**** -exim -DSERVER=server -DNOTDAEMON -q -**** -exim -DSERVER=server -DNOTDAEMON -q -**** -# -# -# -# -# -killdaemon -no_stdout_check -no_msglog_check diff --git a/test/scripts/4560-ARC/4563 b/test/scripts/4560-ARC/4563 new file mode 100644 index 000000000..5aaf5facf --- /dev/null +++ b/test/scripts/4560-ARC/4563 @@ -0,0 +1,69 @@ +# ARC verify, misordered headers +# +exim -DSERVER=server -bd -oX PORT_D +**** +# +# This should fail signatures (manually added i=2 layer), but not crash. +# It seems that Outlook.com is _sorting_ headers before transmission; +# so it goes AS2 AS1 AMS2 AMS1 AAR2 AAR1. We had a bug in assuming that +# the end of a list held the AMD we'd just parsed, so when the end +# hadn't had an AMS yet, we fullowed a null pointer. +# +# Mail original in aux-fixed/4560.msg1.txt +# Sig generated by: perl aux-fixed/dkim/sign_arc.pl < aux-fixed/4560.msg1.txt +client 127.0.0.1 PORT_D +??? 220 +HELO xxx +??? 250 +MAIL FROM: +??? 250 +RCPT TO: +??? 250 +DATA +??? 354 +ARC-Seal: i=2; a=rsa-sha256; cv=none; d=test.ex; s=sel; t=1521752658; b= + xcIN0OEpAc3s8riODm31Q6JgmIECch3iVd1LXWwsypGpCY2UFFuo5HhCEf4a043q + YZ+zn/MbFFkvwIqleeQkJ7S5UcvfM8dv/V4YnwAe+JD8r79glh/FRq6uKlc0ixLS + CllJMwj98J1P1K9+gwmO5TrD1eTZV68caZj77P+X2kw= +ARC-Seal: i=1; a=rsa-sha256; cv=none; d=test.ex; s=sel; t=1521752658; b= + xcIN0OEpAc3s8riODm31Q6JgmIECch3iVd1LXWwsypGpCY2UFFuo5HhCEf4a043q + YZ+zn/MbFFkvwIqleeQkJ7S5UcvfM8dv/V4YnwAe+JD8r79glh/FRq6uKlc0ixLS + CllJMwj98J1P1K9+gwmO5TrD1eTZV68caZj77P+X2kw= +ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=test.ex; + h=from:to:date:message-id:subject; s=sel; bh=3UbbJTudPxmejzh7U1 + Zg33U3QT+16kfV2eOTvMeiEis=; b=WgE+YWSm48w/P448gPlBBNCKt2SJ4gosPx + 0JQ98aZJhun2RaVcUO3INc+kZv8YOijofMzFqJxVn1cgMjoU8/QSHIyyt40FzkQB + oSGmSrCjtRnzS8pbp491NX3kGuetidaWE5muPSdOystg6mm1rBnl9sqVrwaynCmr + fu2jTuUfw= +ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=test.ex; + h=from:to:date:message-id:subject; s=sel; bh=3UbbJTudPxmejzh7U1 + Zg33U3QT+16kfV2eOTvMeiEis=; b=WgE+YWSm48w/P448gPlBBNCKt2SJ4gosPx + 0JQ98aZJhun2RaVcUO3INc+kZv8YOijofMzFqJxVn1cgMjoU8/QSHIyyt40FzkQB + oSGmSrCjtRnzS8pbp491NX3kGuetidaWE5muPSdOystg6mm1rBnl9sqVrwaynCmr + fu2jTuUfw= +ARC-Authentication-Results: i=2; test.ex; arc=none +ARC-Authentication-Results: i=1; test.ex; arc=none +Authentication-Results: test.ex; arc=none +From: mrgus@text.ex +To: bakawolf@yahoo.com +Date: Thu, 19 Nov 2015 17:00:07 -0700 +Message-ID: +Subject: simple test + +This is a simple test. +. +??? 250 +QUIT +??? 221 +**** +exim -DSERVER=server -DNOTDAEMON -q +**** +# +# +# +# +# +# +killdaemon +no_stdout_check +no_msglog_check diff --git a/test/scripts/4560-ARC/4565 b/test/scripts/4560-ARC/4565 new file mode 100644 index 000000000..3f21e1ebd --- /dev/null +++ b/test/scripts/4560-ARC/4565 @@ -0,0 +1,48 @@ +# ARC sign, DKIM header interactions +# +exim -DSERVER=server -bd -oX PORT_D +**** +# +# Random-ish input message, having a DKIM header +client 127.0.0.1 PORT_D +??? 220 +HELO xxx +??? 250 +MAIL FROM: +??? 250 +RCPT TO: +??? 250 +DATA +??? 354 +DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; + d=example.com; s=sel; h=List-Archive; + bh=47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU=; b=uslVEq1LzHDR2ACoSTiErsGhe + GcuqL5no/4XYjsEJOIXkKFp4FFTj7QTcblHqyqsjgd5Dgs7zuFV4U3lwU9jSZtqJNQI+BtYZ5dS48 + sjr9PbLiguw8rAv5eDXBQKi5XcNCnZlUnWEjl10OXEgJZ9UXdKToWHpSfWEw1nFvOlKAfPBfkznnA + EOQXSTJOTanLpr7EZ4Yw5LWE+9BWJfnl6snn6W0mmJl4tbfEXEV1ZzOxdQF1rwjJqmojoCG36Z+v5 + sWKswl7HgSlKo2GKgxh9zIIhoxg5+7zfmHdKUQ2/6zuR8nqjDAjl3bSdOMgZVM0L6G6EMxQP6Sj6f + oEr6ePt9A==; +From: mrgus@text.ex +To: bakawolf@yahoo.com +Date: Thu, 19 Nov 2015 17:00:07 -0700 +Message-ID: +Subject: simple test + +This is a simple test. +. +??? 250 +QUIT +??? 221 +**** +exim -DSERVER=server -DNOTDAEMON -q +**** +exim -DSERVER=server -DNOTDAEMON -q +**** +# +# +# +# +# +killdaemon +no_stdout_check +no_msglog_check -- cgit v1.2.3