]> dgit.raspbian.org Git - dovecot.git/commit
[PATCH 06/14] lib-storage/mbox: Explicitly disable the header block size limit
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Sun, 19 Apr 2026 12:57:08 +0000 (15:57 +0300)
committerNoah Meyerhans <noahm@debian.org>
Wed, 16 Sep 2026 19:06:35 +0000 (15:06 -0400)
commit8a0927a3dccf5c454303e09eacc497ae7b010d95
tree80f53fdfd0b4098e2e52e87e0f2023a394f6f3f0
parenta694a694600c622be7fa935228340843a776fac3
[PATCH 06/14] lib-storage/mbox: Explicitly disable the header block size limit

mbox_sync_parse_next_mail() appends each header's raw bytes into
ctx->header and writes them back when rewriting the mbox file. The
default MESSAGE_HEADER_BLOCK_DEFAULT_MAX_SIZE limit (10 MB) must not
apply here: any truncation would corrupt the mbox on rewrite.
Similarly, mbox_sync_parse_match_mail() feeds full raw header bytes
into the MD5 verifier.

Today the per-chunk hdr->value delivered by message_parse_header_next()
is not clamped cumulatively, so the limit only bites on full_value and
unknown headers pass through intact. That is about to change - a
subsequent commit will clamp hdr->value cumulatively. Explicitly
setting SIZE_MAX here locks in the intent and prevents a regression.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Gbp-Pq: Name 0006-lib-storage-mbox-Explicitly-disable-the-header-block.patch
src/lib-storage/index/mbox/mbox-sync-parse.c