Package: dovecot-sieve Version: 1:2.2.34-2 Severity: important dovecot-lda crashes in sieve processing reproducibly with certain emails. This causes these emails to be bounced with delivery failures.
mail.log contains the following information (backtrace manually reformatted for readability): Mar 5 23:09:47 black dovecot: lda(cobb): Panic: file istream.c: line 197 (i_stream_read): assertion failed: ((size_t)ret+old_size == _stream->pos - _stream->skip) Mar 5 23:09:47 black dovecot: lda(cobb): Error: Raw backtrace: /usr/lib/dovecot/libdovecot.so.0(+0xa09b2) [0x7fac77e089b2] -> /usr/lib/dovecot/libdovecot.so.0(+0xa0a77) [0x7fac77e08a77] -> /usr/lib/dovecot/libdovecot.so.0(i_fatal+0) [0x7fac77d98718] -> /usr/lib/dovecot/libdovecot.so.0(i_stream_read+0x2d0) [0x7fac77e14530] -> /usr/lib/dovecot/libdovecot.so.0(i_stream_read_data+0x3d) [0x7fac77e14d6d] -> /usr/lib/dovecot/libdovecot.so.0(message_parse_header_next+0x71) [0x7fac77df0bb1] -> /usr/lib/dovecot/libdovecot.so.0(+0x8afee) [0x7fac77df2fee] -> /usr/lib/dovecot/libdovecot.so.0(message_parser_parse_next_block+0x41) [0x7fac77df3711] -> /usr/lib/dovecot/libdovecot-sieve.so.0(+0x2bcda) [0x7fac770f3cda] -> /usr/lib/dovecot/libdovecot-sieve.so.0(sieve_message_body_get_content+0x41) [0x7fac770f5181] -> /usr/lib/dovecot/libdovecot-sieve.so.0(ext_body_get_part_list+0xd6) [0x7fac7712cbc6] -> /usr/lib/dovecot/libdovecot-sieve.so.0(+0x65332) [0x7fac7712d332] -> /usr/lib/dovecot/libdovecot-sieve.so.0(sieve_interpreter_continue+0x7c) [0x7fac77107ffc] -> /usr/lib/dovecot/libdovecot-sieve.so.0(ext_include_execute_include+0x4ae) [0x7fac7712b8ee] -> /usr/lib/dovecot/libdovecot-sieve.so.0(+0x61dfe) [0x7fac77129dfe] -> /usr/lib/dovecot/libdovecot-sieve.so.0(sieve_interpreter_continue+0x7c) [0x7fac77107ffc] -> /usr/lib/dovecot/libdovecot-sieve.so.0(sieve_interpreter_run+0x2b) [0x7fac7710823b] -> /usr/lib/dovecot/libdovecot-sieve.so.0(+0x53fa8) [0x7fac7711bfa8] -> /usr/lib/dovecot/libdovecot-sieve.so.0(sieve_multiscript_run+0x3a) [0x7fac7711cd6a] -> /usr/lib/dovecot/modules/lib90_sieve_plugin.so(+0x3877) [0x7fac7738b877] -> /usr/lib/dovecot/libdovecot-lda.so.0(mail_deliver+0xb6) [0x7fac783f6b26] -> /usr/lib/dovecot/dovecot-lda(main+0x67b) [0x5646f181fbdb] -> /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xea) [0x7fac779d0f2a] -> /usr/lib/dovecot/dovecot-lda(_start+0x2a) [0x5646f182023a] I can reproduce this with: /usr/lib/dovecot/dovecot-lda -f a...@example.com -a b...@example.com -d default-user </tmp/xxxx where the default-user account contains the following .dovecot.sieve file: require ["editheader", "variables"]; if header :matches "Subject" "*" { deleteheader "Subject"; addheader "Subject" "[Default] ${0}"; } I can supply the received email file which reproduces the problem (/tmp/xxxx in the command above) by private email. -- Package-specific info: dovecot configuration --------------------- # 2.2.34 (874deae): /etc/dovecot/dovecot.conf # Pigeonhole version 0.4.22 (22940fb7) # OS: Linux 4.14.0-3-amd64 x86_64 Debian buster/sid # Hostname: black.home.cobb.me.uk log_timestamp = "%Y-%m-%d %H:%M:%S " login_trusted_networks = 192.168.0.0/16 127.0.0.1 mail_location = maildir:~/dovecot:INDEX=/var/indexes/%u mail_max_userip_connections = 50 mail_privileged_group = mail maildir_stat_dirs = yes namespace { hidden = yes inbox = no list = children location = mbox:~/mail prefix = "#mbox/" separator = / type = private } namespace inbox { inbox = yes location = mailbox Drafts { special_use = \Drafts } mailbox Junk { special_use = \Junk } mailbox Sent { special_use = \Sent } mailbox "Sent Messages" { special_use = \Sent } mailbox Trash { special_use = \Trash } prefix = separator = / } passdb { driver = pam } passdb { args = scheme=SSHA512 username_format=%n /etc/dovecot/users driver = passwd-file } plugin { sieve = file:~/sieve;active=~/.dovecot.sieve sieve_extensions = +editheader +vnd.dovecot.debug } protocols = " imap" service imap { process_limit = 100 } service pop3 { process_limit = 100 } ssl_cert = </etc/dovecot/dovecot.pem ssl_key = # hidden, use -P to show it userdb { driver = passwd } userdb { args = username_format=%n /etc/dovecot/users driver = passwd-file } protocol lmtp { mail_plugins = " sieve" } protocol lda { mail_plugins = " sieve" } -- System Information: Debian Release: buster/sid APT prefers testing APT policy: (900, 'testing') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 4.14.0-3-amd64 (SMP w/4 CPU cores) Locale: LANG=en_IE.utf8, LC_CTYPE=en_IE.utf8 (charmap=UTF-8) (ignored: LC_ALL set to en_IE.utf8), LANGUAGE=en_IE.utf8 (charmap=UTF-8) (ignored: LC_ALL set to en_IE.utf8) Shell: /bin/sh linked to /bin/bash Init: systemd (via /run/systemd/system) LSM: AppArmor: enabled Versions of packages dovecot-sieve depends on: ii dovecot-core 1:2.2.34-2 ii libc6 2.26-6 ii ucf 3.0038 dovecot-sieve recommends no packages. dovecot-sieve suggests no packages. Versions of packages dovecot-sieve is related to: ii dovecot-core [dovecot-common] 1:2.2.34-2 pn dovecot-dev <none> pn dovecot-gssapi <none> ii dovecot-imapd 1:2.2.34-2 pn dovecot-ldap <none> pn dovecot-lmtpd <none> pn dovecot-managesieved <none> pn dovecot-mysql <none> pn dovecot-pgsql <none> pn dovecot-pop3d <none> ii dovecot-sieve 1:2.2.34-2 pn dovecot-sqlite <none> -- no debconf information