Package: dma
Version: 0.11-1+deb10u1
Severity: normal

Dear Maintainer,
   * What led up to the situation?

Consider the following situation:
ls -l /etc/dma
total 8
-rw-r----- 1 root mail  186 Jul 29  2019 auth.conf
-rw-r----- 1 root root 2445 Aug  5 23:09 dma.conf

/etc/dma/dma.conf is not readable by dma which runs under group mail (setgid). 
(This was intitially caused by moving a backup file into place without checking 
the permissions)

   * What exactly did you do (or not do) that was effective (or
     ineffective)?

Invoke dma as non-root-user (e.g. some cronjob):
dma -t
or
sendmail -t

the -t argument is optional, it crashes without it as well.

   * What was the outcome of this action?

SEGFAULT: (below is a backtrace after rebuilding the package to keep the debug 
symbols)

$ which dma
/usr/sbin/dma
$ gdb dma
GNU gdb (Debian 8.2.1-2+b3) 8.2.1
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from dma...done.
(gdb) run -t
Starting program: /usr/sbin/dma -t
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Program received signal SIGSEGV, Segmentation fault.
__strlen_avx2 () at ../sysdeps/x86_64/multiarch/strlen-avx2.S:65
65      ../sysdeps/x86_64/multiarch/strlen-avx2.S: No such file or directory.
(gdb) bt
#0  __strlen_avx2 () at ../sysdeps/x86_64/multiarch/strlen-avx2.S:65
#1  0x00007fcdcde919ef in _IO_vfprintf_internal (s=0x7fff03cf01c0, 
format=0x55e7adb58bd0 "%s: %s: %s\n", ap=0x7fff03cf2880)
    at vfprintf.c:1638
#2  0x00007fcdcde92866 in buffered_vfprintf (s=s@entry=0x7fcdcdffc680 
<_IO_2_1_stderr_>,
    format=format@entry=0x55e7adb58bd0 "%s: %s: %s\n", 
args=args@entry=0x7fff03cf2880) at vfprintf.c:2322
#3  0x00007fcdcde8feb2 in _IO_vfprintf_internal (s=0x7fcdcdffc680 
<_IO_2_1_stderr_>, format=0x55e7adb58bd0 "%s: %s: %s\n",
    ap=ap@entry=0x7fff03cf2880) at vfprintf.c:1296
#4  0x00007fcdcde98534 in __fprintf (stream=<optimized out>, format=<optimized 
out>) at fprintf.c:32
#5  0x000055e7adb558e2 in errlog (exitcode=66, fmt=0x55e7adb5772f "can not open 
config `%s'") at util.c:155
#6  0x000055e7adb4e7f8 in parse_conf (config_path=0x55e7adb57d8f 
"/etc/dma/dma.conf") at conf.c:162
#7  0x000055e7adb506dc in main (argc=0, argv=0x7fff03cf3598) at dma.c:575

   * What outcome did you expect instead?

A clean exit. DMA built by source ( 
https://github.com/corecode/dma/archive/v0.13.tar.gz ) cleanly exits in the 
same situation:

/usr/local/sbin/dma
dma: can not open config `/etc/dma/dma.conf': Permission denied

-- System Information:
Debian Release: 10.5
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)
Kernel: Linux 4.19.0-10-cloud-amd64 (SMP w/1 CPU core)
Locale: LANG=C.UTF-8, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE=C.UTF-8 
(charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
Versions of packages dma depends on:
ii  debconf [debconf-2.0]  1.5.71
ii  libc6                  2.28-10
ii  libssl1.1              1.1.1d-0+deb10u3
ii  ucf                    3.0038+nmu1
dma recommends no packages.
dma suggests no packages.
-- Configuration Files:
/etc/dma/auth.conf [Errno 13] Permission denied: '/etc/dma/auth.conf'
-- debconf information:
* dma/mailname: instance-1.us-central1-a.c.orbital-bee-258421.internal
* dma/relayhost:

Reply via email to