summaryrefslogtreecommitdiffstats
path: root/opendkim-CVE-2022-48521-fix.patch
diff options
context:
space:
mode:
Diffstat (limited to 'opendkim-CVE-2022-48521-fix.patch')
-rw-r--r--opendkim-CVE-2022-48521-fix.patch30
1 files changed, 30 insertions, 0 deletions
diff --git a/opendkim-CVE-2022-48521-fix.patch b/opendkim-CVE-2022-48521-fix.patch
new file mode 100644
index 0000000..3cec20c
--- /dev/null
+++ b/opendkim-CVE-2022-48521-fix.patch
@@ -0,0 +1,30 @@
+diff --git a/opendkim/opendkim.c b/opendkim/opendkim.c
+index 5517322c..494c9157 100644
+--- a/opendkim/opendkim.c
++++ b/opendkim/opendkim.c
+@@ -13652,8 +13652,15 @@ mlfi_eom(SMFICTX *ctx)
+ return SMFIS_TEMPFAIL;
+ }
+
+- c = 0;
++ c = 1;
++
+ for (hdr = dfc->mctx_hqhead; hdr != NULL; hdr = hdr->hdr_next)
++ {
++ if (strcasecmp(hdr->hdr_hdr, AUTHRESULTSHDR) == 0)
++ c++;
++ }
++
++ for (hdr = dfc->mctx_hqtail; hdr != NULL; hdr = hdr->hdr_prev)
+ {
+ memset(ares, '\0', sizeof(struct authres));
+
+@@ -13665,7 +13672,7 @@ mlfi_eom(SMFICTX *ctx)
+ char *slash;
+
+ /* remember index */
+- c++;
++ c--;
+
+ /* parse the header */
+ arstat = ares_parse((u_char *) hdr->hdr_val,