Bug#976621: mutt: segfaults when REPLYTO environment variable is set

2021-01-31 Thread Alan D. Salewski

fixed 976621 mutt/2.0.5-1
thanks

On 2021-01-04 18:42:28, "Alan D. Salewski"  spake thus:
[...]

The fix is in mutt-2.0.3, which was released on 2020-12-04, so we should get
the fix whenever that version makes it into Debian.


I just confirmed that this bug is fixed in the '2.0.5-1' version of the 'mutt' 
package currently in Debian testing ("bullseye"):


$ mutt -v | head -n 1
Mutt 2.0.5 (2021-01-21)

Mutt no longer segfaults when started with the 'REPLYTO' environment variable 
set.


Many thanks to the Debian Mutt maintainers and upstream,
-Al

--
a l a n   d.   s a l e w s k i
ads@salewski.email
salew...@att.net
https://github.com/salewski



Bug#976621: mutt: segfaults when REPLYTO environment variable is set

2021-01-04 Thread Alan D. Salewski
I tripped over this issue today while upgrading from mutt 1.x to 2.x

The upstream issue for this bug is:

  * "Mutt 2.0.2 - macOS 10.15.7 - segmentation fault"
https://gitlab.com/muttmua/mutt/-/issues/310

The issue was fixed upstream in this commit:

commit cfdcfa7ffee69ecdf7a56a6b9c541d1f71496601
Author: Kevin McCarthy 
Date:   Sun Nov 29 13:44:30 2020 -0800

Fix REPLY_TO environment variable handling.

Commit 4e153adf changed this code to reuse the function buffer
variable, but forgot to rewind the buffer for parsing in
parse_my_hdr().

Additionally commit e5a32a61 removed an extra "null termination"
mutt_buffer_addch() at the end of mutt_extract_token().  This caused a
NULL value to be passed to the strpbrk() in parse_my_hdr(), causing a
segv.  Change to use a buffer pool token parameter instead.

I actually think, like with the previous IMAP mailbox handling, this
method of adding a my_hdr is dangerous.  I'll look into refactoring it
in master instead.

Thanks to Paul Nevai for reporting the problem and tracking down the
backtrace.


The fix is in mutt-2.0.3, which was released on 2020-12-04, so we should get
the fix whenever that version makes it into Debian.

-- 
-
a l a n   d.   s a l e w s k i   salew...@att.net
   ads@salewski.email
  https://github.com/salewski
-



Bug#976621: mutt: segfaults when REPLYTO environment variable is set

2020-12-05 Thread Jarek KamiƄski
Package: mutt
Version: 2.0.2-1
Severity: normal
File: /usr/bin/mutt

Hi!

Mutt recently started to crash when the REPLYTO environment variable is
set, it used to work in the past.

#v+
% export REPLYTO='a b '
% mutt < /dev/null
zsh: segmentation fault  mutt < /dev/null
{139}% export REPLYTO='a@b.c'
% mutt < /dev/null
zsh: segmentation fault  mutt < /dev/null
{139}% unset REPLYTO
% mutt < /dev/null
No recipients were specified.
#v-

Stack trace:
#v+
#0  __strpbrk_sse42 (s=, a=) at 
../sysdeps/x86_64/multiarch/strcspn-c.c:163
#1  0x55598d2d in parse_my_hdr (buf=buf@entry=0x7fffd110, 
s=, udata=..., udata@entry=..., err=err@entry=0x7fffd0f0) at 
../../init.c:1744
#2  0x5559e3d6 in mutt_init (skip_sys_rc=skip_sys_rc@entry=0, 
commands=0x0) at ../../init.c:3766
#3  0x5556bfb4 in main (argc=1, argv=0x7fffd8f8, environ=) at ../../main.c:868
#v-


-- Package-specific info:
Mutt 2.0.2 (2020-11-20)
Copyright (C) 1996-2020 Michael R. Elkins and others.
Mutt comes with ABSOLUTELY NO WARRANTY; for details type `mutt -vv'.
Mutt is free software, and you are welcome to redistribute it
under certain conditions; type `mutt -vv' for details.

System: Linux 5.9.0-2-amd64 (x86_64)
ncurses: ncurses 6.2.20201114 (compiled with 6.2)
libidn2: 2.3.0 (compiled with 2.3.0)
hcache backend: tokyocabinet 1.4.48

Compiler:
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/10/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none:amdgcn-amdhsa:hsa
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 10.2.0-17' 
--with-bugurl=file:///usr/share/doc/gcc-10/README.Bugs 
--enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++,m2 --prefix=/usr 
--with-gcc-major-version-only --program-suffix=-10 
--program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id 
--libexecdir=/usr/lib --without-included-gettext --enable-threads=posix 
--libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug 
--enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new 
--enable-gnu-unique-object --disable-vtable-verify --enable-plugin 
--enable-default-pie --with-system-zlib --enable-libphobos-checking=release 
--with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch 
--disable-werror --with-arch-32=i686 --with-abi=m64 
--with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic 
--enable-offload-targets=nvptx-none=/build/gcc-10-1vClxM/gcc-10-10.2.0/debian/tmp-nvptx/usr,amdgcn-amdhsa=/build/gcc-10-1vClxM/gcc-10-10.2.0/debian/tmp-gcn/usr,hsa
 --without-cuda-driver --enable-checking=yes,extra,rtl --build=x86_64-linux-gnu 
--host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 10.2.0 (Debian 10.2.0-17) 

Configure options: '--build=x86_64-linux-gnu' '--prefix=/usr' 
'--includedir=\${prefix}/include' '--mandir=\${prefix}/share/man' 
'--infodir=\${prefix}/share/info' '--sysconfdir=/etc' '--localstatedir=/var' 
'--disable-option-checking' '--disable-silent-rules' 
'--libdir=\${prefix}/lib/x86_64-linux-gnu' '--runstatedir=/run' 
'--disable-maintainer-mode' '--disable-dependency-tracking' 
'--with-mailpath=/var/mail' '--enable-compressed' '--enable-debug' 
'--enable-fcntl' '--enable-hcache' '--enable-gpgme' '--enable-imap' 
'--enable-smtp' '--enable-pop' '--enable-sidebar' '--enable-dotlock' 
'--disable-fmemopen' '--with-curses' '--with-gnutls' '--with-gss' '--with-idn2' 
'--with-mixmaster' '--with-sasl' '--without-gdbm' '--without-bdb' 
'--without-qdbm' '--with-tokyocabinet' 'build_alias=x86_64-linux-gnu' 
'CFLAGS=-g -O2 -fdebug-prefix-map=/build/mutt-dNLhlz/mutt-2.0.2=. 
-fstack-protector-strong -Wformat -Werror=format-security' 
'LDFLAGS=-Wl,-z,relro -Wl,-z,now' 'CPPFLAGS=-Wdate-time -D_FORTIFY_SOURCE=2'

Compilation CFLAGS: -Wall -pedantic -Wno-long-long -g -O2 
-fdebug-prefix-map=/build/mutt-dNLhlz/mutt-2.0.2=. -fstack-protector-strong 
-Wformat -Werror=format-security

Compile options:
-DOMAIN
+DEBUG
-HOMESPOOL  +USE_SETGID  +USE_DOTLOCK  +DL_STANDALONE  +USE_FCNTL  -USE_FLOCK   
+USE_POP  +USE_IMAP  +USE_SMTP  
-USE_SSL_OPENSSL  +USE_SSL_GNUTLS  +USE_SASL  +USE_GSS  +HAVE_GETADDRINFO  
+HAVE_REGCOMP  -USE_GNU_REGEX  
+HAVE_COLOR  +HAVE_START_COLOR  +HAVE_TYPEAHEAD  +HAVE_BKGDSET  
+HAVE_CURS_SET  +HAVE_META  +HAVE_RESIZETERM  +HAVE_FUTIMENS  
+CRYPT_BACKEND_CLASSIC_PGP  +CRYPT_BACKEND_CLASSIC_SMIME  +CRYPT_BACKEND_GPGME  
-EXACT_ADDRESS  -SUN_ATTACHMENT  
+ENABLE_NLS  -LOCALES_HACK  +HAVE_WC_FUNCS  +HAVE_LANGINFO_CODESET  
+HAVE_LANGINFO_YESEXPR  
+HAVE_ICONV  -ICONV_NONTRANS  -HAVE_LIBIDN  +HAVE_LIBIDN2  +HAVE_GETSID  
+USE_HCACHE  
+USE_SIDEBAR  +USE_COMPRESSED  +USE_INOTIFY  
-ISPELL
SENDMAIL="/usr/sbin/sendmail"
MAILPATH="/var/mail"
PKGDATADIR="/usr/share/mutt"
SYSCONFDIR="/etc"
EXECSHELL="/bin/sh"
MIXMASTER="mixmaster"

To contact the developers, please mail to .
To report a bug, please contact the Mutt