🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.debian.bugs.dist
Article #2075

Bug#1150407: mutt: diff for NMU version 2.4.1-1.1

#2075
From: Salvatore Bonaccorso
Date: Sun, 25 Oct 2026 18:20
111 lines
6126 bytes
--KdnN6gGax/Yu9aOh
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

Control: tags 1150407 + patch
Control: tags 1150407 + pending


Dear maintainer,

I've prepared an NMU for mutt (versioned as 2.4.1-1.1) and
uploaded it to DELAYED/2. Please feel free to tell me if I
should cancel it.

Regards,
Salvatore

--KdnN6gGax/Yu9aOh
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment; filename=mutt-2.4.1-1.1-nmu.diff

diffstat for mutt-2.4.1 mutt-2.4.1

 changelog                                                         |    8 +
 patches/series                                                    |    1 
 patches/upstream/Fix-OOB-heap-write-in-convert_file_from_to.patch |   54 ++++++++++
 3 files changed, 63 insertions(+)

diff -Nru mutt-2.4.1/debian/changelog mutt-2.4.1/debian/changelog
--- mutt-2.4.1/debian/changelog	2026-07-21 07:46:27.000000000 +0200
+++ mutt-2.4.1/debian/changelog	2026-10-25 15:12:45.000000000 +0100
@@ -1,3 +1,11 @@
+mutt (2.4.1-1.1) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix OOB heap write in convert_file_from_to(). (CVE-2026-107570)
+    (Closes: #1150407)
+
+ -- Salvatore Bonaccorso <carnil@debian.org>  Sun, 25 Oct 2026 15:12:45 +0100
+
 mutt (2.4.1-1) unstable; urgency=medium
 
   * New upstream release (Closes: 1072814, 1113796, 1141601).
diff -Nru mutt-2.4.1/debian/patches/series mutt-2.4.1/debian/patches/series
--- mutt-2.4.1/debian/patches/series	2026-07-21 07:46:27.000000000 +0200
+++ mutt-2.4.1/debian/patches/series	2026-10-25 15:11:49.000000000 +0100
@@ -12,3 +12,4 @@
 upstream/1125291-fix-smime_pk7out_command-for-key-extraction.patch
 upstream/787968-muttrc-man-grammar-fix.patch
 upstream/shellcheck-errors.patch
+upstream/Fix-OOB-heap-write-in-convert_file_from_to.patch
diff -Nru mutt-2.4.1/debian/patches/upstream/Fix-OOB-heap-write-in-convert_file_from_to.patch mutt-2.4.1/debian/patches/upstream/Fix-OOB-heap-write-in-convert_file_from_to.patch
--- mutt-2.4.1/debian/patches/upstream/Fix-OOB-heap-write-in-convert_file_from_to.patch	1970-01-01 01:00:00.000000000 +0100
+++ mutt-2.4.1/debian/patches/upstream/Fix-OOB-heap-write-in-convert_file_from_to.patch	2026-10-25 15:11:18.000000000 +0100
@@ -0,0 +1,54 @@
+From: "Kevin J. McCarthy" <kevin@8t8.us>
+Date: Tue, 6 Oct 2026 13:50:42 +0800
+Subject: Fix OOB heap write in convert_file_from_to().
+Origin: https://gitlab.com/muttmua/mutt/-/commit/7752d93f26f8f1384905fad874afff5abb0f3e54
+Bug-Debian: https://bugs.debian.org/1150407
+Bug-Debian-Security: https://security-tracker.debian.org/tracker/CVE-2026-107570
+
+This issue was reported by Calif.io, in collaboration with Anthropic,
+with a full reproduce and suggested patch.  I've reviewed the patch
+and concur it is the best approach.
+
+This is due to a logic error in convert_file_from_to() in sendlib.c.
+It first counts the number of charsets to try in one loop, and then
+allocates and copies the charsets over in a separate loop afterwards.
+
+Unfortunately the second loop's logic does not follow the first loop
+exactly, and the counter gets out of sync with a zero-length charset.
+For example ":utf-8" where ":" is the delimiter.
+
+The fix is to keep the counter logic the same: incrementing after the
+initial zero-length charset check instead of in the for loop increment
+clause.
+
+It takes user interaction to trigger this OOB write: using the
+received message as a template in a new message via <resend-message>.
+The write is of arbitrary length.
+
+Calif.io did not report any exploitation beyond the OOB write.
+Nonetheless, I recommend all shipping distributions apply this patch.
+---
+ sendlib.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/sendlib.c b/sendlib.c
+index de6aa542b3c8..49d814000e33 100644
+--- a/sendlib.c
++++ b/sendlib.c
+@@ -864,11 +864,11 @@ static size_t convert_file_from_to(FILE *file,
+ 
+   /* Copy them */
+   tcode = safe_malloc(ncodes * sizeof(char *));
+-  for (c = tocodes, i = 0; c; c = c1 ? c1 + 1 : 0, i++)
++  for (c = tocodes, i = 0; c; c = c1 ? c1 + 1 : 0)
+   {
+     if ((c1 = strchr(c, ':')) == c)
+       continue;
+-    tcode[i] = mutt_substrdup(c, c1);
++    tcode[i++] = mutt_substrdup(c, c1);
+   }
+ 
+   ret = (size_t)(-1);
+-- 
+2.55.0
+

--KdnN6gGax/Yu9aOh--
Technical Details
Message-ID: <NSaZ4-7PIx-53@gated-at.bofh.it>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!3.eu.feeder.erje.net!feeder.erje.net!news.samoylyk.net!gothmog.csi.it!bofh.it!news.nic.it!robomod
References: <NMff4-4r8w-23@gated-at.bofh.it>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!3.eu.feeder.erje.net!feeder.erje.net!news.samoylyk.net!gothmog.csi.it!bofh.it!news.nic.it!robomod
From: Salvatore Bonaccorso <carnil@debian.org>
Newsgroups: linux.debian.bugs.dist
Subject: Bug#1150407: mutt: diff for NMU version 2.4.1-1.1
Date: Sun, 25 Oct 2026 19:20:02 +0100
Message-ID: <NSaZ4-7PIx-53@gated-at.bofh.it>
References: <NMff4-4r8w-23@gated-at.bofh.it>
X-Original-To: 1150407@bugs.debian.org
X-Mailbox-Line: From debian-bugs-dist-request@lists.debian.org  Sun Oct 25 18:14:38 2026
Old-Return-Path: <debbugs@buxtehude.debian.org>
X-Spam-Flag: NO
X-Spam-Score: -1.7
Reply-To: Salvatore Bonaccorso <carnil@debian.org>, 1150407@bugs.debian.org
Resent-To: debian-bugs-dist@lists.debian.org
Resent-Cc: mutt@packages.debian.org
X-Debian-Pr-Message: followup 1150407
X-Debian-Pr-Package: src:mutt
X-Debian-Pr-Keywords: upstream fixed-upstream security
X-Debian-Pr-Source: mutt
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="KdnN6gGax/Yu9aOh"
Content-Disposition: inline
X-Nmudiff-Version: 2.26.13
X-Debian-User: carnil
X-Debian-Message: from BTS
X-Mailing-List: <debian-bugs-dist@lists.debian.org> archive/latest/1998807
List-ID: <debian-bugs-dist.lists.debian.org>
List-URL: <https://lists.debian.org/debian-bugs-dist/>
Approved: robomod@news.nic.it
Lines: 111
Organization: linux.* mail to news gateway
Sender: robomod@news.nic.it
X-Original-Date: Sun, 25 Oct 2026 15:29:39 +0100
X-Original-Message-ID: <at4SU4pn6D_wTo40@eldamar.lan>
X-Original-References: <asi0qhymX7N5RZel@eldamar.lan>