]> git.ipfire.org Git - thirdparty/dovecot/core.git/log
thirdparty/dovecot/core.git
2 months agolib-mail: mbox_from_parse() - Fix bounds check in time parsing
Mark Esler [Sat, 7 Mar 2026 03:09:24 +0000 (19:09 -0800)] 
lib-mail: mbox_from_parse() - Fix bounds check in time parsing

Add bounds checks before hour/minute parsing (msg + 5 > msg_end)
and before optional seconds parsing (msg + 3 > msg_end). The
alt_stamp path consumes a variable number of bytes for the day
field, which can exhaust the initial budget before reaching the
time section.

Also guard the optional seconds entry with msg >= msg_end to
handle truncated inputs that end after minutes.

Found by fuzzing with libFuzzer and AddressSanitizer.

Signed-off-by: Mark Esler <mark@hexproof.dev>
2 months agolib-mail: mbox_from_parse() - Fix bounds check in named timezone
Timo Sirainen [Thu, 12 Mar 2026 09:13:20 +0000 (11:13 +0200)] 
lib-mail: mbox_from_parse() - Fix bounds check in named timezone

The named timezone check reads msg[0] through msg[3] without
verifying 4 bytes remain. The else-if branch below reads msg[0]
through msg[5]. When optional seconds consume the initial budget,
this reads past the buffer.

Based on code by Mark Esler <mark@hexproof.dev>

2 months agolib-mail: mbox_from_parse() - Fix bounds check in trailing timezone
Mark Esler [Fri, 6 Mar 2026 07:03:40 +0000 (23:03 -0800)] 
lib-mail: mbox_from_parse() - Fix bounds check in trailing timezone

The trailing timezone check used msg != msg_end before reading
msg[0] through msg[5]. When fewer than 6 bytes remain, this
reads past the buffer. Replace with msg + 6 <= msg_end.

Found by fuzzing with libFuzzer and AddressSanitizer.

Signed-off-by: Mark Esler <mark@hexproof.dev>
2 months agolib-http: http-message-parser - Fail parsing messages containing both a Content-Lengt...
Stephan Bosch [Mon, 9 Mar 2026 06:09:19 +0000 (07:09 +0100)] 
lib-http: http-message-parser - Fail parsing messages containing both a Content-Length and a Transfer-Encoding header

2 months agolib-http: http-server - Add global request_finished() callback
Stephan Bosch [Mon, 9 Mar 2026 06:51:19 +0000 (07:51 +0100)] 
lib-http: http-server - Add global request_finished() callback

2 months agolib-http: http-server - Properly traverse through HTTP_SERVER_REQUEST_STATE_SENT_RESP...
Stephan Bosch [Mon, 9 Mar 2026 06:50:01 +0000 (07:50 +0100)] 
lib-http: http-server - Properly traverse through HTTP_SERVER_REQUEST_STATE_SENT_RESPONSE state

2 months agolib-http: test-http-server-errors - Properly clear client/server callback pointers
Stephan Bosch [Mon, 9 Mar 2026 06:02:01 +0000 (07:02 +0100)] 
lib-http: test-http-server-errors - Properly clear client/server callback pointers

2 months agom4/ssl.m4: Fix openssl checks not picking up CFLAGS being provided by pkg-config
mauritium [Tue, 13 Jan 2026 23:21:01 +0000 (00:21 +0100)] 
m4/ssl.m4: Fix openssl checks not picking up CFLAGS being provided by pkg-config

2 months agolib: punycode_decode() - Fix reading out of input bounds on invalid input
Timo Sirainen [Tue, 10 Mar 2026 20:17:27 +0000 (22:17 +0200)] 
lib: punycode_decode() - Fix reading out of input bounds on invalid input

Based on code by rootvector2 (Dexter.k)

2 months agolib: punycode_decode() - Minor code refactoring
Timo Sirainen [Tue, 10 Mar 2026 20:16:14 +0000 (22:16 +0200)] 
lib: punycode_decode() - Minor code refactoring

Helps also the next commit.

2 months agolib: punycode_decode() - Fix parsing empty string [after delimiter]
Timo Sirainen [Tue, 10 Mar 2026 20:09:42 +0000 (22:09 +0200)] 
lib: punycode_decode() - Fix parsing empty string [after delimiter]

This caused an assert crash when --enable-experimental-mail-utf8 was
used and invalid punycode domain was being parsed.

Based on code by rootvector2 (Dexter.k)

2 months agofs-metawrap: Set FS_METADATA_OBJECTID on fs_get_nlinks()
Timo Sirainen [Mon, 9 Mar 2026 21:47:33 +0000 (23:47 +0200)] 
fs-metawrap: Set FS_METADATA_OBJECTID on fs_get_nlinks()

This fixes obox + fs-posix to work with lazy_expunge_only_last_instance=yes

2 months agofs-posix: Set FS_METADATA_OBJECTID on fs_stat()
Timo Sirainen [Mon, 9 Mar 2026 21:45:48 +0000 (23:45 +0200)] 
fs-posix: Set FS_METADATA_OBJECTID on fs_stat()

This fixes obox + fs-posix to work with lazy_expunge_only_last_instance=yes

2 months agosdbox: Update MAIL_FETCH_REFCOUNT_ID to include device numbers
Timo Sirainen [Mon, 9 Mar 2026 21:44:00 +0000 (23:44 +0200)] 
sdbox: Update MAIL_FETCH_REFCOUNT_ID to include device numbers

This makes it more reliable when using multiple filesystems.

2 months agomaildir: Update MAIL_FETCH_REFCOUNT_ID to include device numbers
Timo Sirainen [Mon, 9 Mar 2026 21:43:32 +0000 (23:43 +0200)] 
maildir: Update MAIL_FETCH_REFCOUNT_ID to include device numbers

This makes it more reliable when using multiple filesystems.

2 months agovirtual: virtual_search_next_update_seq() - Do not crash if next_update_seq is no...
Marco Bettini [Thu, 5 Mar 2026 11:28:34 +0000 (11:28 +0000)] 
virtual: virtual_search_next_update_seq() - Do not crash if next_update_seq is no longer there

2 months agolib: unicode-transform: Fix assert crash in NFx normalizer occurring at very long...
Stephan Bosch [Fri, 6 Mar 2026 18:58:25 +0000 (19:58 +0100)] 
lib: unicode-transform: Fix assert crash in NFx normalizer occurring at very long non-starter sequences

2 months agodoc: Fix installed dovecot.conf permissions
Xiao Pan [Wed, 19 Nov 2025 23:19:39 +0000 (07:19 +0800)] 
doc: Fix installed dovecot.conf permissions

Use INSTALL_DATA instead of INSTALL to install dovecot.conf with 644 instead
of 755 file permission.

Signed-off-by: Xiao Pan <xyz@flylightning.xyz>
2 months agolib-compression: test_lz4_chunk_size() - Check return values of ()
Marco Bettini [Mon, 9 Mar 2026 10:09:29 +0000 (10:09 +0000)] 
lib-compression: test_lz4_chunk_size() - Check return values of ()

Found by coverity, id 42237, Error handling issues

2 months agoconfig: Fix delaying errors for SET_FILE type
Timo Sirainen [Thu, 5 Mar 2026 10:17:19 +0000 (12:17 +0200)] 
config: Fix delaying errors for SET_FILE type

The error delaying requires access to the full setting name, but the
previous code might have used autoprefixed short setting name.

2 months agolib-http: http-server-connection - Add debug log line for triggering of expected...
Stephan Bosch [Wed, 4 Mar 2026 22:55:18 +0000 (23:55 +0100)] 
lib-http: http-server-connection - Add debug log line for triggering of expected 100 Continue response

2 months agolib-http: http-server-connection - Fix sending of expected 100 Continue response
Stephan Bosch [Wed, 4 Mar 2026 22:53:15 +0000 (23:53 +0100)] 
lib-http: http-server-connection - Fix sending of expected 100 Continue response

It was never sent when a response was preemptively created but not yet submitted.

2 months agolib-http: http-server-response - Add debug log line for creation of response
Stephan Bosch [Wed, 4 Mar 2026 22:52:09 +0000 (23:52 +0100)] 
lib-http: http-server-response - Add debug log line for creation of response

2 months agoglobal: Replace open-coded allocation size arithmetic with overflow-safe helpers
Dexter.k [Fri, 20 Feb 2026 09:34:13 +0000 (09:34 +0000)] 
global: Replace open-coded allocation size arithmetic with overflow-safe helpers

Replace several instances of multi-term allocation size arithmetic
(e.g. a + b + c) with small helper MALLOC_ADD3() macro built on
existing MALLOC_ADD().

This keeps overflow handling centralized, improves consistency across
the codebase, and makes size computations easier to audit.

No behavioral changes intended.

2 months agodoveconf: Remove -H argument
Michael M Slusarz [Fri, 26 Dec 2025 17:22:35 +0000 (10:22 -0700)] 
doveconf: Remove -H argument

This is a relic of (removed) replicator.

2 months agoglobal: Create most files with O_NOFOLLOW flag for extra safety
Timo Sirainen [Mon, 2 Mar 2026 08:21:24 +0000 (10:21 +0200)] 
global: Create most files with O_NOFOLLOW flag for extra safety

2 months agolib-smtp: BDAT - Avoid ubsan warning about integer wrapping with large sizes
Timo Sirainen [Thu, 5 Mar 2026 08:43:51 +0000 (10:43 +0200)] 
lib-smtp: BDAT - Avoid ubsan warning about integer wrapping with large sizes

2 months agolib-smtp: Reject overly large MAIL FROM and BDAT SIZE parameters
Timo Sirainen [Thu, 5 Mar 2026 08:41:45 +0000 (10:41 +0200)] 
lib-smtp: Reject overly large MAIL FROM and BDAT SIZE parameters

At least events use signed intmax_t for storing the mail size, which
can cause such large numbers to wrap to negative numbers.

2 months agom4: dovecot - Bump serial
Aki Tuomi [Thu, 5 Mar 2026 08:33:40 +0000 (10:33 +0200)] 
m4: dovecot - Bump serial

2 months agom4: dovecot - Disable valgrind when running with asan or msan
Aki Tuomi [Thu, 5 Mar 2026 08:53:35 +0000 (10:53 +0200)] 
m4: dovecot - Disable valgrind when running with asan or msan

These conflict with each other

2 months agom4: dovecot - Add --enable-msan
Aki Tuomi [Thu, 5 Mar 2026 08:27:40 +0000 (10:27 +0200)] 
m4: dovecot - Add --enable-msan

2 months agom4: dovecot - Move fsanitize=address to --enable-asan
Aki Tuomi [Thu, 5 Mar 2026 08:25:39 +0000 (10:25 +0200)] 
m4: dovecot - Move fsanitize=address to --enable-asan

Otherwise we will not be able to use google oss-fuzz properly

2 months agom4: dovecot - Remove extra cflags in DOVECOT_WANT_UBSAN
Aki Tuomi [Thu, 5 Mar 2026 08:55:24 +0000 (10:55 +0200)] 
m4: dovecot - Remove extra cflags in DOVECOT_WANT_UBSAN

2 months agom4: dovecot - Fix typo sanitizes -> sanitizers
Aki Tuomi [Thu, 5 Mar 2026 08:28:33 +0000 (10:28 +0200)] 
m4: dovecot - Fix typo sanitizes -> sanitizers

2 months agodoveadm: mail dict - Use user event for dict settings
Aki Tuomi [Wed, 4 Mar 2026 16:41:22 +0000 (18:41 +0200)] 
doveadm: mail dict - Use user event for dict settings

Fixes mail user variables to work with config.

2 months agodoveadm: dict - Use cctx->set_event to initialize dict
Aki Tuomi [Wed, 4 Mar 2026 16:40:50 +0000 (18:40 +0200)] 
doveadm: dict - Use cctx->set_event to initialize dict

This allows using different event for looking up settings.

2 months agoutil: script - Fix handling environment variables if they contain \001 characters
Timo Sirainen [Mon, 2 Mar 2026 12:07:59 +0000 (14:07 +0200)] 
util: script - Fix handling environment variables if they contain \001 characters

This could have resulted in a crash or at least wrong behavior.

Broken since the environment code was added in
7e993ece468916599df2feb3d4c64a91c69cedf8

2 months agolib: Reformat unlink-directory.c
Aki Tuomi [Tue, 3 Mar 2026 07:52:13 +0000 (09:52 +0200)] 
lib: Reformat unlink-directory.c

2 months agolib: unlink-directory - Rename error to first_error
Aki Tuomi [Tue, 3 Mar 2026 07:48:43 +0000 (09:48 +0200)] 
lib: unlink-directory - Rename error to first_error

It describes better what it does

2 months agolib: Assume O_NOFOLLOW exists in unlink_directory_r()
Aki Tuomi [Thu, 26 Feb 2026 16:53:46 +0000 (18:53 +0200)] 
lib: Assume O_NOFOLLOW exists in unlink_directory_r()

This flag is a FreeBSD extension, which was added in Linux
2.1.126, and has subsequently been standardized in
POSIX.1-2008.

2 months agolib-charset: Increase CHARSET_MAX_PENDING_BUF_SIZE to 16 bytes
Timo Sirainen [Sat, 28 Feb 2026 08:32:15 +0000 (10:32 +0200)] 
lib-charset: Increase CHARSET_MAX_PENDING_BUF_SIZE to 16 bytes

The old 10 bytes is likely enough, but lets make it safer based on AI's
recommendation:

While the 4–8 byte rule covers most common encodings, ISO-2022 variants
(like ISO-2022-JP) are the primary reason you might need a slightly larger
buffer. Because these encodings use multi-byte "escape sequences" to switch
between character sets, iconv() may stop mid-sequence.

For standard ISO-2022 variants, a buffer of 10 to 16 bytes is generally
considered the absolute "safe" maximum for unconverted bytes.

Why 16 Bytes? While individual characters or escape sequences rarely exceed
4–6 bytes, choosing 16 bytes provides a power-of-two alignment that safely
handles even the most obscure registered ISO-IR sequences and provides a
margin for implementation-specific behavior.

2 months agolib-mail: Reset charset translation buffer between MIME parts
Timo Sirainen [Sat, 28 Feb 2026 08:27:19 +0000 (10:27 +0200)] 
lib-mail: Reset charset translation buffer between MIME parts

If MIME part ended with an incomplete charset translation, the buffer was
kept for the next MIME part. This could have produced garbage in the next
MIME part, or a crash.

Fixes:
Panic: file message-decoder.c: line 232 (translation_buf_decode): assertion failed: (orig_size < CHARSET_MAX_PENDING_BUF_SIZE)

2 months agolib-mail: message-decoder - Clarify comments around charset_to_utf8()
Timo Sirainen [Sat, 28 Feb 2026 08:25:00 +0000 (10:25 +0200)] 
lib-mail: message-decoder - Clarify comments around charset_to_utf8()

2 months agovirtual: Fail with proper error if list layout is not 'fs'
Marco Bettini [Thu, 12 Feb 2026 15:39:08 +0000 (15:39 +0000)] 
virtual: Fail with proper error if list layout is not 'fs'

rather than failing later with hard to interpret messages

2 months agoconfigure: Remove --disable-asserts option
Timo Sirainen [Fri, 6 Mar 2026 19:07:31 +0000 (21:07 +0200)] 
configure: Remove --disable-asserts option

Asserts provide important safety checks, and they don't take much CPU.
There's no reason to ever disable asserts.

2 months agoautoconf: Make --enable-experimental-mail-utf8 required for --enable-experimental...
Marco Bettini [Wed, 18 Feb 2026 14:21:12 +0000 (14:21 +0000)] 
autoconf: Make --enable-experimental-mail-utf8 required for --enable-experimental-imap4rev2

2 months agoimap: select_open() - Add untagged LIST response when on IMAP4rev2
Marco Bettini [Mon, 16 Feb 2026 15:08:58 +0000 (15:08 +0000)] 
imap: select_open() - Add untagged LIST response when on IMAP4rev2

2 months agoimap: select_open() - Fix whitespace
Marco Bettini [Tue, 17 Feb 2026 09:55:12 +0000 (09:55 +0000)] 
imap: select_open() - Fix whitespace

2 months agoimap: imap_client_enable_imap4rev2() - Make IMAP4rev2 imply UTF8=ACCEPT
Marco Bettini [Fri, 20 Feb 2026 14:43:00 +0000 (14:43 +0000)] 
imap: imap_client_enable_imap4rev2() - Make IMAP4rev2 imply UTF8=ACCEPT

2 months agoimap: imap_settings_verify() Make mail_utf8_extensions required for imap4rev2_enable
Marco Bettini [Wed, 25 Feb 2026 11:23:42 +0000 (11:23 +0000)] 
imap: imap_settings_verify() Make mail_utf8_extensions required for imap4rev2_enable

2 months agolib-storage: Add mailbox_was_vname_changed_by_nfc() and mailbox_suppress_notifying_nf...
Marco Bettini [Mon, 16 Feb 2026 14:25:40 +0000 (14:25 +0000)] 
lib-storage: Add mailbox_was_vname_changed_by_nfc() and mailbox_suppress_notifying_nfc_name_change()

2 months agolib: Preserve errno in our malloc() and free() wrappers
Timo Sirainen [Thu, 26 Feb 2026 10:29:12 +0000 (12:29 +0200)] 
lib: Preserve errno in our malloc() and free() wrappers

Various places assume that e.g. t_strdup_printf() calls and such don't
modify errno. But because they internally call malloc() or calloc(), this
isn't actually guaranteed now and it can happen at least with newer glibc
versions. Explicitly preserve the errno for these calls where it might
be a problem.

2 months agolib-compression: Add asserts to make static analyzer happy
Timo Sirainen [Wed, 25 Feb 2026 15:57:27 +0000 (17:57 +0200)] 
lib-compression: Add asserts to make static analyzer happy

2 months agomaster: Don't check default_login_user and default_internal_user existence in config...
Timo Sirainen [Tue, 24 Feb 2026 20:49:43 +0000 (22:49 +0200)] 
master: Don't check default_login_user and default_internal_user existence in config parsing

In some situations the check may run with default settings, even if the
settings have been changed in config file, which results in causing a
failure if the default users don't exist.

2 months agolib-compression: Add test for partial header reads
Aki Tuomi [Mon, 23 Feb 2026 12:54:05 +0000 (14:54 +0200)] 
lib-compression: Add test for partial header reads

2 months agolib-compression: istream-lz4 - Try again if no data was decompressed
Aki Tuomi [Mon, 23 Feb 2026 12:09:02 +0000 (14:09 +0200)] 
lib-compression: istream-lz4 - Try again if no data was decompressed

2 months agolib-compression: istream-lz4 - Ensure uncompressed chunk size is not 0
Aki Tuomi [Mon, 23 Feb 2026 11:52:36 +0000 (13:52 +0200)] 
lib-compression: istream-lz4 - Ensure uncompressed chunk size is not 0

2 months agolib-compression: istream-lz4 - Fix handling of partial header reception
Stephan Bosch [Mon, 13 Nov 2023 04:44:30 +0000 (05:44 +0100)] 
lib-compression: istream-lz4 - Fix handling of partial header reception

2 months agolib-compression: istream-lz4 - Use container_of() macro
Aki Tuomi [Mon, 23 Feb 2026 12:27:46 +0000 (14:27 +0200)] 
lib-compression: istream-lz4 - Use container_of() macro

2 months agolib-compression: istream-zstd - Fix handling of partial header reception
Stephan Bosch [Mon, 23 Feb 2026 18:23:19 +0000 (19:23 +0100)] 
lib-compression: istream-zstd - Fix handling of partial header reception

2 months agolib-compression: istream-zlib - Fix handling of partial header and trailer reception
Stephan Bosch [Mon, 13 Nov 2023 00:13:19 +0000 (01:13 +0100)] 
lib-compression: istream-zlib - Fix handling of partial header and trailer reception

2 months agolib-compression: istream-zlib - Use struct zlib_istream as parameter to i_stream_zlib...
Stephan Bosch [Tue, 14 Nov 2023 15:50:43 +0000 (16:50 +0100)] 
lib-compression: istream-zlib - Use struct zlib_istream as parameter to i_stream_zlib_read_header()

For consistency.

2 months agolib-compression: istream-zlib - Use container_of() macro
Stephan Bosch [Tue, 14 Nov 2023 15:57:45 +0000 (16:57 +0100)] 
lib-compression: istream-zlib - Use container_of() macro

2 months agolib-compression: istream-decompress - Fix hangs when stream is used in asynchronous...
Stephan Bosch [Wed, 15 Nov 2023 03:16:09 +0000 (04:16 +0100)] 
lib-compression: istream-decompress - Fix hangs when stream is used in asynchronous context

Do not call i_stream_read() blindly. Make sure that if it is called, it's return
value is always evaluated, because otherwise data might get stalled in the
stream while no more input events are incoming; this causes a hang in
asynchronous contexts.

2 months agolib-compression: istream-decompress - Fix closing parent stream
Stephan Bosch [Mon, 13 Nov 2023 23:04:53 +0000 (00:04 +0100)] 
lib-compression: istream-decompress - Fix closing parent stream

2 months agolib-compression: istream-decompress - Fix handling of partial header reception
Stephan Bosch [Mon, 13 Nov 2023 15:34:23 +0000 (16:34 +0100)] 
lib-compression: istream-decompress - Fix handling of partial header reception

2 months agoglobal: Rename version text file
Karl Fleischmann [Tue, 17 Feb 2026 14:15:27 +0000 (15:15 +0100)] 
global: Rename version text file

This prevents compilation issues when using C++.

2 months agoauth: penalty - Log a debug line how long the penalty is
Timo Sirainen [Thu, 19 Feb 2026 11:32:04 +0000 (13:32 +0200)] 
auth: penalty - Log a debug line how long the penalty is

2 months agoauth: penalty - Log a warning if auth process is restarted due to anvil not connected
Timo Sirainen [Thu, 19 Feb 2026 17:29:26 +0000 (19:29 +0200)] 
auth: penalty - Log a warning if auth process is restarted due to anvil not connected

2 months agoauth: penalty - Add penalty(ident): prefix to log messages
Timo Sirainen [Thu, 19 Feb 2026 17:27:44 +0000 (19:27 +0200)] 
auth: penalty - Add penalty(ident): prefix to log messages

2 months agoanvil: Allow default_internal_group access to anvil-auth-penalty socket by default
Timo Sirainen [Thu, 19 Feb 2026 10:58:06 +0000 (12:58 +0200)] 
anvil: Allow default_internal_group access to anvil-auth-penalty socket by default

This way if auth process crashes, it can reconnect to anvil.

This is only done for CE version, since with Pro the default is to disable
anvil-auth-penalty entirely.

2 months agoanvil: Allow anvil-auth-penalty socket to use only PENALTY-* commands
Timo Sirainen [Thu, 19 Feb 2026 10:57:32 +0000 (12:57 +0200)] 
anvil: Allow anvil-auth-penalty socket to use only PENALTY-* commands

2 months agoanvil: anvil_connection_create() - Replace master boolean with enum type
Timo Sirainen [Thu, 19 Feb 2026 10:53:58 +0000 (12:53 +0200)] 
anvil: anvil_connection_create() - Replace master boolean with enum type

2 months agoanvil: Add a comment about first listen_fd being special
Timo Sirainen [Thu, 19 Feb 2026 10:49:27 +0000 (12:49 +0200)] 
anvil: Add a comment about first listen_fd being special

3 months agoimap, pop3: Don't autoexpunge if Dovecot is shutting down or process is killed
Timo Sirainen [Thu, 19 Feb 2026 12:33:13 +0000 (14:33 +0200)] 
imap, pop3: Don't autoexpunge if Dovecot is shutting down or process is killed

This avoids load spikes.

3 months agolib-master: Increase ANVIL_DEFAULT_LOOKUP_TIMEOUT_MSECS from 5s to 30s
Timo Sirainen [Thu, 19 Feb 2026 10:14:42 +0000 (12:14 +0200)] 
lib-master: Increase ANVIL_DEFAULT_LOOKUP_TIMEOUT_MSECS from 5s to 30s

This may provide better behavior when there are server hangs. In any case
auth process reconnecting to anvil after a timeout is rarely helpful.

3 months agolib: timeval_add/sub_usecs() - Fix usecs type
Timo Sirainen [Fri, 20 Feb 2026 11:20:39 +0000 (13:20 +0200)] 
lib: timeval_add/sub_usecs() - Fix usecs type

Some callers expect it to be 64bit, but suseconds_t isn't guaranteed to be.
Added assert mainly to catch callers that try to provide negative values
as parameter, which wrap to large unsigned values.

3 months agolib: unicode-transform - Fix panic caused by Stream-Safe Text Process encountering...
Stephan Bosch [Fri, 13 Feb 2026 21:57:32 +0000 (22:57 +0100)] 
lib: unicode-transform - Fix panic caused by Stream-Safe Text Process encountering composed non-starters

UAX15-D4: Stream-Safe Text Process is the process of producing a Unicode string
in Stream-Safe Text Format by processing that string from start to finish,
inserting U+034F COMBINING GRAPHEME JOINER (CGJ) within long sequences of
non-starters.

The current implementation did not properly account for composed non-starters,
which decompose in more than a single code point. This is something not
found in normal valid Unicode text. This could trigger one of two assert
failures, because these asserts did not account for the buffer
still being full at a second attempt.

Panic was:
Panic: file unicode-transform.c: line 504 (unicode_nf_cp): assertion failed:
(ctx->pending_decomp == 0)

Apart from the panic, the output could also be wrong in that the CGJ code point
was inserted at the wrong position.

3 months agolib: unicode-transform - Use UNICODE_NF_STREAM_SAFE_NON_STARTER_LEN instead of literal 30
Stephan Bosch [Sat, 14 Feb 2026 01:25:26 +0000 (02:25 +0100)] 
lib: unicode-transform - Use UNICODE_NF_STREAM_SAFE_NON_STARTER_LEN instead of literal 30

3 months agolib: test-unicode-nf - Prepare and clean up stream safe test for expansion
Stephan Bosch [Sat, 14 Feb 2026 01:22:25 +0000 (02:22 +0100)] 
lib: test-unicode-nf - Prepare and clean up stream safe test for expansion

3 months agolib: test-unicode-nf - Improve stream safe test
Stephan Bosch [Sat, 14 Feb 2026 01:21:21 +0000 (02:21 +0100)] 
lib: test-unicode-nf - Improve stream safe test

3 months agolib-test: test-common - Improve test_assert_memcmp() failure output for easier compa...
Stephan Bosch [Sat, 14 Feb 2026 01:16:43 +0000 (02:16 +0100)] 
lib-test: test-common  - Improve test_assert_memcmp() failure output for easier comparison

3 months agoglobal: Don't accept 0 as meaning unlimited anymore in last_valid_uid, last_valid_gid
Marco Bettini [Tue, 27 Jan 2026 15:31:23 +0000 (15:31 +0000)] 
global: Don't accept 0 as meaning unlimited anymore in last_valid_uid, last_valid_gid

3 months agosubmission: Don't accept 0 as meaning unlimited anymore in submission_max_recipients
Marco Bettini [Fri, 23 Jan 2026 14:54:54 +0000 (14:54 +0000)] 
submission: Don't accept 0 as meaning unlimited anymore in submission_max_recipients

3 months agofts: Don't accept 0 as meaning unlimited anymore in message_max_size
Marco Bettini [Wed, 21 Jan 2026 16:59:41 +0000 (16:59 +0000)] 
fts: Don't accept 0 as meaning unlimited anymore in message_max_size

3 months agolib-storage: Don't accept 0 as meaning unlimited anymore in mail_cache_max_headers_count
Marco Bettini [Mon, 2 Feb 2026 14:27:24 +0000 (14:27 +0000)] 
lib-storage: Don't accept 0 as meaning unlimited anymore in mail_cache_max_headers_count

3 months agolib-storage: Don't accept 0 as meaning unlimited anymore in mail_cache_max_header_nam...
Marco Bettini [Fri, 30 Jan 2026 10:10:37 +0000 (10:10 +0000)] 
lib-storage: Don't accept 0 as meaning unlimited anymore in mail_cache_max_header_name_length

3 months agolib-storage: Don't accept 0 as meaning unlimited anymore in mail_vsize_bg_after_count
Marco Bettini [Tue, 27 Jan 2026 14:17:29 +0000 (14:17 +0000)] 
lib-storage: Don't accept 0 as meaning unlimited anymore in mail_vsize_bg_after_count

3 months agolib-storage: Don't accept 0 as meaning unlimited anymore in mail_sort_max_read_count
Marco Bettini [Thu, 22 Jan 2026 11:08:24 +0000 (11:08 +0000)] 
lib-storage: Don't accept 0 as meaning unlimited anymore in mail_sort_max_read_count

3 months agolib-settings: Extract settings-consts.h
Marco Bettini [Thu, 22 Jan 2026 11:08:01 +0000 (11:08 +0000)] 
lib-settings: Extract settings-consts.h

3 months agoquota: quota_init() Fix for crash on invalid settings
Marco Bettini [Tue, 27 Jan 2026 12:30:52 +0000 (12:30 +0000)] 
quota: quota_init() Fix for crash on invalid settings

settings_free(set) is already handled inside quota_deinit(&quota);

3 months agolib, lib-master: Replace event_[un]set_global_debug_send_filter() with event_global_d...
Timo Sirainen [Mon, 22 Dec 2025 12:36:46 +0000 (14:36 +0200)] 
lib, lib-master: Replace event_[un]set_global_debug_send_filter() with event_global_debug_send_filter_register()

This allows registering multiple debug send filters.

3 months agolib: Remove unused event_get_global_debug_send_filter()
Timo Sirainen [Mon, 22 Dec 2025 12:20:01 +0000 (14:20 +0200)] 
lib: Remove unused event_get_global_debug_send_filter()

3 months agolib-imap-storage: Add unit tests
Aki Tuomi [Thu, 12 Feb 2026 10:48:36 +0000 (12:48 +0200)] 
lib-imap-storage: Add unit tests

3 months agolib-imap-storage: Free msgpart always on parsing error
Aki Tuomi [Thu, 12 Feb 2026 10:51:48 +0000 (12:51 +0200)] 
lib-imap-storage: Free msgpart always on parsing error

Fixes memory leak introduced in 66bc85d333c53c29ef17b92b7964b86fc5f6d186

3 months agolib-imap-storage: Free msgpart using imap_msgpart_free()
Aki Tuomi [Thu, 12 Feb 2026 10:48:30 +0000 (12:48 +0200)] 
lib-imap-storage: Free msgpart using imap_msgpart_free()

3 months agosrc: Makefile.am - Build lib-imap-storage after lib-storage
Timo Sirainen [Thu, 12 Feb 2026 21:10:08 +0000 (23:10 +0200)] 
src: Makefile.am - Build lib-imap-storage after lib-storage

3 months agolib-storage: Split off shared library to lib-dovecot-storage
Timo Sirainen [Thu, 12 Feb 2026 15:30:27 +0000 (17:30 +0200)] 
lib-storage: Split off shared library to lib-dovecot-storage

This removes lib-imap-storage dependency from lib-storage.

3 months agoconfigure: Remove libimap-storage.la from LIBDOVECOT_STORAGE*
Timo Sirainen [Thu, 12 Feb 2026 21:08:11 +0000 (23:08 +0200)] 
configure: Remove libimap-storage.la from LIBDOVECOT_STORAGE*

It's already included in libdovecot-storage.la

3 months agolib-dovecot: Split off libdovecot-gssapi.la linking to lib-dovecot-gssapi
Timo Sirainen [Fri, 13 Feb 2026 05:49:32 +0000 (07:49 +0200)] 
lib-dovecot: Split off libdovecot-gssapi.la linking to lib-dovecot-gssapi