Dovecot panics when sieve filter outputs much data
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
dovecot (Ubuntu) |
Fix Released
|
High
|
Christian Ehrhardt | ||
Xenial |
Fix Released
|
High
|
Christian Ehrhardt | ||
Yakkety |
Fix Released
|
High
|
Christian Ehrhardt |
Bug Description
[Impact]
* a crash of sieve when filtering large mails
* The fix is done via a backport of upstream
https:/
it by destroying the output stream before the fd is closed.
Patch is nice and small, just moving two lines and applies as-is.
[Test Case]
* Set up dovecot with sieve filtering on top:
- https:/
- http://
- https:/
Then push a bunch of larger mails through, >60k seems to be the area to
trigger it.
* It can be complex to set up, but fortunately the reporter is very
active and willing to verify Xenial and Yakkety in their setup.
[Regression Potential]
* The change itself is rather minimal and from upstream.
* given the change any regression we might overlook should be contained
to sieve which is not default enabled without a user configuring it.
* Did build and autopkgtest prior to suggest the upload all working
as expected (known to fail in Xenial, I fixed that back in Yakkety).
[Other Info]
* The change as done upstream is active for quite a while upstream and
not changed anymore later on. It was even moved into dovecot-core to be
reused for more use-cases and none of them triggered the need to
rewrite the code, see:
https:/
----
When using dovecot with vnd.dovecot.filter, where the filter returns at least ~60KB of data back to dovecot, dovecot panics (see dovecot log in attached apport report).
The error's origin is the pigeonhole plugin. The described error is already fixed in the github repo for sieve-pigeonhole [1].
We successfully managed to apply the patch locally for ubuntu's current version of pigeonhole (0.4.13 (7b14904)) by simply cherry picking the mentioned commit.
System information:
Description: Ubuntu 16.04.1 LTS
Release: 16.04
dovecot-core:
Installed: 1:2.2.22-1ubuntu2.1
dovecot-sieve:
Installed: 1:2.2.22-1ubuntu2.1
$ doveconf | head -n2
# 2.2.22 (fe789d2): /etc/dovecot/
# Pigeonhole version 0.4.13 (7b14904)
Changed in dovecot (Ubuntu Xenial): | |
assignee: | nobody → ChristianEhrhardt (paelzer) |
Changed in dovecot (Ubuntu): | |
assignee: | nobody → ChristianEhrhardt (paelzer) |
Changed in dovecot (Ubuntu Yakkety): | |
assignee: | nobody → ChristianEhrhardt (paelzer) |
description: | updated |
description: | updated |
Changed in dovecot (Ubuntu Xenial): | |
status: | Triaged → In Progress |
Changed in dovecot (Ubuntu Yakkety): | |
status: | Triaged → In Progress |
Status changed to 'Confirmed' because the bug affects multiple users.