From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Markus Valentin Subject: [PATCH] Fix CVE-2026-42008 Upstream commits: auth: Fix prefixing forward_fields without a value from client https://github.com/dovecot/core/commit/ca55238f3716da3f1df945616c12690e1919c10a Taken from the Debian bookworm security update (dovecot 1:2.3.19.1+dfsg1-2.1+deb12u7), which carries these fixes for 2.3, and applied to 2.3.21.1. --- a/src/auth/auth-fields.c +++ b/src/auth/auth-fields.c @@ -124,7 +124,7 @@ void auth_fields_import_prefixed(struct for (; *arg != NULL; arg++) { value = strchr(*arg, '='); if (value == NULL) { - key = *arg; + key = *prefix != '\0' ? t_strconcat(prefix, *arg, NULL) : *arg; value = NULL; } else { key = t_strdup_until(*arg, value++);