]> dgit.raspbian.org Git - dovecot.git/commit
[PATCH] imap-login: Fix excessive memory growth with pre-login ID command
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Sat, 4 Jul 2026 16:04:04 +0000 (16:04 +0000)
committerNoah Meyerhans <noahm@debian.org>
Wed, 16 Sep 2026 19:06:35 +0000 (15:06 -0400)
commita6df4fe6b8663dd4db25715c7d5c66eddfe70ebb
tree48f42114d31f032cd78ea6e822533456374bc653
parentf856ad543b86bf7ad3ed7f0dfdebe74b6e79633c
[PATCH] imap-login: Fix excessive memory growth with pre-login ID command

The pre-login ID parser reset the per-argument line and list limits after
every argument, so nothing bounded the number of key/value pairs. Each
external key grew log_reply and added a distinct event field (a linear
scan, making it O(N^2)), allowing a pre-auth CPU/memory amplification.

Account at most 30 pairs (per RFC 2971) into the logging and client_id
bookkeeping. Internal x-* parameter handlers still run for pairs beyond
the limit, since a trusted proxy may legitimately forward more fields.

Gbp-Pq: Name 0001-imap-login-Fix-excessive-memory-growth-with-pre-logi.patch
src/imap-login/imap-login-client.h
src/imap-login/imap-login-cmd-id.c