Merge ~bryce/ubuntu/+source/dovecot:sru-lp1992848-jammy into ubuntu/+source/dovecot:ubuntu/jammy-devel

Proposed by Bryce Harrington
Status: Merged
Approved by: git-ubuntu bot
Approved revision: not available
Merged at revision: b76ea5c1e4659a2ed58032d340218738cc37764e
Proposed branch: ~bryce/ubuntu/+source/dovecot:sru-lp1992848-jammy
Merge into: ubuntu/+source/dovecot:ubuntu/jammy-devel
Diff against target: 69 lines (+47/-0)
3 files modified
debian/changelog (+8/-0)
debian/patches/fix-leaking-virtual-mailbox.patch (+38/-0)
debian/patches/series (+1/-0)
Reviewer Review Type Date Requested Status
git-ubuntu bot Approve
Andreas Hasenack Approve
Canonical Server packageset reviewers Pending
Canonical Server Reporter Pending
Review via email: mp+460472@code.launchpad.net

Description of the change

I've rebased Michal's patch-on-a-plate SRU for dovecot. Unfortunately, we lack steps to reproduce the bug and the affected users haven't responded to the latest batch of questions. But as long as they show up to test, no reason not to give the SRU a shot. The fix looks straightforward and obvious. My only changes vs. Michal's is to change the patch name and commit message.

PPA: https://launchpad.net/~bryce/+archive/ubuntu/dovecot-sru-lp1992848

The PPA is still building. I don't plan to run autopkgtests against the PPA but feel free to do so as part of the review if you'd like; I don't expect any problems.

To post a comment you must log in.
Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Looking at this

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Nothing to comment further, +1

review: Approve
Revision history for this message
git-ubuntu bot (git-ubuntu-bot) wrote :

Approvers: bryce, ahasenack
Uploaders: bryce, ahasenack
MP auto-approved

review: Approve
Revision history for this message
Bryce Harrington (bryce) wrote :

Thanks, uploaded to jammy:

Successfully signed dsc, buildinfo, changes files
Vcs-Git: https://git.launchpad.net/~bryce/ubuntu/+source/dovecot
Vcs-Git-Commit: b76ea5c1e4659a2ed58032d340218738cc37764e
Vcs-Git-Ref: refs/heads/sru-lp1992848-jammy
$ dput ubuntu ../dovecot_2.3.16+dfsg1-3ubuntu2.3_source.changes
gpg: ../dovecot_2.3.16+dfsg1-3ubuntu2.3_source.changes: Valid signature from E603B2578FB8F0FB
gpg: ../dovecot_2.3.16+dfsg1-3ubuntu2.3.dsc: Valid signature from E603B2578FB8F0FB
D: Setting host argument.
Checking signature on .changes
Checking signature on .dsc
Uploading to ubuntu (via ftp to upload.ubuntu.com):
  Uploading dovecot_2.3.16+dfsg1-3ubuntu2.3.dsc: done.
  Uploading dovecot_2.3.16+dfsg1-3ubuntu2.3.debian.tar.xz: done.
  Uploading dovecot_2.3.16+dfsg1-3ubuntu2.3_source.buildinfo: done.
  Uploading dovecot_2.3.16+dfsg1-3ubuntu2.3_source.changes: done.
Successfully uploaded packages.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/debian/changelog b/debian/changelog
2index 181b344..bd13b79 100644
3--- a/debian/changelog
4+++ b/debian/changelog
5@@ -1,3 +1,11 @@
6+dovecot (1:2.3.16+dfsg1-3ubuntu2.3) jammy; urgency=medium
7+
8+ * d/p/fix-leaking-virtual-mailbox.patch: Fix leak/crash when failing to
9+ open virtual mailboxes.
10+ (LP: #1992848)
11+
12+ -- Michal Maloszewski <michal.maloszewski@canonical.com> Thu, 20 Oct 2022 23:36:54 +0200
13+
14 dovecot (1:2.3.16+dfsg1-3ubuntu2.2) jammy; urgency=medium
15
16 * Backport fix + refactoring for handling ssl settings
17diff --git a/debian/patches/fix-leaking-virtual-mailbox.patch b/debian/patches/fix-leaking-virtual-mailbox.patch
18new file mode 100644
19index 0000000..01cf4d4
20--- /dev/null
21+++ b/debian/patches/fix-leaking-virtual-mailbox.patch
22@@ -0,0 +1,38 @@
23+From bdf4474ed82aaf964e7d94e72ca56b496e3815f9 Mon Sep 17 00:00:00 2001
24+From: Timo Sirainen <timo.sirainen@open-xchange.com>
25+Date: Fri, 1 Oct 2021 15:08:45 +0300
26+Subject: [PATCH] virtual: Fix leaking mailboxes if virtual mailbox can't
27+ be opened
28+
29+Fixes also a crash at deinit:
30+Panic: file mail-user.c: line 232 (mail_user_deinit): assertion failed: ((*user)->refcount == 1)
31+
32+Description: Fix the dovecot package to prevent from leaking mailboxes
33+ if virtual mailbox cannot be opened.
34+Origin: upstream, https://github.com/dovecot/core/commit/bdf4474ed82aaf964e7d94e72ca56b496e3815f9
35+Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/dovecot/+bug/1992848
36+Reviewed-By: Bryce Harrington <bryce@canonical.com>
37+Last-Update: 2022-10-20
38+---
39+ src/plugins/virtual/virtual-storage.c | 4 ++--
40+ 1 file changed, 2 insertions(+), 2 deletions(-)
41+
42+diff --git a/src/plugins/virtual/virtual-storage.c b/src/plugins/virtual/virtual-storage.c
43+index 2f31503d53..a0779cc186 100644
44+--- a/src/plugins/virtual/virtual-storage.c
45++++ b/src/plugins/virtual/virtual-storage.c
46+@@ -495,12 +495,12 @@ static int virtual_mailbox_open(struct mailbox *box)
47+ ret = virtual_mailboxes_open(mbox, box->flags);
48+ array_pop_back(&mbox->storage->open_stack);
49+ }
50++ if (ret == 0)
51++ ret = index_storage_mailbox_open(box, FALSE);
52+ if (ret < 0) {
53+ virtual_mailbox_close_internal(mbox);
54+ return -1;
55+ }
56+- if (index_storage_mailbox_open(box, FALSE) < 0)
57+- return -1;
58+
59+ mbox->virtual_ext_id =
60+ mail_index_ext_register(mbox->box.index, "virtual", 0,
61diff --git a/debian/patches/series b/debian/patches/series
62index 03caf8e..7899a3d 100644
63--- a/debian/patches/series
64+++ b/debian/patches/series
65@@ -27,3 +27,4 @@ split-off-master_service_ssl_server_settings.patch
66 remove-unused-master_service_is_ssl_module_loaded.patch
67 use-ssl-server-settings-only-when-necessary.patch
68 remove-unnecessary-master_service_flag_use_ssl_settings.patch
69+fix-leaking-virtual-mailbox.patch

Subscribers

People subscribed via source and target branches