Debian Patches

Status for dovecot/1:2.3.19.1+dfsg1-2.1+deb12u7

Patch Description Author Forwarded Bugs Origin Last update
CVE-2026-40013.patch lib-sieve: sieve-binary-code - Fix single byte oob stack buffer write in sieve_binary_emit_integer() Stephan Bosch <stephan.bosch@open-xchange.com> yes debian upstream https://github.com/dovecot/pigeonhole/commit/3f0af33abcc9911b586be9b5adc0afb3e9f18d25 2026-04-10
CVE-2026-73209/06-78c0aa283a.patch lib-compression: Iterate instead of recursing on zero-output decompress chunks

istream-lz4, istream-zlib and istream-bzlib each retried a read that
produced no output by tail-calling their own read function. A crafted
compressed stream can contain an unbounded number of chunks/steps that
each decompress to zero bytes - e.g. an lz4 stream of single-byte chunks
that each decode to nothing - so an attacker controlling the compressed
data can drive recursion depth proportional to the chunk count. Tail-call
optimization is not guaranteed, so this can exhaust the stack and crash
the process reading the stream.

Replace the recursive calls with continue inside the for(;;) loop
introduced in the previous commit, keeping stack usage O(1). Add a
regression test that feeds istream-lz4 a stream of 100000 empty chunks
and reads it in a single call.
Aki Tuomi <aki.tuomi@open-xchange.com> yes debian upstream https://github.com/dovecot/core/commit/78c0aa283ae0e4bdb205c8ef7d71f7fa938da4ab 2026-06-10
CVE-2026-73209/07-e78ae179b9.patch lib-compression: istream-zstd - Guard against no-progress loop in read

If ZSTD_decompressStream() returns with neither input consumed nor
output produced, the read loop would spin indefinitely. Add a check
after each call: if input.pos is unchanged and output.pos is zero,
treat it as a corrupt stream (EIO).
Aki Tuomi <aki.tuomi@open-xchange.com> yes debian upstream https://github.com/dovecot/core/commit/e78ae179b9b979871175792d6cb5ef2ba7aed8b4 2026-06-12
CVE-2026-42007/01-444972cfac.patch lib-sieve: util: edit-mail - Fix writing to freed memory Timo Sirainen <timo.sirainen@open-xchange.com> yes debian upstream https://github.com/dovecot/pigeonhole/commit/444972cfac3246b25c133c8868cfc013902cd1f3 2026-04-14
CVE-2026-42007/02-b49656de9a.patch lib-sieve: edit_mail_headers_parse() - Fix info leak via NUL-truncated header copy

i_strndup() stops at the first NUL byte, so embedded NULs caused field->data
to be shorter than field->size. This left stale heap data readable past the
copied content when callers treat data+body_offset as a string.

Adds a test-edit-mail unit test and a sieve testsuite case that both
exercise edit_mail_headers_parse() with a NUL byte embedded in a header
value. The unit test memcmp-verifies that the bytes after the NUL are
preserved; the sieve test triggers an invalid heap read detectable by
valgrind under the old code.
Timo Sirainen <timo.sirainen@open-xchange.com> yes debian upstream https://github.com/dovecot/pigeonhole/commit/b49656de9a7b766b7fa2736ad8dbcf05057b3732 2026-05-01
CVE-2026-42394/01-40a60ac716.patch lib: i_close_fd*() - Document that it preserves errno Timo Sirainen <timo.sirainen@open-xchange.com> no debian https://github.com/dovecot/core/commit/40a60ac7163180098415644506c62200bbb908a6 2026-06-03
CVE-2026-40205_CVE-2026-73208/05-6bce5fdab7.patch auth: db-oauth2: Reduce nesting in token_in_scope via early return Aki Tuomi <aki.tuomi@open-xchange.com> yes debian upstream https://github.com/dovecot/core/commit/6bce5fdab7c1d6da569db6d5c9f48e37573fbdd8 2026-06-03
CVE-2026-40205_CVE-2026-73208/06-de6f2c4e23.patch auth: db-oauth2: Fix scope check to require all configured scopes
Switch token-in-scope check to AND semantics: all configured scopes
must be present in the token. Behaviour now matches the JWT path.
Aki Tuomi <aki.tuomi@open-xchange.com> yes debian upstream https://github.com/dovecot/core/commit/de6f2c4e2393f856601074ec152dfa6c141042c4 2026-06-03
CVE-2026-40205_CVE-2026-73208/07-d9aa14dcb2.patch auth: db-oauth2: Add oauth2_audience setting, deprecate aud-as-scope fallback

Add a dedicated oauth2_audience setting checked against the token's aud
claim (RFC 7519 section 4.1.3) using the same tab-split AND-semantics as
oauth2_scope. Emit a deprecation warning when the existing aud fallback
in db_oauth2_token_in_scope() is triggered so operators know to migrate.
Aki Tuomi <aki.tuomi@open-xchange.com> yes debian upstream https://github.com/dovecot/core/commit/d9aa14dcb24b5d35f1799d6da9c2ff286cca65b6 2026-05-29
CVE-2026-40205_CVE-2026-73208/08-e953375267.patch auth: db-oauth2: Add local validation unit tests
Tests db_oauth2_lookup() with introspection_mode=local via dict-fs
fs-file key provider (HS256 HMAC keys). Covers valid token, expired
token, wrong username, bad signature, required scope, and required
audience through the full db_oauth2 code path.
Aki Tuomi <aki.tuomi@open-xchange.com> yes debian upstream https://github.com/dovecot/core/commit/e953375267123848ff3969048c6cfc056f104860 2026-05-29
CVE-2026-73209/01-cac140a9e4.patch lib-compression: Don't calculate crc32 if using zlib in deflate mode Michael M Slusarz <michael.slusarz@open-xchange.com> yes debian upstream https://github.com/dovecot/core/commit/cac140a9e4e12485bde4348b8a8c94a7a96a6e5e 2025-10-04
CVE-2026-73209/02-f54d261156.patch lib-compression: istream-lz4 - Use container_of() macro Aki Tuomi <aki.tuomi@open-xchange.com> yes debian upstream https://github.com/dovecot/core/commit/f54d2611567ad7c8f59e04b1190b29800898f1a1 2026-02-23
CVE-2026-73209/03-86aba25a11.patch lib-compression: istream-lz4 - Ensure uncompressed chunk size is not 0 Aki Tuomi <aki.tuomi@open-xchange.com> yes debian upstream https://github.com/dovecot/core/commit/86aba25a1159f7ff11480feec287647be78054d1 2026-02-23
CVE-2026-73209/04-f269b3d305.patch lib-compression: istream-lz4 - Try again if no data was decompressed Aki Tuomi <aki.tuomi@open-xchange.com> yes debian upstream https://github.com/dovecot/core/commit/f269b3d3051044aec31cef888fcf4c9ddd21c227 2026-02-23
CVE-2026-73209/05-a38aabc579.patch lib-compression: wrap *_read() in for(;;) loop (reindent only)
Prepare for the next commit: wrap the body of i_stream_lz4_read(),
i_stream_bzlib_read(), and i_stream_zlib_read() in a for(;;) loop.
No logic change; all paths still return on the first iteration.
Separating the indent churn makes the actual fix easier to review.
Aki Tuomi <aki.tuomi@open-xchange.com> yes debian upstream https://github.com/dovecot/core/commit/a38aabc5790590af3310edc467e7c8892c089875 2026-06-10
split-protocols.patch split-protocols

Set default protocols value as empty and enable each
protocol in its own configuration file
Marco Nenciarini <mnencia@debian.org> invalid 2011-03-05
fix-mail_plugin_dir-default.patch fix mail_plugin_dir default

Fix mail_plugin_dir default value in conf.d/10-mail.conf
Marco Nenciarini <mnencia@debian.org> no upstream 2011-09-16
ssl-cert-location.patch SSL cert location

Move dovecots generated X.509 certificate out of /etc/ssl where
it doesn't belong.
"Jaldhar H. Vyas" <jaldhar@debian.org> no upstream 2014-11-30
tcpwrapper.patch Add TCP wrapper support

Configuration file for TCP wrapper support.
Joerg Dorchain <joerg@dorchain.net> no upstream 2012-08-26
default-mail_location.patch default location for user mailboxes

Set a default for the case where a user has no mail so auto-
detection of mailboxes doesn't work.
"Jaldhar H. Vyas" <jaldhar@debian.org> no upstream 2017-09-20
mboxlocking.patch policy 22.6 compliant mbox write locking
For NFS safety, prefer fcntl to dotlocks.
Dovecots default is the other way around.
"Jaldhar H. Vyas" <jaldhar@debian.org> no upstream 2013-08-22
dovecot_name.patch Update Dovecot name to include Distribution in login greeting message

This patch was found at: https://blueprints.launchpad.net/ubuntu/+spec/servercloud-s-server-app-banner-updates
and originally provided by Ubuntu for their 2.1.7 package. The original
author is Yolanda Robla <yolanda.robla@canonical.com>. I updated it
for Debian's 2.2.5 package.
"Jaldhar H. Vyas" <jaldhar@debian.org> no 2020-05-23
ssl-dh-params-location.patch Set DH params location

This is mandatory for SSL support in 2.3
Apollon Oikonomopoulos <apoikos@debian.org> not-needed 2018-03-24
skip-rfc-subdir.patch Don't try to build doc/rfc subdir components Noah Meyerhans <noahm@debian.org> invalid 2020-05-21
Correct-misspellings.patch Correct misspellings
Found by Lintian
Christian Göttsche <cgzones@googlemail.com> no 2020-05-31
test-backtrace.patch Updates the symbol to check for in the backtrace unit tests
Updates the symbol to check for in the backtrace unit tests to
something that appears in all the traces on the platforms we support.
Noah Meyerhans <noahm@debian.org> no 2020-06-12
doveadm-director.1-drop-acute-accent.patch doveadm-director.1: drop acute accent
Found by Lintian:

This manual page uses the \' groff sequence. Usually, the intent to
generate an apostrophe, but that sequence actually renders as a an acute
accent.

For an apostrophe or a single closing quote, use plain '. For single
opening quote, i.e. a straight downward line ' like the one used in
shell commands, use &#92;(aq.
Christian Göttsche <cgzones@googlemail.com> no 2020-08-14
Fix-32bit-sign-comparisons.patch Fix 32bit sign comparisons
sieve-binary.c: In function 'sieve_binary_get_resource_usage':
sieve-binary.c:199:54: warning: comparison of integer expressions of different signedness: 'time_t' {aka 'long int'} and 'unsigned int' [-Wsign-compare]
199 | if (update_time != 0 && (ioloop_time - update_time) > timeout)
| ^
Christian Göttsche <cgzones@googlemail.com> no 2021-01-04
Improve-cross-compile-support.patch Improve cross-compile support
The check for the signedness of size_t really doesn't have to be run as
that is a compile time property.

Beyond that, dovecot uses mysql_config. I've looked into that and
mysql_config is unfixably broken during cross builds. It will not be
fixed. Instead, please use pkg-config. My patch implements that with a
fallback to mysql_config to avoid breaking other users.

Last but not least, src/lib-lua/Makefile.am adds $(LUA_LIBS) to
libdovecot_lua_la_DEPENDENCIES. As it happens, LUA_LIBS contains a -L
flag and when that flag shows up in a dependency, make gives up. I have
no clue why one would add LUA_LIBS to DEPENDENCIES as it already is
being correctly added to LIBADD. My patch suggests to quite simply drop
that.
Helmut Grohne <helmut@subdivi.de> no 2021-01-05
Silence-LTO-related-compiler-warning.patch Silence LTO related compiler warning
master-service-settings-cache.c: In function 'master_service_settings_cache_init_filter':
master-service-settings-cache.c:94:3: warning: 'error' may be used uninitialized in this function [-Wmaybe-uninitialized]
94 | i_error("master-service: cannot get filters: %s", error);
| ^
master-service-settings-cache.c:89:14: note: 'error' was declared here
89 | const char *error;
| ^
Christian Göttsche <cgzones@googlemail.com> no 2021-06-21
md4-md5-disable-optimization-causing-unaligned-access.patch md4/md5: disable optimization causing unaligned access
This restores unit tests with GCC 11 and LTO.

md5.c:92:23: warning: cast from 'const unsigned char *' to 'const uint32_t *' (aka 'const unsigned int *') increases required alignment from 1 to 4 [-Wcast-align]
STEP(F, a, b, c, d, SET(0), 0xd76aa478, 7)
~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
md5.c:51:4: note: expanded from macro 'SET'
(*(const uint32_t *)&ptr[(n) * 4])
^
md5.c:37:29: note: expanded from macro 'STEP'
(a) += f((b), (c), (d)) + (x) + (t); \
^

md5.c:92:3: runtime error: load of misaligned address 0x61900000008b for type 'const uint32_t' (aka 'const unsigned int'), which requires 4 byte alignment
0x61900000008b: note: pointer points here
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
^
Christian Göttsche <cgzones@googlemail.com> no 2021-12-07
Support-openssl-3.0.patch Support openssl 3.0 Michal Hlavinka no https://bugzilla.redhat.com/show_bug.cgi?id=1962035 2022-05-11
Debug-flaky-unit-test.patch Debug flaky unit test
See #1007744
Christian Göttsche <cgzones@googlemail.com> no 2022-06-06
Avoid-usage-of-PATH_MAX-not-available-on-hurd.patch Avoid usage of PATH_MAX not available on hurd Christian Göttsche <cgzones@googlemail.com> no 2022-06-06
auth-Fix-handling-passdbs-with-identical-driver-args-but-.patch auth: Fix handling passdbs with identical driver/args but different mechanisms/username_filter

The passdb was wrongly deduplicated in this situation, causing wrong
mechanisms or username_filter setting to be used. This would be a rather
unlikely configuration though.

Fixed by moving mechanisms and username_filter from struct passdb_module
to struct auth_passdb, which is where they should have been in the first
place.
Timo Sirainen <timo.sirainen@open-xchange.com> no 2022-05-09
auth-Add-a-comment-about-updating-userdb_find.patch auth: Add a comment about updating userdb_find() Timo Sirainen <timo.sirainen@open-xchange.com> no 2022-05-16
Fix-uninitialized-read-in-doveadm-oldstats.patch Fix uninitialized read in doveadm-oldstats
The third argument to doveadm_cmd_param_bool() is only set on a return
value of TRUE.
Since disk_input_field and disk_output_field should be set if the value
of show-disk-io is specified and specified to true, fix the condition.

doveadm-oldstats.c: In function 'cmd_stats_top':
doveadm-oldstats.c:551:63: warning: 'b' may be used uninitialized [-Wmaybe-uninitialized]
551 | if (!doveadm_cmd_param_bool(cctx, "show-disk-io", &b) && b) {
| ^
doveadm-oldstats.c:545:14: note: 'b' was declared here
545 | bool b;
| ^
Christian Göttsche <cgzones@googlemail.com> no 2022-07-23
CVE-2024-23184.patch Upstream fix for CVE-2024-23184 Timo Sirainen <timo.sirainen@open-xchange.com> no https://github.com/dovecot/core/compare/8e4c42d%5E...1481c04.patch
CVE-2024-23185.patch Upstream fix for CVE-2024-23185 Marco Bettini <marco.bettini@open-xchange.com> no 2024-04-12
CVE-2025-59031.patch [PATCH 02/24] fts: Remove decode2text.sh
The script is flawed and not fit for production use, should
recommend writing your own script, or using Apache Tika.
Aki Tuomi <aki.tuomi@open-xchange.com> no 2026-01-08
CVE-2025-59032.patch managesieve-login: Fix crash when command didn't finish on the first call Timo Sirainen <timo.sirainen@open-xchange.com> no 2025-12-22
CVE-2026-0394-1.patch auth: db-passwd-file - Add db_passwd_fix_path() Aki Tuomi <aki.tuomi@open-xchange.com> no 2024-11-13
CVE-2026-0394-2.patch auth: db-passwd-file - Normalize path with db_passwd_fix_path()

Otherwise there is a chance that we leak one ../
Aki Tuomi <aki.tuomi@open-xchange.com> no 2024-11-13
CVE-2026-27855-1.patch [PATCH 21/24] auth: cache - Use translated username in auth_cache_remove() Aki Tuomi <aki.tuomi@open-xchange.com> no 2026-03-09
CVE-2026-27855-2.patch [PATCH 22/24] auth: Move passdb event lifecycle handling to auth_request_passdb_event_(begin|end) Aki Tuomi <aki.tuomi@open-xchange.com> no 2026-03-11
CVE-2026-27855-3.patch [PATCH 23/24] auth: Initialize set_credentials event properly
Fixes update_query
Aki Tuomi <aki.tuomi@open-xchange.com> no 2026-03-09
CVE-2026-27855-4.patch [PATCH 24/24] auth: passdb-sql - Require update_query to be set when used Aki Tuomi <aki.tuomi@open-xchange.com> no 2026-03-11
CVE-2026-27856-1.patch [PATCH 16/24] doveadm: client-connection - Use timing safe credential check Aki Tuomi <aki.tuomi@open-xchange.com> no 2026-03-04
CVE-2026-27856-2.patch [PATCH 17/24] doveadm: Use datastack for temporary b64 value
There is no need to allocate it from connection pool.
Aki Tuomi <aki.tuomi@open-xchange.com> no 2026-03-04
CVE-2026-27856-3.patch [PATCH 18/24] doveadm: client-connection - Get API key from per-connection settings Aki Tuomi <aki.tuomi@open-xchange.com> no 2026-03-04
CVE-2026-27857-1.patch [PATCH 1/2] plugins: imap-filter-sieve: imap-filter-sieve - Adjust to imap_parser_create() API change Timo Sirainen <timo.sirainen@open-xchange.com> no 2026-03-06
CVE-2026-27857-2.patch [PATCH 12/24] lib-imap, global: Add params parameter to imap_parser_create() Timo Sirainen <timo.sirainen@open-xchange.com> no 2026-03-06
CVE-2026-27857-3.patch [PATCH 13/24] lib-imap: Add imap_parser_params.list_count_limit Timo Sirainen <timo.sirainen@open-xchange.com> no 2026-03-06
CVE-2026-27857-4.patch [PATCH 14/24] imap-login: Limit the number of open IMAP parser lists
This prevents attackers from using a large number of '(' in a command to
grow memory usage excessively.
Timo Sirainen <timo.sirainen@open-xchange.com> no 2026-03-06
CVE-2026-27857-5.patch [PATCH 15/24] global: Use const for struct imap_parser_params params Timo Sirainen <timo.sirainen@open-xchange.com> no 2026-03-02
CVE-2026-27858.patch [PATCH 2/2] managesieve-login: Verify AUTHENTICATE initial response size isn't too large

This prevents DoSing the managesieve-login by sending an excessively large
initial response size, which causes a huge memory allocation.
Timo Sirainen <timo.sirainen@open-xchange.com> no 2026-03-02
CVE-2026-27859.patch [PATCH 03/24] lib-mail: Limit the number of RFC2231 parameters that can be parsed

This avoids excessive CPU usage especially in result_append().
Timo Sirainen <timo.sirainen@open-xchange.com> no 2026-02-24
CVE-2026-40016.patch lib-sieve: Enforce CPU time limit within :contains and :matches matcher loops

The naive O(N*M) substring search in mcht-contains.c and the naive find loop
in mcht-matches.c can run for hours on a large value (e.g. a message body),
completely bypassing sieve_max_cpu_time because that limit was only checked
between bytecode operations.

Expose the active CPU limit via sieve_runtime_cpu_limit_exceeded() and poll
it every 4096 inner iterations. When the limit is hit the match returns
SIEVE_EXEC_RESOURCE_LIMIT, matching the existing behavior at the bytecode
boundary. This is a minimal safety net ahead of switching the matchers to
algorithms that do not require it.
Timo Sirainen <timo.sirainen@open-xchange.com> no 2026-04-19
CVE-2026-33603.patch login-common: Only accept base64 in sasl Aki Tuomi <aki.tuomi@open-xchange.com> no 2026-04-08
CVE-2026-40020-1.patch [PATCH 1/3] acl: Add acl_id_is_valid()
Returns TRUE if the ACL identifier string is at most ACL_ID_MAX_LEN
(1024) bytes long, contains no control characters and is valid UTF-8.
Timo Sirainen <timo.sirainen@open-xchange.com> no 2026-04-22
CVE-2026-40020-2.patch [PATCH 2/3] imap-acl: Fail if ACL identifier is invalid
Reject invalid identifiers early in imap_acl_identifier_parse() using
acl_id_is_valid(). This prevents CR/LF injection and rejects identifiers
that are too long, contain control characters or are not valid UTF-8.
Timo Sirainen <timo.sirainen@open-xchange.com> no 2026-04-22
CVE-2026-40020-3.patch [PATCH 3/3] acl: Assert-crash if ACL identifier is invalid before writing it

It should have been checked earlier already.
Timo Sirainen <timo.sirainen@open-xchange.com> no 2026-04-22
CVE-2026-42006.patch lib-imap: Fix imap_parser_params.list_count_limit to actually work

The previous fix in d0f67b52914565a35f3817335ab9633cb291513c was
accidentally limiting the number of ')', not the number of '('.
Timo Sirainen <timo.sirainen@open-xchange.com> no 2026-04-27
lib-test-Add-test_assert_memcmp.patch lib-test: Add test_assert_memcmp*() Stephan Bosch <stephan.bosch@open-xchange.com> no https://github.com/dovecot/core/commit/4677492d038f5187363790b5a93bd5fccc989a98 2025-07-25
lib-test-Require-both-lengths-in-test_assert_memcmp.patch lib-test: Require both lengths in test_assert_memcmp() Aki Tuomi <aki.tuomi@open-xchange.com> no https://github.com/dovecot/core/commit/8f04979a7e72d3b3e04f3a93bd8088f5e2332dd9 2026-01-27
CVE-2026-33604/01-8e254544cd.patch lib-mail: o_stream_dot_sendv() - Use I_MIN() Marco Bettini <marco.bettini@open-xchange.com> yes debian upstream https://github.com/dovecot/core/commit/8e254544cd8314092b4e3b2e7654df34b73e721b 2026-04-10
CVE-2026-33604/02-b5921303c9.patch lib-mail: o_stream_dot_sendv() - Fix boundary off by one Marco Bettini <marco.bettini@open-xchange.com> yes debian upstream https://github.com/dovecot/core/commit/b5921303c9ba9ae51b68a3a9f0ef2be1fdb35cc0 2026-04-20
CVE-2026-33604/03-0e9af24dc0.patch lib-mail: o_stream_dot_sendv() - Use enumeration to define the items to inject Marco Bettini <marco.bettini@open-xchange.com> yes debian upstream https://github.com/dovecot/core/commit/0e9af24dc0d191be3c8ba7747a00a54337c6fd9a 2026-04-10
CVE-2026-33604/04-5d8bea193d.patch lib-mail: o_stream_dot_sendv() - Do not send unguarded '.' after bare '\r' Marco Bettini <marco.bettini@open-xchange.com> yes debian upstream https://github.com/dovecot/core/commit/5d8bea193dec2d2a065868f383738ba6625f839e 2026-04-08
CVE-2026-33607.patch lib-imap: imap-match - Limit backtracking to 20k to mitigate excessive CPU usage

Return IMAP_MATCH_NO when exceding the backtracking limit.

We can't use the upstream fix at e487bab78ac4b8c38621f29e56ffb5ac2e739658
since 2.3 lacks the grapheme cluster logic.
Guilhem Moulin <guilhem@debian.org> yes debian upstream https://github.com/dovecot/core/commit/e487bab78ac4b8c38621f29e56ffb5ac2e739658#diff-7fa3a9504538f178768669758fc0c71a12c3b629730be94d82f7b17ab815eb22 2026-09-18
CVE-2026-27852/01-a67a9464ac.patch imap: Stream BODYSTRUCTURE to client without ostream memory duplication

For huge BODYSTRUCTURE responses (messages with many MIME parts),
o_stream_send_str() caused the ostream to copy the entire string into
its ring buffer when the stream was corked, doubling memory usage.

Use the same o_stream_set_max_buffer_size(0) + o_stream_send_istream()
pattern as fetch_stream_continue() so the ostream buffer stays at 0
bytes and the I/O loop handles flow control via WAIT_OUTPUT.
Timo Sirainen <timo.sirainen@open-xchange.com> yes debian upstream https://github.com/dovecot/core/commit/a67a9464acad60a337a31ac6fb3f36df95f002eb 2026-04-17
CVE-2026-27852/02-2837d1e1fe.patch imap: Stream ENVELOPE to client without ostream memory duplication
Same fix as for BODYSTRUCTURE: avoid copying the envelope string into
the ostream ring buffer by using o_stream_set_max_buffer_size(0) +
o_stream_send_istream() with a continuation handler.
Timo Sirainen <timo.sirainen@open-xchange.com> yes debian upstream https://github.com/dovecot/core/commit/2837d1e1fe5af07d09c10f6c09fb7fcca85a89c8 2026-04-17
CVE-2026-27852/03-be07a3c783.patch lib-mail: message-parser-from-parts: Enforce 50 MB all-headers-max-size limit

The preparsed (from-parts) header parser was not tracking
all_headers_total_size and never called message_parse_header_lower_limit(),
so the cumulative 50 MB header size limit was never applied when re-parsing
a message using cached part structure.

Fix by mirroring the same tracking that message-parser.c does in its
parse_next_header_block(): update all_headers_total_size for each parsed
header line, and call message_parse_header_lower_limit() with the remaining
budget when initialising the per-part header parser.
Timo Sirainen <timo.sirainen@open-xchange.com> yes debian upstream https://github.com/dovecot/core/commit/be07a3c783fd9359ddd5b183becb0da17f3d743c 2026-04-16
CVE-2026-27852/04-e4b8d305ce.patch lib-mail: Add count field to struct message_address_list
Add a count field and increment it in add_address() so callers can read
the number of parsed addresses directly from the list struct without
walking the linked list.
Timo Sirainen <timo.sirainen@open-xchange.com> yes debian upstream https://github.com/dovecot/core/commit/e4b8d305ce0dd48843e69b8b3b235f275e89c93f 2026-04-17
CVE-2026-27852/05-33461dedda.patch 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.
Timo Sirainen <timo.sirainen@open-xchange.com> yes debian upstream https://github.com/dovecot/core/commit/33461dedda0f09793b2b7c8a7990935fa322a897 2026-04-19
CVE-2026-27852/06-17e5f5d27b.patch lib-mail: istream-header-filter - Use container_of() for struct casts

Replace the C-style downcasts from struct istream_private/iostream_private
to struct header_filter_istream with container_of(), matching the
convention used by other istream implementations in tree.
Timo Sirainen <timo.sirainen@open-xchange.com> yes debian upstream https://github.com/dovecot/core/commit/17e5f5d27b3b35fd9195da77feb555fbbdc08263 2026-04-20
CVE-2026-27852/07-0a7a98851b.patch lib-mail: Make istream-header-filter's per-header size limit configurable

Until now the internal message_header_parser_ctx used the default
MESSAGE_HEADER_BLOCK_DEFAULT_MAX_SIZE (10 MB) cap. In practice that cap
only bounded hdr->full_value; per-chunk hdr->value was delivered in full
regardless. A subsequent change to message_parse_header_next() will
clamp hdr->value cumulatively as well, and at that point the 10 MB
default would silently truncate data for callers like mbox-save that
stream raw header bytes to storage.

Default the filter to SIZE_MAX (unlimited) to preserve the effective
behavior and add i_stream_header_filter_set_max_header_block_size() so
callers that genuinely want a cap (index_mail_get_header_stream()) can
opt in.
Timo Sirainen <timo.sirainen@open-xchange.com> yes debian upstream https://github.com/dovecot/core/commit/0a7a98851b0f49759780156e2bfd0e4ec19752fc 2026-04-19
CVE-2026-27852/08-94454090c1.patch lib-storage: Cap per-header size in index_mail_get_header_stream()
Apply MESSAGE_HEADER_BLOCK_DEFAULT_MAX_SIZE (10 MB) to the header-filter
istream used for populating the header cache. A pathological single
header (for example a To: with millions of addresses) otherwise grows
mail->header_data and the cache write buffer in lockstep with the raw
header size, which can push the imap process over vsz_limit on FETCH
ENVELOPE / BODYSTRUCTURE.

On its own this change does not yet bound hdr->value delivery; that
requires the upcoming change to message_parse_header_next() to clamp
per-chunk value_len cumulatively. Setting the limit here now lets that
follow-up take effect without further touching this file.
Timo Sirainen <timo.sirainen@open-xchange.com> yes debian upstream https://github.com/dovecot/core/commit/94454090c12b6a4081fb75559e24ab024a66cf27 2026-04-19
CVE-2026-27852/09-fc7a4eef0f.patch lib-mail: Clamp hdr->value cumulatively against header_block_max_size

Until now header_block_max_size only bounded hdr->full_value via
value_buf. Continued chunks returned to the caller via hdr->value were
left at the raw chunk size, so a caller that consumed hdr->value per
chunk without ever requesting use_full_value (e.g. the header-cache
path in index_mail_parse_header()) could accumulate the full raw header
size. A pathological To: with millions of addresses could grow
mail->header_data and the cache write buffer to tens of megabytes each,
driving the imap process over vsz_limit on FETCH ENVELOPE.

Reinterpret header_block_total_size as the running sum of line_value_size
across all chunks of all headers, and clamp each new chunk against the
remaining header_block_max_size budget. Propagate the clamped size to
line->value_len in the two continued-line branches that previously left
it untouched. value_buf is bounded implicitly since every append uses
line_value_size. The up-front per-chunk clamp
(line->value_len = MIN(value_len, max_size)) is now subsumed by the
cumulative clamp and has been removed.

Update the truncation tests that were documenting the old
"value_len stays at raw chunk size" behavior.
Timo Sirainen <timo.sirainen@open-xchange.com> yes debian upstream https://github.com/dovecot/core/commit/fc7a4eef0f7166acb4aafe995930ddc0da9f7cf6 2026-04-20
CVE-2026-27852/10-c528278698.patch lib-mail: Introduce struct message_part_data_limits and thread it through parsers

Add an empty struct message_part_data_limits and pass it by pointer through
message_part_data_parse_from_header() and message_part_envelope_parse_from_header().

No behaviour change: the struct has no fields yet and no limits are applied.
Subsequent commits add the individual limit fields and enforcement.
Timo Sirainen <timo.sirainen@open-xchange.com> yes debian upstream https://github.com/dovecot/core/commit/c5282786988d6be67d74067908f27e5480938a00 2026-04-17
CVE-2026-27852/11-a973e668bc.patch lib-mail: Limit total address count per message to 100 000
A message with millions of addresses across all its envelope headers can
exhaust memory when parsed (each struct message_address is ~100 bytes
regardless of whether the raw address is only a few bytes long).

Add remaining_addresses to struct message_part_data_limits, initialised to
MESSAGE_PART_DATA_MAX_TOTAL_ADDRESSES (100 000). Pass the remaining budget
as max_addresses to message_address_parse_full() so parsing stops at the
limit, then deduct the actual count parsed from the budget.
Timo Sirainen <timo.sirainen@open-xchange.com> yes debian upstream https://github.com/dovecot/core/commit/a973e668bcdbfba8c0ceb1ed74b091b82cab501a 2026-04-17
CVE-2026-27852/12-a1baaddc23.patch lib-mail: Limit total Content-Language tag count per message to 100 000

A multipart message with many MIME parts each containing many language tags
can exhaust memory: the per-part RFC 2231 parser had no cumulative limit.

Add remaining_language_tags to struct message_part_data_limits, initialised
to MESSAGE_PART_DATA_MAX_TOTAL_LANGUAGE_TAGS (100 000). Break out of the
tag-parsing loop in parse_content_language() once the budget reaches zero.
Timo Sirainen <timo.sirainen@open-xchange.com> yes debian upstream https://github.com/dovecot/core/commit/a1baaddc23493a9061fe5430085b36ce8543bae6 2026-04-17
CVE-2026-27852/13-69868fbdb0.patch lib-mail: Limit total MIME parameter count per message to 200 000
Content-Type and Content-Disposition parameters are both parsed through
parse_mime_parameters(). A message with many MIME parts each having many
parameters can accumulate millions of struct message_part_param entries.

Add remaining_mime_params to struct message_part_data_limits (combined
budget for both Content-Type and Content-Disposition), initialised to
MESSAGE_PART_DATA_MAX_TOTAL_MIME_PARAMS (200 000). Cap params_count to the
remaining budget before allocating and deduct accordingly.
Timo Sirainen <timo.sirainen@open-xchange.com> yes debian upstream https://github.com/dovecot/core/commit/69868fbdb06aa08ee74b1031d5cb461a73394006 2026-04-17
CVE-2026-33606/01-116bab8d7e.patch dsync: Avoid potentially excessive data stack growth for mailbox attribute sending

The attribute value can be large.
Timo Sirainen <timo.sirainen@open-xchange.com> yes debian upstream https://github.com/dovecot/core/commit/116bab8d7e4acedae628cc88772049bc08a36047 2026-03-24
CVE-2026-33606/02-3f73c11d0e.patch dsync: Fix escaping mail or attribute value that begins with a "." line

Such a mail or attribute would have escaped the value parameter and the rest
of the value would have been processed as dsync stream commands.
Timo Sirainen <timo.sirainen@open-xchange.com> yes debian upstream https://github.com/dovecot/core/commit/3f73c11d0ebcfebbda0225699f30513efd8c77f4 2026-03-24
CVE-2026-33605/01-4ef39dbda7.patch lib-managesieve: managesieve-parser - Fix handling of lone CR character Stephan Bosch <stephan.bosch@open-xchange.com> yes debian upstream https://github.com/dovecot/pigeonhole/commit/4ef39dbda7ed2c4f48e8aa91420075132ea723cf 2026-04-11
CVE-2026-33605/02-19dc05d272.patch managesieve-login: client_skip_line() - Discard data when newline is not found

Without this, data without a newline (e.g., from a lone CR protocol violation
detected by the parser) stays in the buffer indefinitely. This prevents the
server from ever detecting client disconnect, causing a deadlock where both
sides wait for the other.

The post-login server-side client_skip_line() in managesieve-client.c already
handles this correctly by always calling i_stream_skip().
Aki Tuomi <aki.tuomi@open-xchange.com> yes debian upstream https://github.com/dovecot/pigeonhole/commit/19dc05d272c7d30cd80828f304dd9e9e7516063c 2026-05-25
CVE-2026-40015/01-a880d0bc56.patch imap-hibernate: Fix out-of-bounds read when parsing DONE command tag
The tag-skipping loop was missing a size>0 guard, so a malformed
DONE command with no space/CR/tab terminator after the tag would
read one byte past the end of the buffer. Also add a \0 check to
stop on embedded null bytes, which are not valid tag characters.
Timo Sirainen <timo.sirainen@open-xchange.com> yes debian upstream https://github.com/dovecot/core/commit/a880d0bc5600d338cc6fb21e30a16a7257687b64 2026-04-16
CVE-2026-40015/02-e767537bfa.patch imap-hibernate: Use imap-parser API for parsing DONE command
Replace the ad-hoc DONE/IDLE tokenizer with imap-parser.h: use
imap_parser_read_tag() to read the tag and imap_parser_read_word() to
read the DONE and IDLE keywords. This delegates bounds checks and
character validation to the shared parser.
Timo Sirainen <timo.sirainen@open-xchange.com> yes debian upstream https://github.com/dovecot/core/commit/e767537bfa1bc71b69312691152c3d6bc92f8a50 2026-04-22
CVE-2026-42008.patch auth: Fix prefixing forward_fields without a value from client
Bare tokens (without '=') were not prefixed, only key=value pairs were.
In practice this affected forward_fields, where a bare token such as
'nopassword' would land in extra_fields unprefixed instead of as
'forward_nopassword', allowing injection of internal auth control fields.
Markus Valentin <markus.valentin@open-xchange.com> yes debian upstream https://github.com/dovecot/core/commit/ca55238f3716da3f1df945616c12690e1919c10a 2026-04-23
CVE-2026-40203/01-370f4d49f1.patch lib-compression: Add o_stream_deflate_reset_dict()
New public function that locates the deflate ostream in the parent chain
(transparently handles rawlog wrappers) and schedules a Z_FULL_FLUSH on
the next uncork/flush. Z_FULL_FLUSH emits all buffered data and then
resets the deflate dictionary, so subsequent compressed output cannot
reference data from before the call.

Adds a pending_dict_reset flag to struct zlib_ostream. The flag persists
through partial flush retries and is cleared only once the full flush
loop completes.
Timo Sirainen <timo.sirainen@open-xchange.com> yes debian upstream https://github.com/dovecot/core/commit/370f4d49f1a3c62a7b7831ed9218bbb9755740ed 2026-04-16
CVE-2026-40203/02-38350a7c28.patch imap: Reset DEFLATE dictionary after every tagged reply
Prevents CRIME-style cross-command compression oracle attacks
(CVE-class: compression side-channel). Without this fix an observer
who can inject chosen plaintext into one IMAP command's response can
measure the compressed size of a subsequent command's response and
determine whether the secret content matches the injected plaintext.

After each tagged response line is sent, the DEFLATE compression
dictionary is reset via Z_FULL_FLUSH so that the compression history
from one command cannot influence the compressed size of the next.
Timo Sirainen <timo.sirainen@open-xchange.com> yes debian upstream https://github.com/dovecot/core/commit/38350a7c284b8de7e02ca60e173abdb76848a216 2026-04-16
CVE-2026-40017/01-a308c4bb8d.patch lib: Add XXH64 hash implementation
Adds a streaming XXH64 (non-cryptographic) hash with init/loop/result
API, a one-shot xxh64_data(), and an xxh64_to_32() XOR-fold inline.
Registered in hash_methods[] for use via the generic hash_method API.
Timo Sirainen <timo.sirainen@open-xchange.com> yes debian upstream https://github.com/dovecot/core/commit/a308c4bb8d7a3ba0a2c6a7bcd1456d6730261f60 2026-04-13
CVE-2026-40017/02-7de0c5f0f5.patch lib: Replace str_hash/strcase_hash with xxh64
Replaces the old ASU-derived shift-and-XOR hash with xxh64_to_32(),
which provides better distribution and avalanche properties.
strcase_hash feeds each i_toupper()'d byte through the streaming API.

The 2.3 relies on the existing `str_hash()` implementation for the `%H`
variable subtitutions, so copy it to src/lib/var-expand.c rather that
deleting it.
Timo Sirainen <timo.sirainen@open-xchange.com> yes debian upstream https://github.com/dovecot/core/commit/7de0c5f0f5f386cbc11bfb30f422e575d80ed150 2026-04-13
CVE-2026-40017/03-356468362b.patch lib: Add str_stable_hash()
For now this is the same as str_hash(), but this is changed in a following
commit.
Timo Sirainen <timo.sirainen@open-xchange.com> yes debian upstream https://github.com/dovecot/core/commit/356468362b39241a5f35f9947fd2679cd09b1b22 2026-04-13
CVE-2026-40017/04-9896a67986.patch lib: Key str_hash/strcase_hash with a random seed to prevent HashDoS
hash_init() fills a process-wide uint64_t hash_iv via random_fill()
at lib_init() time (after random_init()). str_hash() and strcase_hash()
pass hash_iv as the xxh64 seed so an attacker cannot predict bucket
placement and manufacture collision chains.
Timo Sirainen <timo.sirainen@open-xchange.com> yes debian upstream https://github.com/dovecot/core/commit/9896a67986a405c33c2a7fcda030d451df689503 2026-04-13
CVE-2026-42394/02-3ad0946aac.patch lib: path-util - Add t_openat_safe() for jailed openat() resolution
Add a helper that opens a path relative to a directory fd while refusing
any resolution that escapes that directory. Each component is opened with
O_NOFOLLOW so symlinks are detected explicitly rather than transparently
followed; symlinks are then resolved manually and only honoured when their
(recursively resolved) target also stays beneath the base fd. Absolute
symlink targets, leading '/', and '..' past the base are rejected with
errno=ELOOP. Symlink chains are bounded by
PATH_UTIL_OPENAT_SAFE_MAX_SYMLINKS hops.

Anchoring resolution at a caller-held base_fd makes the lookup TOCTOU-safe
even when intermediate path components are mutated on disk concurrently:
the kernel resolves all openat() lookups relative to the original
directory inode that base_fd refers to, so an attacker mutating path
components on the filesystem cannot redirect resolution.

This is the portable counterpart to Linux's openat2() with RESOLVE_BENEATH
and is intended for callers that need to safely look up files under a
user-writable directory (e.g. a Sieve script storage directory).
Timo Sirainen <timo.sirainen@open-xchange.com> no debian https://github.com/dovecot/core/commit/3ad0946aacdb6b18927570d1fb29c53e5d157a01 2026-05-04
CVE-2026-40017/05-8d4ff69d4a.patch lib-index: mail-index-strmap - Fix OOB read from truncated record size Aki Tuomi <aki.tuomi@open-xchange.com> yes debian upstream https://github.com/dovecot/core/commit/8d4ff69d4a40d1073946823cd0f7c1d937f51aee 2026-08-17
CVE-2026-40017/06-9c50e0f64f.patch lib-index: Rename crc32 variables/parameters to hash in strmap
Pure rename - no functional change. The stored 32-bit value is still
produced by crc32_str_nonzero(); only the identifiers change to prepare
for swapping the hash algorithm in the next commit.

recs_crc32 -> recs_hash, hash_key.crc32 -> hash_key.hash,
crc32_r -> hash_r, local crc32 -> hash, *crc32 -> *hashes.
Timo Sirainen <timo.sirainen@open-xchange.com> yes debian upstream https://github.com/dovecot/core/commit/9c50e0f64f35485f27208732cc8c694add5fc133 2026-04-13
CVE-2026-40017/07-d34ac20f89.patch lib-index: Add keyed xxh64 strmap format v2, gated by config version
The on-disk hash stored in the strmap file is now optionally a keyed
xxh64_to_32() with a per-file random 64-bit IV stored in the file
header. This replaces the previous plain crc32_str_nonzero() output
and hardens the strmap against deliberately-collided message-id
hashes. The v1 (crc32) format remains fully readable and writable
so older configurations keep working without forced rebuilds.

On-disk:
- v1 header is 8 bytes: version, 3 unused, uid_validity (unchanged).
- v2 header is 16 bytes: version, compat_flags, 2 unused, uid_validity,
hash_iv. The first 8 bytes of v2 align with v1 byte-for-byte, so
the open path reads 8 bytes, dispatches on version, and reads the
trailing 8 bytes only for v2.

Runtime:
- strmap->enable_xxh64 selects the format used when creating a new
file (or recreating one whose uid_validity has changed).
- view->format_version follows the on-disk file when one exists; for
fresh files it follows the strmap-wide preference.
- Renumber recreate_write() preserves view->format_version, so we
never silently migrate an existing file across the threshold while
it is still in use - the migration only happens at open time.
- When enable_xxh64 is TRUE and the on-disk file is v1, open treats
it as a version mismatch: the file is unlinked and the next sync's
recreate_write() produces a v2 file. Below the threshold v1 stays
v1 indefinitely.
- strmap_hash_str() dispatches per-view, so v1 files keep using
crc32 hashes and v2 files use keyed xxh64 even in mixed setups.
Timo Sirainen <timo.sirainen@open-xchange.com> yes debian upstream https://github.com/dovecot/core/commit/d34ac20f89bef60f91cd898e431018ee57061125 2026-04-30
CVE-2026-40017/08-0ad27eb7e6.patch lib-storage: thread - Avoid excessive data stack growth with many References msgids Timo Sirainen <timo.sirainen@open-xchange.com> yes debian upstream https://github.com/dovecot/core/commit/0ad27eb7e68e9999f7979d38b5d2d87c18bc9219 2026-04-13
CVE-2026-40017/09-ac5ee9f37a.patch doveadm: Fix ubsan unsigned integer overflow error Timo Sirainen <timo.sirainen@open-xchange.com> yes debian upstream https://github.com/dovecot/core/commit/ac5ee9f37a6afadf23722a7ed55932a6afcf6ffe 2026-04-16
xxh64-endian-fix.patch lib: xxh64: fix byte ordering issue on big-endian systems Noah Meyerhans <noahm@debian.org> yes debian 2026-09-01
CVE-2026-42395/01-a1ce604684.patch submission-login: Fix parsing multiple XCLIENT FORWARD parameters
Each such parameter was intended to replace the previous one, but
the code was only deleting the string without adding the new string.
This didn't really matter, since Dovecot would only ever send a
single FORWARD parameter.
Timo Sirainen <timo.sirainen@open-xchange.com> yes debian upstream https://github.com/dovecot/core/commit/a1ce604684d5920001a2768dacc00ab00050c8af 2022-06-23
CVE-2026-42395/02-ac69e4c335.patch pop3/submission-login: Split off a common client_forward_decode_base64() Timo Sirainen <timo.sirainen@open-xchange.com> yes debian upstream https://github.com/dovecot/core/commit/ac69e4c3351f8e65e8af18a3befe40a7844aa0e6 2022-06-23
CVE-2026-42395/03-7fc304a810.patch login-common: Fix crash when XCLIENT FORWARD= base64 contains NUL byte

Sending "XCLIENT FORWARD=AA==" (base64 for a single NUL byte) followed
by a regular login crashed pop3-login (and other login services) with:

Panic: file ../../src/lib/array.h: line 275 (array_idx_i):
assertion failed: (idx < array->buffer->used / array->element_size)

p_strsplit_tabescaped() truncates at the first NUL, so an all-NUL
payload produced an empty fields list. forward_fields was still
created (but empty), and the later array_front() call in
sasl_server_auth_begin() then panicked on the empty array.

Reject empty payloads and payloads containing NUL bytes during base64
decode, so the array is never created in this case.
Timo Sirainen <timo.sirainen@open-xchange.com> yes debian upstream https://github.com/dovecot/core/commit/7fc304a8109fe484ab4026b4cfbe39ce82351319 2026-05-03
CVE-2026-40014/01-fe6b8a4c53.patch lib-storage: thread - Limit References: header msgid count to prevent O(N^2) CPU usage

Cap per-message References ingestion at MAIL_THREAD_REFERENCES_MAX (1000)
in mail_thread_map_add_mail(). Without this limit a single crafted email
with N unique Message-IDs triggers N(N-1)/2 ancestor traversals in
thread_node_has_ancestor(), allowing unauthenticated DoS via mail delivery.
Timo Sirainen <timo.sirainen@open-xchange.com> yes debian upstream https://github.com/dovecot/core/commit/fe6b8a4c5305b106ae68a197ee301d8fe3f38672 2026-04-16
CVE-2026-40014/02-2818f84d9e.patch lib-storage: thread - Limit ancestor chain traversal depth to prevent O(N^2) CPU usage

The per-message References limit (MAIL_THREAD_REFERENCES_MAX) prevents a
single crafted message from causing O(N^2) traversals in
thread_node_has_ancestor(). However, multiple crafted messages each
containing 1000 References entries can build an arbitrarily deep ancestor
chain across the mailbox, causing the same quadratic blowup spread over
many messages: processing email k costs O(k * MAIL_THREAD_REFERENCES_MAX)
steps, giving O(M^2 * MAIL_THREAD_REFERENCES_MAX) total for M emails.

Fix this by limiting the traversal depth in thread_node_has_ancestor() to
MAIL_THREAD_REFERENCES_MAX steps. When the limit is reached the link is
dropped, bounding per-email work to O(MAIL_THREAD_REFERENCES_MAX^2)
regardless of how deep the chain was built by prior messages.
Timo Sirainen <timo.sirainen@open-xchange.com> yes debian upstream https://github.com/dovecot/core/commit/2818f84d9e4f93d9997f9cc7b1cc55a7cacb85a0 2026-04-17
CVE-2026-42393/01-e07df7e2a8.patch lib: Add str_equals_timing_safe()
Constant-time string comparison that avoids the length leak in
str_equals_timing_almost_safe(). Compares HMAC-SHA256 digests of the
inputs (keyed with hash_iv) rather than the strings themselves, so
neither the contents nor the length of either input affects timing in
a way an attacker can exploit.
Timo Sirainen <timo.sirainen@open-xchange.com> yes debian upstream https://github.com/dovecot/core/commit/e07df7e2a832c8f67c14da8bcf7f93e0d6cc5a39 2026-04-28
CVE-2026-42393/02-a19f43238d.patch doveadm: Avoid leaking doveadm_password or doveadm_api_key lengths Timo Sirainen <timo.sirainen@open-xchange.com> yes debian upstream https://github.com/dovecot/core/commit/a19f43238d51bd1bca7799328aa51002dca4e96c 2026-04-28
CVE-2026-33263/01-906c979934.patch *-login: Fix error code for "Maximum number of connections from user+IP exceeded"

IMAP now reports it as [LIMIT] rather than [UNAVAILABLE].

This change also causes proxy_session_finished event's error_code to
maps to proxy_dest_auth_failed.
Timo Sirainen <timo.sirainen@open-xchange.com> yes debian upstream https://github.com/dovecot/core/commit/906c97993469adf9743b2f25ac8aeddace005a73 2024-03-11
CVE-2026-42394/03-22379bb0f0.patch lib: Add t_openat_safe_dir() Timo Sirainen <timo.sirainen@open-xchange.com> no debian https://github.com/dovecot/core/commit/22379bb0f01a46fb2c0d15e226744b49394fdf78 2026-06-03
CVE-2026-33263/02-4d016e9688.patch *-commin: Rename LOGIN_PROXY_FAILURE_TYPE_AUTH to LOGIN_PROXY_FAILURE_TYPE_AUTH_REPLIED Timo Sirainen <timo.sirainen@open-xchange.com> yes debian upstream https://github.com/dovecot/core/commit/4d016e968857437ca1a6aa804c473e06079539f2 2025-07-18
CVE-2026-33263/03-5fde53de4e.patch *-login: Add LOGIN_PROXY_FAILURE_TYPE_AUTH_NOT_REPLIED Timo Sirainen <timo.sirainen@open-xchange.com> yes debian upstream https://github.com/dovecot/core/commit/5fde53de4ebdf791a5fe583d4f8e52b89215bc7c 2025-07-18
CVE-2026-33263/04-33f5a95c04.patch managesieve-login: Adjust to core's login_proxy_failure_type changes Timo Sirainen <timo.sirainen@open-xchange.com> yes debian upstream https://github.com/dovecot/pigeonhole/commit/33f5a95c0448e0d104f2cd7591e7f42c19b33199 2025-07-19
CVE-2026-33263/05-75cfd0a0f0.patch pop3-login: If mail_max_userip_connections is reached, reply to login with [IN-USE] prefix

The [IN-USE] indicates that the mailbox is locked for servers that allow
only a single POP3 client at a time. This is similar to rejecting login
due to too many concurrent logins.
Timo Sirainen <timo.sirainen@open-xchange.com> yes debian upstream https://github.com/dovecot/core/commit/75cfd0a0f0b88b42541570dc18b6a65b67ba9f71 2025-12-03
CVE-2026-33263/06-db0835c84b.patch login-common, *-login: Add proxy_dest_connection_limit error_code to proxy_session_finished

If IMAP backend returns with [LIMIT] or POP3 backend returns with [IN-USE],
use this error code rather than the generic proxy_dest_auth_failed.
Error messages are also updated.
Timo Sirainen <timo.sirainen@open-xchange.com> yes debian upstream https://github.com/dovecot/core/commit/db0835c84bf754a260ce0d3dca1d69eb90f87518 2025-12-03
CVE-2026-33263/07-6b89deb54e.patch submission-login: Handle CLIENT_AUTH_RESULT_LIMIT_REACHED as temporary error Timo Sirainen <timo.sirainen@open-xchange.com> yes debian upstream https://github.com/dovecot/core/commit/6b89deb54e197aae41a2a3ad2d3998f2df024866 2025-12-03
CVE-2026-42394/04-0375f6f985.patch acl: dovecot-acl-list is never supposed to be a symlink - use O_NOFOLLOW flag Timo Sirainen <timo.sirainen@open-xchange.com> no debian https://github.com/dovecot/core/commit/0375f6f9851ce0ad6a20bd85449384284728118b 2026-06-03
CVE-2026-42394/05-54a9bdf057.patch lib: Add comments about memory allocations and string functions preserving errno Timo Sirainen <timo.sirainen@open-xchange.com> no debian https://github.com/dovecot/core/commit/54a9bdf057cf7574bdd6d6ab3e1a6c60eb6584fc 2026-06-03
CVE-2026-52687/01-4297625509.patch doveadm compress: Move struct client earlier Timo Sirainen <timo.sirainen@open-xchange.com> yes debian upstream https://github.com/dovecot/core/commit/429762550939be2128b1c8056fa1bf85543ccd92 2024-05-20
CVE-2026-33263/08-25e1e0adfa.patch managesieve-login: Support LOGIN_PROXY_FAILURE_TYPE_AUTH_LIMIT_REACHED_REPLIED Timo Sirainen <timo.sirainen@open-xchange.com> yes debian upstream https://github.com/dovecot/pigeonhole/commit/25e1e0adfa4ad44e3205fc8c62ca26a73cf6ee41 2025-12-03
CVE-2026-33263/09-9cbe5c9a5e.patch login-common: client-common - Add client_disconnect() vfunc Stephan Bosch <stephan.bosch@open-xchange.com> yes debian upstream https://github.com/dovecot/core/commit/9cbe5c9a5e0526b799c98e0e299821a3390599d3 2025-11-28
CVE-2026-33263/10-a2b74bac07.patch submission-login: client - Fix panic occurring at mail_max_userip_connections limit transgression

Panic was:

Fixed by making sure the underlying smtp-server connection is always closed before the connection FD is closed.
Stephan Bosch <stephan.bosch@open-xchange.com> yes debian upstream https://github.com/dovecot/core/commit/a2b74bac07c8a231b859203fe2e624f3f0806e65 2025-11-28
CVE-2026-33263/11-2a1ae65f59.patch lib-smtp: smtp-server - Expose smtp_server_connection_reply_immediate

The function already existed internally as a way to write a reply directly
to the output stream, bypassing the per-command reply queue. Make it part
of the public API so callers that need a reply on the wire before tearing
the connection down (where queued replies would otherwise be aborted) can
use it.
Timo Sirainen <timo.sirainen@open-xchange.com> yes debian upstream https://github.com/dovecot/core/commit/2a1ae65f59bd462b18d815e1fb5971bb4be86d52 2026-05-07
CVE-2026-33263/12-cae8cf70d2.patch submission-login: client-authenticate - Reply 421 4.7.0 on mail_max_userip_connections

Until now the connection limit was reported via the same 454 4.7.0 reply
that is used for generic temporary authentication failures. That makes
proxies (including Dovecot's own submission proxy) treat the rejection as
a transient auth error and retry, which is futile when the limit is hit
and only obscures the actual cause in the proxy log.

Reply with 421 4.7.0 instead. RFC 5321 Section 4.2.1 specifies 421 as
"service shutting down, closing transmission channel", which is the
right signal for "do not retry on this connection". The 421 + 4.7.0
combination is unique among the 421 replies emitted by submission and is
used by the submission proxy to recognize this specifically as a
connection-limit reply rather than a generic 421 internal/shutdown.
Timo Sirainen <timo.sirainen@open-xchange.com> yes debian upstream https://github.com/dovecot/core/commit/cae8cf70d24939f515e2a039acb0b8e2fea5ccb2 2026-05-07
CVE-2026-33263/13-432177f997.patch submission-login: submission-proxy - Recognize 421 4.7.0 as connection-limit reply

When the backend signals that the user's connection limit has been
reached, do not classify the response as a generic temporary
authentication failure (which causes the proxy to reconnect). Map it
instead to LOGIN_PROXY_FAILURE_TYPE_AUTH_LIMIT_REACHED_REPLIED, which
suppresses retries and reports the failure as proxy_dest_connection_limit
in the login_aborted event/log line. This mirrors what imap-login does
for the [LIMIT] response code and pop3-login for [IN-USE].

Other 421 replies (typically server shutdown / fatal error) are mapped
to LOGIN_PROXY_FAILURE_TYPE_AUTH_REPLIED rather than AUTH_TEMPFAIL: 421
means "closing transmission channel" (RFC 5321 Section 4.2.1), so a
reconnect on the same destination is unlikely to help and should not
happen automatically.
Timo Sirainen <timo.sirainen@open-xchange.com> yes debian upstream https://github.com/dovecot/core/commit/432177f997e74843ba8b3c271d28697675b34a0f 2026-05-07
CVE-2026-52687/02-0b5eea74d4.patch doveadm compress: Refactor line reading Timo Sirainen <timo.sirainen@open-xchange.com> yes debian upstream https://github.com/dovecot/core/commit/0b5eea74d4741c86df0342efdc5b3c77002e74e7 2024-05-20
CVE-2026-40018/01-a78c015eae.patch lib-sql: sql-api - Implement async calls for drivers that can't
Changes the behaviour of asynchronous functions to be truly asynchronous
even if the underlying driver isn't capable of doing this. Implemented
by adding immediate timeouts to call the callbacks after returning from the
synchronous function and ending up back to ioloop.
Aki Tuomi <aki.tuomi@open-xchange.com> yes debian upstream https://github.com/dovecot/core/commit/a78c015eae67a891a0c14b5434dd1f99838ae4cc 2025-10-06
CVE-2026-40018/02-769ad69345.patch lib-sql: Add sql_result_new_error() helper Aki Tuomi <aki.tuomi@open-xchange.com> yes debian upstream https://github.com/dovecot/core/commit/769ad693450742ece44733e64a64122ab2843462 2026-05-29
CVE-2026-40018/03-37da0240a3.patch lib-sql: Extract sql_query_callback_delayed() helper Aki Tuomi <aki.tuomi@open-xchange.com> yes debian upstream https://github.com/dovecot/core/commit/37da0240a316bd409d21b303f0a7e8627afd0789 2026-05-29
CVE-2026-40018/04-3f9a9f1172.patch lib-sql: Add sql_commit_schedule_delayed() helper Aki Tuomi <aki.tuomi@open-xchange.com> yes debian upstream https://github.com/dovecot/core/commit/3f9a9f117220b92edb4df0e9ef020092cdf29132 2026-06-02
CVE-2026-40018/05-f6bff126e8.patch lib-sql: Make escape_string return int with error_r, fail instead of unsafe fallback

Change escape_string driver vfunc and sql_escape_string() to return int
with separate error_r output parameter. On failure (e.g. not connected),
return -1 instead of falling back to unsafe escaping.

Move escaping from sql_statement_bind_str() to sql_statement_get_query()
so errors can be propagated to callers. Add failed_error field to
sql_transaction_context for deferred error reporting at commit time.
Aki Tuomi <aki.tuomi@open-xchange.com> yes debian upstream https://github.com/dovecot/core/commit/f6bff126e890499214567cf8de2bf0eef3b0b7dd 2026-05-29
CVE-2026-40018/06-77bc7af4cf.patch auth: passdb_sql: connect before expanding query variables
sql_lookup_pass() calls settings_get_params() with an SQL escape func that
requires a live connection. If the DB is disconnected, the error propagated
as "Failed to parse configuration" instead of a DB connectivity error.

Call sql_connect() first; fail with "Not connected to database" directly
if it returns -1.
Aki Tuomi <aki.tuomi@open-xchange.com> yes debian upstream https://github.com/dovecot/core/commit/77bc7af4cf6e788484423916ebf83b85338f621e 2026-05-29
CVE-2026-40018/07-19572f9b36.patch lib-sql: Run sql statement queries in their own data stack frame Timo Sirainen <timo.sirainen@open-xchange.com> yes debian upstream https://github.com/dovecot/core/commit/19572f9b36f3b612af105b0eef0f8a0cca398a53 2026-06-11
CVE-2026-40205_CVE-2026-73208/01-c2dc2f0fca.patch lib-oauth2: Ensure aud field has client_id when set.
OpenID Connect 1.0 specification says that "aud" field must contain
OAuth 2.0 client_id of the Relying Party as an audience value.
Aki Tuomi <aki.tuomi@open-xchange.com> yes debian upstream https://github.com/dovecot/core/commit/c2dc2f0fca2a9fc15d94281993dba6ccaf62e4b5 2023-05-08
CVE-2026-40205_CVE-2026-73208/02-9bb7dd0ceb.patch lib-oauth2: Validate scope when configured Aki Tuomi <aki.tuomi@open-xchange.com> yes debian upstream https://github.com/dovecot/core/commit/9bb7dd0ceb504637a0892a44f1ed522df79e6cbb 2023-05-08
CVE-2026-40205_CVE-2026-73208/03-addc191482.patch oauth: Accept multiple entries in aud field Marco Bettini <marco.bettini@open-xchange.com> yes debian upstream https://github.com/dovecot/core/commit/addc1914826c0c4ef754da83ea20fed8e401197a 2023-10-03
CVE-2026-52687/03-c781a55de8.patch doveadm compress-connect: Fix writing server input to non-blocking stdout

fd_set_nonblock(STDIN_FILENO, TRUE) makes stdout also non-blocking when
stdin and stdout point to the same file description, e.g. a pty. Writing
server input to stdout could then fail when the pty buffer was full:


Fix by writing to stdout via an ostream with unlimited buffer size, so
failed writes are retried by the ioloop. This also fixes silently
dropping data if write() returned a partial write.
Timo Sirainen <timo.sirainen@open-xchange.com> yes debian upstream https://github.com/dovecot/core/commit/c781a55de87c78e9aa7cdc1325d7af355bd74e68 2026-08-06
CVE-2026-52687/04-a9b0512337.patch imap: Restrict COMPRESS to DEFLATE only
cmd_compress() and the imap-login proxy side channel looked up any
registered compression handler by name, so a client could request e.g.
COMPRESS ZSTD even though only COMPRESS=DEFLATE is advertised (RFC 4978).

Non-DEFLATE algorithms can require far more memory to decompress (a zstd
decoder alone can hold a 16+ MB window per connection versus ~40 KB for
inflate). This matters now that imap-login handles COMPRESS for proxied
login process into its vsz_limit and crash it, affecting all clients on
that process.

Only accept DEFLATE on both the backend and the login proxy path.
Timo Sirainen <timo.sirainen@open-xchange.com> yes debian upstream https://github.com/dovecot/core/commit/a9b051233715577c88155604b516262fed10aa26 2026-07-04
CVE-2026-40205_CVE-2026-73208/04-84be751f5f.patch lib-oauth2: Fix recursive field copying
Now arrays are properly copied, and fields are
prefixed with object keys when nested.
Aki Tuomi <aki.tuomi@open-xchange.com> yes debian upstream https://github.com/dovecot/core/commit/84be751f5f7d46d34f9a45a00076a6c36324a850 2023-10-13
CVE-2026-73209/08-a5573eeb13.patch lib-compression: test - Add zero-len frame test for all handlers
Verify that successive empty compressed frames produce a clean EOF
across all compression algorithms. lz4 is limited to one frame as it
uses a custom single-stream format without concatenation support.
Aki Tuomi <aki.tuomi@open-xchange.com> yes debian upstream https://github.com/dovecot/core/commit/a5573eeb13f86481420be6f2c0763fda67156633 2026-06-12
CVE-2026-40204/01-8d25b6d54c.patch lib-lda: mail-deliver - Autocreate delivery mailbox via explicit mailbox_create()

Instead of relying on MAILBOX_FLAG_AUTO_CREATE to have mailbox_open()
implicitly create the target, open it and, on MAIL_ERROR_NOTFOUND,
create it explicitly when lda_mailbox_autocreate is enabled. This makes
the creation go through the normal mailbox_create() path (including ACL
checks) and removes one of the two users of the autocreate mailbox flags.
Timo Sirainen <timo.sirainen@open-xchange.com> yes debian upstream https://github.com/dovecot/core/commit/8d25b6d54c84d46f919ffde03a16afb72679bb9f 2026-06-11
CVE-2026-40204/02-4010e31893.patch lib-sieve: actions - Split mailbox creation into sieve_act_store_create_mailbox()

Pure refactoring with no functional change: move the mailbox_create() /
subscribe / reopen sequence out of the "mailbox" extension's :create side
effect (seff_mailbox_create_pre_execute) into a new reusable
sieve_act_store_create_mailbox() helper.
Timo Sirainen <timo.sirainen@open-xchange.com> yes debian upstream https://github.com/dovecot/pigeonhole/commit/4010e318939b557b0cdf7da3ae0f320d408aea65 2026-06-11
CVE-2026-40204/03-eec184745f.patch lib-sieve: actions - Create fileinto mailbox without the autocreate flag

Stop setting MAILBOX_FLAG_AUTO_CREATE/SUBSCRIBE in act_store. Instead, on
mailbox_open() returning MAIL_ERROR_NOTFOUND, create the mailbox explicitly
with sieve_act_store_create_mailbox() when autocreation is enabled (the
:create side effect already creates it explicitly).

This makes the creation go through the normal ACL CREATE gate, so a fileinto
(with lda_mailbox_autocreate=yes) or fileinto :create can no longer create a
mailbox in a shared or public namespace that the user lacks the CREATE right
for.

A permission failure to create the mailbox is classified by
sieve_act_store_create_error_status(): for a user's personal script it is a
permanent failure (implicit keep), while for a global (administrator-defined)
script it is deferred (temporary failure), so the administrator notices the
script is behaving in a way they did not intend.
Timo Sirainen <timo.sirainen@open-xchange.com> yes debian upstream https://github.com/dovecot/pigeonhole/commit/eec184745fabe1b2da0d5cc343f2a46710b70fc7 2026-06-11
CVE-2026-40204/04-72d21003ae.patch lib-storage: Remove MAILBOX_FLAG_AUTO_CREATE and MAILBOX_FLAG_AUTO_SUBSCRIBE

These flags were set only by mail delivery (lib-lda) and Sieve fileinto
(Pigeonhole), both of which now create the target mailbox explicitly with
mailbox_create(). Nothing sets the flags anymore, so remove them and drop
the flag checks from mailbox_is_autocreated() and mailbox_is_autosubscribed().

As a result mailbox_is_autocreated() reflects only mailboxes that virtually
already exist (the user's INBOX and admin-configured "auto" mailboxes), so
the ACL plugin again enforces the CREATE right for delivery-autocreated
mailboxes in shared and public namespaces.
Timo Sirainen <timo.sirainen@open-xchange.com> yes debian upstream https://github.com/dovecot/core/commit/72d21003ae49ab7ed2f28438ec73303c0e95cea3 2026-06-11
CVE-2026-42394/06-abfb0c1fe1.patch lib-sieve: storage: file - Refuse symlinks escaping personal storage directory

Pigeonhole's file storage followed any symlink encountered while resolving a
script path, including symlinks in personal (user-writable) storage whose
target lay outside the storage directory. In some non-recommended
configurations a user could exploit this through the include extension:
an "include :personal name;" lookup of ~/sieve/name.sieve transparently
followed a user-placed to e.g. another user's file readable by the mail
process, leaking its contents (or causing it to be parsed as Sieve).
Normally this shouldn't be possible, because sieve processes shouldn't
have any more privileges to read files than the local system user creating
the symlink.

Open the canonical (realpath'd) personal storage directory at storage init
time and keep an O_DIRECTORY|O_CLOEXEC fd to it. Resolve script content
reads through this fd by routing sieve_file_script_get_stream() via a new
sieve_file_storage_open_safe() wrapper around t_openat_safe(), which:

- opens each path component with O_NOFOLLOW so symlinks are detected
explicitly rather than transparently followed;
- follows symlinks only when their (recursively resolved) target stays
beneath dir_fd, refusing absolute targets and `..` past the storage
root with ELOOP;
- caps the symlink-hop count to bound resolution time.

Anchoring at dir_fd makes the lookup TOCTOU-safe even when intermediate
path components are mutated on disk concurrently: resolution stays
relative to the original directory inode and the safe walker still rejects
any target that leaves it.

Apply the protection only when storage->is_personal is set; admin-managed
global storage is trusted and may legitimately use cross-boundary symlinks.
Single-file storages (is_file=TRUE) keep dir_fd at -1 and fall back to the
existing open path. Also guard the dir_fd open with S_ISDIR() to handle the
autodetect quirk where storage_path can refer to a regular file even when
is_file is FALSE.
Timo Sirainen <timo.sirainen@open-xchange.com> no debian https://github.com/dovecot/pigeonhole/commit/abfb0c1fe180f0edd5527c05cb7dd97840a31ea1 2026-05-04
CVE-2026-42394/07-915cb2edc9.patch lib-sieve: storage: file - Validate script stat path through dir_fd
Extend the symlink-escape protection added in the previous commit to the
stat performed by sieve_file_script_open(): an "include :personal" lookup
or any other indirect path that triggers sieve_file_script_stat() also
needs to refuse a symlink whose target leaves the personal storage
directory, otherwise the existence check succeeds and the file is opened
later via the safe path with an unhelpful "permission denied".

Add sieve_file_script_stat_safe(), which uses fstatat(AT_SYMLINK_NOFOLLOW)
to obtain the entry's own stat (lnk_st) and then, only if the entry is a
symlink, opens it through sieve_file_storage_open_safe() to validate the
target stays inside dir_fd and to fetch the resolved target's stat (st)
via fstat(). Non-symlink entries skip the open entirely.

Use the new helper in sieve_file_script_open() whenever fstorage->dir_fd
is available, falling back to the unsafe lstat+stat variant for
non-personal or single-file storages.
Timo Sirainen <timo.sirainen@open-xchange.com> no debian https://github.com/dovecot/core/commit/915cb2edc90da04d8a7a122fef7932cd55e3fff2 2026-05-04
CVE-2026-52681/01-a56d0685ef.patch lib-storage: Allow NULL path in mailbox_list_mkdir_root()
When path is NULL, look up the root directory path of the given type via
mailbox_list_get_root_path() and create that. If there is no path of the
requested type, nothing is done. This avoids open-coding the common
get_root_path() + mkdir_root() pair at call sites.
Timo Sirainen <timo.sirainen@open-xchange.com> yes debian upstream https://github.com/dovecot/core/commit/a56d0685ef2e3369b4fdce14e59a2c3dfec8f44e 2026-06-23
CVE-2026-52681/02-9276a4f55e.patch lib-storage: Simplify mailbox_mkdir() using mailbox_list_mkdir_root(NULL)

mailbox_mkdir() looked up the root path via mailbox_list_get_root_forced()
only to pass it straight to mailbox_list_mkdir_root(). Let mkdir_root()
resolve the root itself by passing path=NULL, dropping the local variable.
Timo Sirainen <timo.sirainen@open-xchange.com> yes debian upstream https://github.com/dovecot/core/commit/9276a4f55e0ea38c735cf386fa5578891f51b99c 2026-06-23
CVE-2026-52687/05-2fad1f836b.patch doveadm: compress-connect - Don't hang when server rejects COMPRESS
After sending a COMPRESS command the client stopped reading stdin and
waited for the server's reply, but it only resumed on an "OK Begin
compression" reply. If the server rejected COMPRESS (e.g. a NO reply for
an unsupported mechanism), compress_waiting was never cleared: the client
waited forever for an OK that never came while the server waited for the
next command, deadlocking the session.

Remember the COMPRESS command tag and treat any tagged reply to it that
isn't the compression-start reply as a rejection, resuming the pipelined
input.
Timo Sirainen <timo.sirainen@open-xchange.com> yes debian upstream https://github.com/dovecot/core/commit/2fad1f836b23e15b260ca3e5985aec126d7a90e9 2026-07-06
CVE-2026-52681/03-01c95a5503.patch lib-sieve: Reduce CPU limit check interval in :contains and :matches matchers

Reduce the interval to 64 so worst-case work between checks is ~64 MiB.
cpu_limit_exceeded() is a signal-counter comparison with no syscall, so
the higher call frequency has no measurable cost.
Aki Tuomi <aki.tuomi@open-xchange.com> yes debian upstream https://github.com/dovecot/pigeonhole/commit/01c95a5503ec53c40f12d40de0b508838f6b041d 2026-05-25
CVE-2026-52681/04-da28fa5a90.patch lib-sieve: Add per-user sieve-rusage file for cumulative CPU tracking

Cumulative resource usage was previously stored in each compiled Sieve
binary's (.svbin) header. Because the binary file is keyed by script
name, a user could reset their CPU budget by uploading the same script
under a different name (PUTSCRIPT newname + SETACTIVE newname),
RENAMESCRIPT, or DELETESCRIPT followed by PUTSCRIPT under another
name. Each such operation produced a fresh .svbin with zero counter,
allowing the sieve_max_cpu_time limit to be bypassed indefinitely.

Track cumulative CPU per user instead, in <INBOX-namespace-root>/sieve-rusage.
The file persists across all script renames, deletions, and re-uploads,
since it is not tied to any particular script name. Tracking is enabled
only for personal storages where the user's INBOX namespace has a
filesystem path; admin/default storages are unaffected here.

The on-disk format is a single ASCII line:

V1 <flags> <cpu-secs> <update-time>

CPU time is rounded up to whole seconds when persisted; sub-second
precision is preserved only for the in-memory accumulation within a
single execution. The file is updated by writing a new copy via
file_dotlock_open_mode() and replacing the original via
file_dotlock_replace(). Concurrent writers are serialized through the
dotlock; readers do not need a lock because the rename is atomic.

The .svbin header still carries its original resource_usage struct as
the active fallback when no per-user file is available; a follow-up
commit drops that path.
Timo Sirainen <timo.sirainen@open-xchange.com> yes debian upstream https://github.com/dovecot/pigeonhole/commit/da28fa5a900dc521a7f6cadf9320650dcad3cf18 2026-05-05
CVE-2026-52681/05-64e1f7af27.patch lib-sieve: Drop binary-header resource usage tracking
With the per-user sieve-rusage file now authoritative for personal
storages, the .svbin header no longer needs to carry CPU usage. Admin
storages (sieve_before/after, default location) cannot be re-uploaded
by the user, so cross-run tracking is unnecessary there; the runtime
sieve_max_cpu_time check still enforces the per-execution limit.

Move the in-memory cumulative carry-over from sbin->header.resource_usage
to a dedicated sbin->persisted_rusage substruct. The on-disk header
struct now solely represents the wire format and is zeroed on every
save; the in-memory carry-over no longer overloads it. Drop the now-dead
"resource usage" section from sieve_binary_dumper_run() (the on-disk
fields are always zero, so the section never produced output).
Timo Sirainen <timo.sirainen@open-xchange.com> yes debian upstream https://github.com/dovecot/pigeonhole/commit/64e1f7af273809f484fb983d4a6edb1af1a85c99 2026-05-05
CVE-2026-52681/07-e0c8bcd5d0.patch lib-sieve: Rename on-disk header rusage fields to unused_*
The .svbin header's resource_usage fields no longer carry data: they
are zeroed on save and discarded on load. Cumulative CPU tracking
lives in the per-user sieve-rusage file, and the in-memory carry-over
lives in sbin->persisted_rusage.

Flatten the nested resource_usage struct and rename the fields to
unused_update_time and unused_cpu_time_msecs so it is obvious the
fields are kept only for on-disk format compatibility. The memory
layout of struct sieve_binary_header is unchanged.
Timo Sirainen <timo.sirainen@open-xchange.com> yes debian upstream https://github.com/dovecot/pigeonhole/commit/e0c8bcd5d0d8bbd39edb2bc78cd15f469834660a 2026-06-03
CVE-2026-52687/06-e7ab7a2467.patch doveadm compress: Delay failing if used COMPRESS algorithm is not supported locally

This command is used in CI tests to verify the server rejects non-DEFLATE
algorithm.
Timo Sirainen <timo.sirainen@open-xchange.com> yes debian upstream https://github.com/dovecot/core/commit/e7ab7a24675a4f0a82fb9d7583eb49f8736e4dfb 2026-07-07
CVE-2026-52681/08-7a55953924.patch lib-sieve: Switch sieve_max_cpu_time enforcement to time-decayed re-enable

When a user's cumulative CPU time exceeded sieve_max_cpu_time, the
script was permanently disabled. SIEVE_BINARY_FLAG_RESOURCE_LIMIT was
set in the binary header on first overrun and was never cleared by
the resource_usage_timeout decay (which only zeroed the cpu_time
field), so sieve_binary_check_executable() refused execution forever
unless the binary was recompiled or an admin manually wiped the file.

Replace the sticky-flag model with one driven purely by the persisted
cumulative cpu_time, decayed by resource_usage_timeout:

- Drop SIEVE_BINARY_FLAG_RESOURCE_LIMIT and the enum that defined it;
nothing reads sbin->header.flags anymore.
- sieve_binary_check_executable() and sieve_binary_check_resource_usage()
call sieve_resource_usage_is_excessive() on the current cumulative
cpu_time. Raising sieve_max_cpu_time now correctly re-enables a
previously over-limit user without further intervention.
- Gate per-user file persistence on the per-run delta, not the
cumulative total. A refused-without-running attempt has a zero
delta, skips the file write, and leaves update_time at the moment
work was actually consumed. After resource_usage_timeout seconds
of inactivity (or only-trivial deliveries) the next load decays
the cpu_time to zero and the user is allowed to run again.

The on-disk per-user sieve-rusage file format becomes:

V1 <cpu-secs> <update-time>
Timo Sirainen <timo.sirainen@open-xchange.com> yes debian upstream https://github.com/dovecot/pigeonhole/commit/7a55953924c54dc116150ae809b976456977db75 2026-05-05
CVE-2026-52681/09-88470b80fb.patch lib-sieve: file storage: Remove orphan compiled binaries on delete and rename

DELETESCRIPT and RENAMESCRIPT only operated on the .sieve file and
left the matching compiled binary (.svbin) on disk. The orphan was
never referenced again under that name, so it accumulated as wasted
disk space until something else (manual cleanup, account removal)
removed it.

Unlink fscript->binpath alongside the .sieve operation. The unlink is
DELETE/RENAME.
Timo Sirainen <timo.sirainen@open-xchange.com> yes debian upstream https://github.com/dovecot/pigeonhole/commit/88470b80fb4079cd2207bc8c4e986b816218421e 2026-05-05
CVE-2026-52681/10-0252337797.patch lib-sieve: Log a warning when cumulative CPU exceeds the limit
sieve_binary_record_resource_usage() returned FALSE when the script's
cumulative CPU time crossed sieve_max_cpu_time, but the only log line
on that path was a debug-level "Updated cumulative resource usage"
emitted on every recording, with no signal at the actual disable
transition. Operators had to infer the disable from later "Failed to
open script ... (cumulative resource limit exceeded)" errors on
subsequent deliveries.

Emit a warning at the transition point, including the cumulative CPU
usage that triggered it.
Timo Sirainen <timo.sirainen@open-xchange.com> yes debian upstream https://github.com/dovecot/pigeonhole/commit/025233779751d7ba8cff7c615f8e229b604d92a5 2026-06-03
CVE-2026-52681/11-800697eaa3.patch lib-sieve: Log an info line when opening a CPU-disabled script
sieve_binary_check_executable() blocks execution when a script's
persisted cumulative CPU usage already exceeds sieve_max_cpu_time, but
only logged the block at debug level. With cumulative tracking now
sticky across redeliveries via the per-user sieve-rusage file, the
script can stay blocked indefinitely until the resource_usage_timeout
decay or admin intervention; operators benefit from a per-attempt
record of that block at info level.

Promote the existing debug log to e_info and include the cumulative
CPU usage. The caller continues to emit its own error message on the
failed open (lda-sieve, imap-sieve, imap-filter-sieve plugin paths).
Timo Sirainen <timo.sirainen@open-xchange.com> yes debian upstream https://github.com/dovecot/pigeonhole/commit/800697eaa3b753d7a449fb7da62f41a21b02925e 2026-06-03
CVE-2026-42391.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.
Timo Sirainen <timo.sirainen@open-xchange.com> yes debian upstream https://github.com/dovecot/core/commit/dbeb18dfc317be3c9839702c35c3fb77b7af90ff 2026-07-04

All known versions for source package 'dovecot'

Links