]>
git.ipfire.org Git - thirdparty/dovecot/core.git/log
Stephan Bosch [Sat, 21 Jun 2025 14:53:17 +0000 (16:53 +0200)]
lib-smtp: smtp-client-command - Assert aborted command pointer is (still) valid
Stephan Bosch [Sat, 21 Jun 2025 16:04:29 +0000 (18:04 +0200)]
lib-smtp: Fix minor formatting issues in test-smtp-client-errors.c
Stephan Bosch [Fri, 2 May 2025 02:46:34 +0000 (04:46 +0200)]
auth: mech-gssapi - Fix handling of server sending empty initial response
This situation was erroneously interpreted as sending an out-of-band challenge
for the recently added channel binding feature, which causes GSSAPI
authentication to fail when the client does not send the intial response as part
of the AUTHENTICATION command.
Aki Tuomi [Fri, 16 May 2025 10:08:12 +0000 (13:08 +0300)]
luacheckrc: Add luacheck rules
Timo Sirainen [Fri, 27 Jun 2025 11:31:27 +0000 (14:31 +0300)]
auth: Fix crash when OAUTH token validation failed with oauth2_use_worker_with_mech=yes
auth_request had already been freed, and also mech_event is NULL in worker.
Broken by
76cc978202c4a53fb83eca84b647ed6e19af6308
Timo Sirainen [Fri, 27 Jun 2025 21:23:14 +0000 (00:23 +0300)]
login-common: Fix potential crash when login proxy is destroyed
iostream-proxy may have closed the proxy with istream first, which closed
the fd, followed by closing the ostream, which attempted to remove IO for
the already closed fd.
Use iostream_fd refcounting to make sure the fd isn't closed too early.
Fixes:
Panic: epoll_ctl(del, 22) failed: Bad file descriptor
Timo Sirainen [Fri, 27 Jun 2025 21:21:17 +0000 (00:21 +0300)]
lib: Add functions to reliably autoclose fd for i/ostream-file
These can be used to create iostreams where fd is autoclosed after
both istream and ostream are closed in either order.
Marco Bettini [Wed, 11 Jun 2025 14:57:03 +0000 (14:57 +0000)]
config: settings_export() - Fix for null dereference
Found by Coverity, 40224 Explicit null dereferenced
Marco Bettini [Thu, 12 Jun 2025 08:59:34 +0000 (08:59 +0000)]
config: config_dump_human_filter_path() - Fix for static checker false positive
Found by Coverity, 40024 Dereference after null check
Marco Bettini [Wed, 11 Jun 2025 15:09:55 +0000 (15:09 +0000)]
config: config_parse_finish_service_defaults() - Fix for null dereference
Found by Coverity, 40031 Dereference null return value
Marco Bettini [Tue, 10 Jun 2025 09:27:05 +0000 (09:27 +0000)]
imap-hibernate: imap_hibernate_client_parse_input() - Reduce allocation from global to temp for state_r->tag
Found by coverity, 40470 Resource leak
Marco Bettini [Wed, 11 Jun 2025 14:40:14 +0000 (14:40 +0000)]
lib-auth-client: auth_client_request_handle_input() - Coalesce duplicated switch (status) {}
Marco Bettini [Fri, 30 May 2025 09:46:46 +0000 (09:46 +0000)]
auth: auth_request_validate_client_fp() - Add missing (void) in front of auth_request_import()
Found by coverity, 40493 Unchecked return value
Marco Bettini [Fri, 30 May 2025 13:22:35 +0000 (13:22 +0000)]
lib-storage: maildir_open_mail() - Add i_assert(ctx.path == NULL) on error path
Found by coverity, 40460 Resource leak
Marco Bettini [Tue, 10 Jun 2025 09:34:33 +0000 (09:34 +0000)]
lib-storage: mail_storage_create_list() - Remove moot tests for storage_class == NULL
Found by coverity, 40008 Dereference before null check
Marco Bettini [Thu, 12 Jun 2025 07:45:29 +0000 (07:45 +0000)]
lib-dns-client: dns_client_cache_clean(), Fix for static checker failing to see that priorityq_peek() cannot return NULL
Found by Coverity, 40466 Dereference null return value
Marco Bettini [Fri, 30 May 2025 14:53:16 +0000 (14:53 +0000)]
lib-dcrypt: dcrypt_openssl_ctx_sym_init() SSL1 - Fix whitespace
Marco Bettini [Fri, 30 May 2025 14:52:55 +0000 (14:52 +0000)]
lib-dcrypt: dcrypt_openssl_ctx_sym_init() SSL3 - Add missing return on dcrypt_openssl_error()
Found by coverity, 40465 Dereference after null check
Marco Bettini [Thu, 29 May 2025 08:47:25 +0000 (08:47 +0000)]
imap: client_send_mailbox_flags() - Don't send PERMANENTFLAGS if not selecting and we have allow_new_keywords
Marco Bettini [Fri, 30 May 2025 17:05:02 +0000 (17:05 +0000)]
lib-lua: test_io_lua() - Test return code from lua_script_init()
Found by coverity, 40458 Unchecked return value
Marco Bettini [Mon, 9 Jun 2025 15:37:47 +0000 (15:37 +0000)]
lib-lua: dlua_dovecot_io_register() - Fix unbalanced stack at exit
Marco Bettini [Thu, 5 Jun 2025 09:10:18 +0000 (09:10 +0000)]
lib-lua: dlua_script_init() - Remove unused variable
Marco Bettini [Thu, 5 Jun 2025 15:19:03 +0000 (15:19 +0000)]
lib-lua: Add missing lua scripts location
without this make check fails when the build dir is different than the source dir
Timo Sirainen [Mon, 2 Jun 2025 15:19:10 +0000 (18:19 +0300)]
lib-compression: Add o_stream_create_deflate()
Helge Deller [Tue, 10 Jun 2025 17:42:05 +0000 (19:42 +0200)]
lib-index: Fix storing cache fields' last_used with 32bit big endian CPUs
Debian started in 2025 to build packages on 32-bit platforms with 64-bit
time_t support by default. With that change, dovecot suddenly fails to
build on 32-bit big endian architectures (e.g. hppa, powerpc) with those
testsuite errors:
test-mail-cache-fields.c:52: Assert failed: cache_field.last_used == priv->field.last_used && cache_field.decision == priv->field.decision
test-mail-cache-fields.c:67: Assert failed: cache_field.last_used == priv->field.last_used && cache_field.decision == priv->field.decision
test-mail-cache-fields.c:96: Assert failed: cache_field.last_used == priv->field.last_used && cache_field.decision == priv->field.decision
mail cache fields read-write ......................................... : FAILED
Change the existing code for big endian architectures to actually check
the size of time_t at compile time instead of hardcoding a check for
SIZEOF_VOID_P to fix the issue for 32- and 64-bit big endian
architectures.
Signed-off-by: Helge Deller <deller@gmx.de>
Cc: Timo Sirainen <timo.sirainen@open-xchange.com>
Fixes: 1ee84ba0659f ("lib-index: Fix storing cache fields' last_used with 64bit big endian CPUs")
Timo Sirainen [Mon, 2 Jun 2025 17:42:03 +0000 (20:42 +0300)]
auth: Fix LDAP SASL support
The settings code didn't see the necessary defines.
Based on patch by Jakob Haufe
Broken by
961275fdb54878fdfa4ee1b9f1a4f00e82bf4a83
Timo Sirainen [Tue, 27 May 2025 08:20:00 +0000 (11:20 +0300)]
lib-master: Don't use USER environment in log prefix
USER environment is not so generally supported anymore. The tools
supporting it should change the log prefix themselves if they want it.
Also this fixes inconsistency where some tools logged "tool(USER): "
or "tool: " log prefix depending on whether the configuration was read
by executing doveconf or not (because doveconf dropped the USER
environment).
Timo Sirainen [Tue, 27 May 2025 08:10:56 +0000 (11:10 +0300)]
lib-master: Always process import_environment for standalone programs
It wasn't processed if config was read via config socket or from config
cache.
Timo Sirainen [Tue, 27 May 2025 07:08:41 +0000 (10:08 +0300)]
lib-settings: Fix settings cache validity checks
inode and size checks were swapped, so settings caching didn't actually
work.
Timo Sirainen [Thu, 15 May 2025 10:26:30 +0000 (13:26 +0300)]
lib-settings, config: Panic if SETTING_DEFINE_LIST_END is missing from settings lists
Timo Sirainen [Thu, 15 May 2025 10:06:56 +0000 (13:06 +0300)]
auth: Terminate properly auth_oauth2_post_setting_defines list
Fixes:
Error: xoauth2: oauth2 failed: Local validation failed: auth_oauth2_fields settings: Failed to parse configuration: settings struct auth_oauth2_fields #1 key mismatch
Timo Sirainen [Mon, 2 Jun 2025 07:49:23 +0000 (10:49 +0300)]
auth: Fix empty certificate fingerprint error handling
Broken in
db01107763ff3ad6afbf91f965ee46d2e3412b05
Fabian Groffen [Sat, 31 May 2025 08:49:28 +0000 (10:49 +0200)]
lib: cpu-count - fix compilation using musl
The macros, types and symbols CPU_* and cpuset_t are not exposed in
musl's sched.h unless _GNU_SOURCE is set.
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
Markus Valentin [Tue, 13 May 2025 11:36:28 +0000 (13:36 +0200)]
imapc: Automatically enable IMAP4rev2 if server has the capability
Markus Valentin [Thu, 8 May 2025 13:25:31 +0000 (15:25 +0200)]
imapc: Ignore or disable RECENT if IMAP4rev2 is enabled
Stephan Bosch [Fri, 30 May 2025 11:39:37 +0000 (13:39 +0200)]
lib-http: test-http-client-errors - Increase client progress timeout
Accounts for timeouts sometimes occurring while running in Valgrind.
Timo Sirainen [Mon, 26 May 2025 07:19:38 +0000 (10:19 +0300)]
config: Add asserts to make static analyzer happy
Timo Sirainen [Mon, 26 May 2025 07:13:13 +0000 (10:13 +0300)]
imap: Remove dead assignment
Timo Sirainen [Wed, 28 May 2025 07:26:09 +0000 (10:26 +0300)]
lib-dict-backend: Fix building ldap as plugin
Broken by
49f2c4d3365de502d705db28376bf41927a1a900
Jan Engelhardt [Mon, 31 Mar 2025 17:10:34 +0000 (19:10 +0200)]
configure: Do not modify user-provided CFLAGS variable
As per
https://www.gnu.org/software/automake/manual/html_node/User-Variables.html
CFLAGS is reserved for the user and should not be changed.
AM_CFLAGS is the right variable to use here.
Jan Engelhardt [Mon, 26 May 2025 10:26:28 +0000 (12:26 +0200)]
global: Fix wrong inheritance of AM_CFLAGS/AM_CPPFLAGS in target_CFLAGS
target_CFLAGS overrides AM_CFLAGS, not AM_CPPFLAGS, thus $(AM_CFLAGS),
not $(AM_CPPFLAGS), is needed in target_CFLAGS.
Timo Sirainen [Mon, 26 May 2025 07:57:41 +0000 (10:57 +0300)]
m4/dovecot.m4: Use AM_CFLAGS instead of EXTRA_CFLAGS with --enable-ubsan
Mainly to make it consistent with how all other build options are used.
Aki Tuomi [Fri, 23 May 2025 18:09:02 +0000 (21:09 +0300)]
login-common: Copy haproxy fields to client pool
They are stack allocated in lib-master now.
Aki Tuomi [Fri, 23 May 2025 18:07:33 +0000 (21:07 +0300)]
lib-master: Copy haproxy provided fields before calling callback
Otherwise fields get lost, broken in
894610212596c35aade07a4d0af9d5e7fd6245c7
Aki Tuomi [Mon, 26 May 2025 08:44:40 +0000 (11:44 +0300)]
lib: strfuncs - Make t_memdup public
Timo Sirainen [Mon, 26 May 2025 06:45:56 +0000 (09:45 +0300)]
lda: Default mail_home=$HOME environment if not using userdb lookup
The previous code to do this was removed by
e57d5b9002f910c095ee5b55821395fcf1da016a
Timo Sirainen [Mon, 26 May 2025 06:37:35 +0000 (09:37 +0300)]
lda: Fix using USER environment if -d hasn't been specified
This became broken at some point.
Aki Tuomi [Fri, 14 Feb 2025 13:29:34 +0000 (15:29 +0200)]
auth: Allow ssl cert to be validated by fingerprint
Aki Tuomi [Fri, 14 Feb 2025 13:29:33 +0000 (15:29 +0200)]
login-common: Allow invalid client cert if ssl_server_request_client_cert=any-cert
Aki Tuomi [Fri, 17 Jan 2025 14:04:39 +0000 (16:04 +0200)]
auth: Support check_client_fp, check_client_cert_fp, check_client_pubkey_fp fields
When set, these are matched against provided fingerprints, and
must be present in the request.
Field check_client_fp matches either certificate or public key fingerprint.
Aki Tuomi [Tue, 31 Dec 2024 10:40:39 +0000 (12:40 +0200)]
lib-ssl-iostream: Change ssl_server_request_client_cert to enum
If set to no, client certificates are not asked or verified.
If set to yes, client certificates are asked and verified.
If set to any-cert, client certificates are asked but verified with
fingerprinting
Aki Tuomi [Tue, 31 Dec 2024 10:40:19 +0000 (12:40 +0200)]
lib-ssl-iostream: Allow missing ca if invalid certs are allowed
Aki Tuomi [Tue, 31 Dec 2024 10:21:59 +0000 (12:21 +0200)]
login-common: Add ssl_client_cert_fp and ssl_client_cert_pubkey_fp if configured
Aki Tuomi [Tue, 31 Dec 2024 10:21:32 +0000 (12:21 +0200)]
lib-auth-client: Add ssl_client_cert_fp and ssl_client_cert_pubkey_fp fields
Aki Tuomi [Tue, 31 Dec 2024 10:19:53 +0000 (12:19 +0200)]
lib-auth-client: Compare ssl_ja3_hash to NULL and not 0
ssl_ja3_hash is a pointer, not a number, so it's more correct
to compare it as pointer.
Aki Tuomi [Tue, 31 Dec 2024 10:17:54 +0000 (12:17 +0200)]
auth: Add ssl_client_cert_fp and ssl_client_cert_pubkey_fp fields
Aki Tuomi [Fri, 14 Feb 2025 12:54:31 +0000 (14:54 +0200)]
lib-ssl-iostream: Replace ssl_iostream_has_broken_client_cert() with ssl_iostream_has_client_cert()
Broken cert does not do anything different from valid cert, but we need
to know if there was cert in the first place.
Aki Tuomi [Tue, 31 Dec 2024 10:04:00 +0000 (12:04 +0200)]
lib-ssl-iostream: Add ssl_peer_certificate_fingerprint_hash setting
Aki Tuomi [Tue, 31 Dec 2024 09:57:04 +0000 (11:57 +0200)]
lib-ssl-iostream: Add ssl_iostream_get_peer_cert_fingerprint()
Provides fingerprint of peer certificate and it's public key
using the configured hash algorithm in context.
Aki Tuomi [Fri, 21 Feb 2025 07:22:25 +0000 (09:22 +0200)]
lib-ssl-iostream: Reformat iostream-openssl.c
Timo Sirainen [Fri, 23 May 2025 09:28:54 +0000 (12:28 +0300)]
lib-http: test-http-client-errors - Fix memory leak at sub-process deinit
Broken by
dd6f9b3a3fab7d1c4b93d4f65086e8f019338b83
Aki Tuomi [Fri, 23 May 2025 08:34:41 +0000 (11:34 +0300)]
configure: Fix building without LDAP
Aki Tuomi [Fri, 23 May 2025 09:30:45 +0000 (12:30 +0300)]
lib-dcrypt: test-crypto - Store comparison key in DOVECOT format
PEM format is not stable between openssl versions
Timo Sirainen [Thu, 15 May 2025 10:40:13 +0000 (13:40 +0300)]
global: Fix warnings about uninitialized variables when compiling with -flto
These were only false positives, except for the unit test ones, which don't
really matter.
Aki Tuomi [Thu, 22 May 2025 05:02:09 +0000 (08:02 +0300)]
lib-dcrypt: Increase salt to 16 bytes for dovecot v2 keys
This makes it FIPS compatible.
Aki Tuomi [Thu, 22 May 2025 05:24:31 +0000 (08:24 +0300)]
lib-crypt: test-crypto - Enable testing more keys in test_load_v2_public_key()
Marco Bettini [Tue, 20 May 2025 15:53:28 +0000 (15:53 +0000)]
fts-flatcurve: fts_flatcurve_xapian_db_populate() - Remove memory leak on returning error strings
Discovered on coverity
Karl Fleischmann [Wed, 21 May 2025 10:09:29 +0000 (12:09 +0200)]
lib-lua/dlua-iostream: Remove unnecessary stream state assertion
Karl Fleischmann [Wed, 21 May 2025 09:48:21 +0000 (11:48 +0200)]
lib-lua: test_io_lua() - Ensure a read error is handled correctly
Karl Fleischmann [Wed, 21 May 2025 09:42:16 +0000 (11:42 +0200)]
lib-lua/dlua-iostream: dlua_i_read_common() - Optimize error handling
This also makes the error handling more explicit.
Karl Fleischmann [Fri, 16 May 2025 14:48:20 +0000 (16:48 +0200)]
lib-lua/dlua-iostream: dlua_read_line() - Ignore result of i_stream_read()
Issued by coverity unchecked return value.
Karl Fleischmann [Fri, 16 May 2025 14:37:31 +0000 (16:37 +0200)]
config: settings_add_include() - Close file descriptor if fstat() failed
Issued by coverity resource leak error.
Karl Fleischmann [Fri, 16 May 2025 13:23:27 +0000 (15:23 +0200)]
submission-login: cmd_helo_reply() - Only check against SMTP UTF8 if feature is enabled
Issued by coverity deadcode error.
Marco Bettini [Mon, 28 Apr 2025 13:55:38 +0000 (13:55 +0000)]
imapc: Do not forward ALERT response codes from sources with insecure connections
Arjen de Korte [Fri, 31 Jan 2025 12:38:55 +0000 (13:38 +0100)]
lib: hostpid - Use getaddrinfo instead of gethostbyname
gethostbyname is obsolote, so we should stop using it.
Markus Valentin [Mon, 5 May 2025 07:38:33 +0000 (09:38 +0200)]
imap: imap-select: Disable SELECT UNSEEN response if IMAP4rev2 is enabled
Aki Tuomi [Tue, 20 May 2025 05:43:13 +0000 (08:43 +0300)]
lib-dns-client: test-dns-lookup - Add DLLIB for dlopen()
Timo Sirainen [Thu, 15 May 2025 09:48:41 +0000 (12:48 +0300)]
lib-http: Use explicit numbers for HTTP_CLIENT_REQUEST_ERROR_* codes
We're beginning on rely on these numbers not to change, so make the numbers
explicit to avoid accidental changes.
sergey.kitov [Tue, 6 May 2025 15:20:19 +0000 (18:20 +0300)]
lib-dns src: Change dns_client_settings to config setting.
sergey.kitov [Tue, 13 May 2025 13:13:37 +0000 (16:13 +0300)]
lib-http: Pass http_client_host to http_client_host_shared_lookup.
The following commit will make dns_lookup retrieving DNS settings from
event. http_client_host is need to pass http_client event to dns_lookup, the event
contains client-specific DNS settings.
sergey.kitov [Fri, 28 Mar 2025 09:33:03 +0000 (11:33 +0200)]
lib-dns-client: Move struct dns_lookup initialization code into separate function.
Upcoming changes will add more usages of that.
sergey.kitov [Thu, 13 Feb 2025 15:21:38 +0000 (17:21 +0200)]
lib-http: Set http_client_context.dns_lookup_timeout_msecs to default value unconditionally.
DNS lookup timeout will be made configurable in the following commit.
sergey.kitov [Thu, 6 Feb 2025 12:26:10 +0000 (14:26 +0200)]
lib-smtp: Remove fallback to net_gethostbyname as not supported by upcoming changes.
sergey.kitov [Wed, 5 Feb 2025 15:45:39 +0000 (17:45 +0200)]
lib-http: Remove fallback to net_gethostbyname as not supported by upcoming changes.
sergey.kitov [Wed, 5 Feb 2025 11:38:19 +0000 (13:38 +0200)]
lib-dns-client: Move idle_timeout_msecs and cache_ttl_secs from dns_client_settings to dns_client_parameters.
As a preparation to make dns_client_settings configurable.
sergey.kitov [Tue, 4 Feb 2025 13:14:47 +0000 (15:14 +0200)]
submission: Originate submission_client event from event having settings_root set.
sergey.kitov [Tue, 4 Feb 2025 10:04:16 +0000 (12:04 +0200)]
lib-http: Fix bug with removal of http_client_request from delayed_requests.
Setting release_time to 0 in the beginning of
http_client_queue_submit_now() prevents removing of the request from
delayed_requests in case of failures.
sergey.kitov [Wed, 13 Nov 2024 13:23:43 +0000 (15:23 +0200)]
lib-dns-client, lib-http: remove ioloop from struct dns_client_settings.
sergey.kitov [Mon, 21 Oct 2024 13:57:18 +0000 (16:57 +0300)]
src: Remove event_parent from struct dns_client_settings.
sergey.kitov [Mon, 21 Oct 2024 09:40:47 +0000 (12:40 +0300)]
src: Rename dns_lookup_settings to dns_client_settings.
sergey.kitov [Thu, 15 May 2025 09:18:34 +0000 (12:18 +0300)]
config: Improve comment about self-referencing keys expansion.
sergey.kitov [Thu, 15 May 2025 09:15:07 +0000 (12:15 +0300)]
config: Cleanup config_write_keyvariable() function.
sergey.kitov [Thu, 15 May 2025 08:58:48 +0000 (11:58 +0300)]
config: Fix expanding $SET:key inside filters.
expand_parent parameter was added to config_get_value() in
92a9ff5e799adf9bffb8831576d84eb84b8ef09a , so its behavior was likely
useful only in the earlier hierarchical configuration.
Aki Tuomi [Fri, 16 May 2025 07:58:44 +0000 (10:58 +0300)]
pop3: Free var_expand program in parse_uidl_keymask()
Forgotten in
37c9d7802a6713443bcab3cfa3d01a57b154c4c1
Aki Tuomi [Fri, 16 May 2025 08:05:27 +0000 (11:05 +0300)]
lib-var-expand: Unload loaded crypt module at exit
Forgotten in
73ae2a9e45144f05a179d17d9b201226d93b81a0
Markus Valentin [Thu, 15 May 2025 12:04:06 +0000 (14:04 +0200)]
imap: cmd_append_handle_args() - Fix calling i_stream_create_limit() twice
f12df6e0eed634aa4fe92c225b54ef5ee965b35c accidentally added a second
call to i_stream_create_limit() was which led to leaking events and
wrong iostream->refcount in other plugins
Timo Sirainen [Thu, 15 May 2025 06:54:18 +0000 (09:54 +0300)]
config: Fix config filter sorting order
It was somewhat luckily working in glibc, but broke with e.g. musl libc.
This caused a crash at startup.
Broken by
5acdd2b97ed6092d1f0204bdeb3e418180519370
Markus Valentin [Tue, 6 May 2025 11:28:35 +0000 (13:28 +0200)]
imap: If IMAP4rev2 is enabled by the client also enable QRESYNC
Aki Tuomi [Wed, 16 Apr 2025 06:40:09 +0000 (09:40 +0300)]
lib-lua: Add base64 encode/decode support
Fred Morcos [Thu, 8 May 2025 16:53:06 +0000 (18:53 +0200)]
lib-ssl-iostream: Fix OpenSSL 3.0 provider/engine preference logic