Package: dovecot-sieve Version: 1:2.3.4.1-1 Severity: normal When processing a particular type of notification email, I consistently get the following sieve crash during execution of /usr/lib/dovecot/dovecot-lda. (note, extracted from mail.log and reformatted a little for readability)
Feb 25 19:22:46 black dovecot: lda(cobb)<7721><SmI+AoZAdFwpHgAAy7SJiA>: Panic: file istream-concat.c: line 25 (i_stream_concat_close): assertion failed: (cstream->cur_input == cstream->input[cstream->cur_idx]) Feb 25 19:22:46 black dovecot: lda(cobb)<7721><SmI+AoZAdFwpHgAAy7SJiA>: Error: Raw backtrace: /usr/lib/dovecot/libdovecot.so.0(+0xdad0b) [0x7faa1caead0b] -> /usr/lib/dovecot/libdovecot.so.0(+0xdad71) [0x7faa1caead71] -> /usr/lib/dovecot/libdovecot.so.0(+0x4a19f) [0x7faa1ca5a19f] -> /usr/lib/dovecot/libdovecot.so.0(+0x4c185) [0x7faa1ca5c185] -> /usr/lib/dovecot/libdovecot.so.0(io_stream_unref+0x27) [0x7faa1caf3a07] -> /usr/lib/dovecot/libdovecot.so.0(i_stream_unref+0x1d) [0x7faa1caf697d] -> /usr/lib/dovecot/libdovecot-storage.so.0(index_storage_mailbox_close+0x69) [0x7faa1cc76b79] -> /usr/lib/dovecot/libdovecot-storage.so.0(mailbox_close+0x24) [0x7faa1cbf9ed4] -> /usr/lib/dovecot/libdovecot-storage.so.0(mailbox_free+0x13) [0x7faa1cbf9f43] -> /usr/lib/dovecot/dovecot-lda(main+0x756) [0x5626a8ac6dd6] -> /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xeb) [0x7faa1c81c09b] -> /usr/lib/dovecot/dovecot-lda(_start+0x2a) [0x5626a8ac747a] I can reproduce the crash consistently with a particular type of message being delivered to a particular account with a fairly large set of sieve scripts. I have managed to reduce the message to a small test message but I have not been able to reproduce the crash with a significantly simpler script. The actual line in the sieve script being executed at the time of the crash is the first line of the following (the test would not be satisfied on this message): if body :raw :contains "://docs.google.com" { addheader "X-GRC-SIEVE-Message" "Deleted by Google Docs low tolerance filter"; fileinto "${spam_medium}"; stop; } If I comment out that test, or even just remove the ":raw" clause, the script executes. However a small script just containing that test does not crash. I would rather not attach the full scripts to this report, but can provide them to the maintainer if required. The test message to reproduce the crash is: >From xxxx...@xxxxxxxxxxxxxxxxxxxxxxx.com Thu Feb 21 23:33:46 2019 Delivered-To: x...@xxxx.uk.net Return-Path: <xxxx...@xxxxxxxxxxxxxxxxxxxxxxx.com> X-Original-To: xxwhois_grcxxxxxxx@localhost Delivered-To: x...@xxxx.uk.net To: xxxxxx...@xxxxxxxx.com Subject: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx From: xxxxxx xxxxxx - xxxxxxx xxxxxxx <xxxx...@xxxxxxx.com> Content-Type: text/plain; charset=utf-8 Message-Id: <20190221232525.e87682ed2...@xxxxxxxxxxxxxxxxxxxxxxx.com> Date: Thu, 21 Feb 2019 23:25:25 +0000 (GMT) Test message -- Package-specific info: dovecot configuration --------------------- # 2.3.4.1 (f79e8e7e4): /etc/dovecot/dovecot.conf # Pigeonhole version 0.5.4 () # OS: Linux 4.19.0-2-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 } postmaster_address = postmas...@cobb.uk.net protocols = " imap" service imap { process_limit = 100 } service pop3 { process_limit = 100 } ssl_cert = </etc/dovecot/private/dovecot.pem ssl_client_ca_dir = /etc/ssl/certs ssl_dh = # hidden, use -P to show it 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.19.0-2-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.3.4.1-1 ii libc6 2.28-6 ii ucf 3.0038+nmu1 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.3.4.1-1 pn dovecot-dev <none> pn dovecot-gssapi <none> ii dovecot-imapd 1:2.3.4.1-1 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.3.4.1-1 pn dovecot-sqlite <none> -- no debconf information