Bug#899282: libbsd0: bsd-mailx segfaults

2018-05-22 Thread Guillem Jover
Hi!

On Tue, 2018-05-22 at 08:50:19 +0200, Sven Joachim wrote:
> Package: libbsd0
> Version: 0.9.0-1
> Severity: serious

> Today I have received a mail from the daily cron job, and to my
> surprise /usr/bin/mail (pointing to bsd-mailx) crashed when it accessed
> it.  Downgrading libbsd0 to version 0.8.7-1.1 fixed that, here is a
> backtrace:

Thanks for the backtrace!

> ,
> | % gdb =mail
[…]
> | #1  0xf7f9bae9 in istrsenvisxl (mbdstp=mbdstp@entry=0x3080, 
> dlen=dlen@entry=0x3084, 
> | mbsrc=mbsrc@entry=0x2000  0x2000>, flags=96, mbextra=0xf7f9d9be "", 
> | cerr_ptr=0x0) at vis.c:583
> | No locals.
> | #2  0xf7f9be2c in strnvis (mbdst=, dlen=, 
> | mbsrc=0x2000 , flags=96) 
> at vis.c:707
> | No locals.
[…]
> `

> Please clone/reassign to bsd-mailx if necessary, I haven't investigated
> the issue more closely.

And ugh, the NetBSD vis functions had a different signature for strnvis()
and strnunvis() WRT the pre-existing FreeBSD implementations. :( And I
didn't notice when importing them. I'll quickly revert those signatures
for now, and probably provide the alternative NetBSD via different symbol
versions in 0.9.2 or so.

Thanks,
Guillem



Bug#899282: libbsd0: bsd-mailx segfaults

2018-05-22 Thread Sven Joachim
Package: libbsd0
Version: 0.9.0-1
Severity: serious

Today I have received a mail from the daily cron job, and to my
surprise /usr/bin/mail (pointing to bsd-mailx) crashed when it accessed
it.  Downgrading libbsd0 to version 0.8.7-1.1 fixed that, here is a
backtrace:

,
| % gdb =mail
| Reading symbols from /usr/bin/mail...Reading symbols from 
/usr/lib/debug/.build-id/27/8239e9ab527ec872a29337b01bb283253cfebe.debug...done.
| done.
| (gdb) run
| Starting program: /usr/bin/mail 
| [Thread debugging using libthread_db enabled]
| Using host libthread_db library "/lib/i386-linux-gnu/libthread_db.so.1".
| Mail version 8.1.2 01/15/2001.  Type ? for help.
| "/var/mail/sven": 1 message 1 new
| 
| Program received signal SIGSEGV, Segmentation fault.
| __strlen_sse2_bsf () at ../sysdeps/i386/i686/multiarch/strlen-sse2-bsf.S:50
| 50../sysdeps/i386/i686/multiarch/strlen-sse2-bsf.S: Datei oder 
Verzeichnis nicht gefunden.
| (gdb) bt full
| #0  __strlen_sse2_bsf () at 
../sysdeps/i386/i686/multiarch/strlen-sse2-bsf.S:50
| No locals.
| #1  0xf7f9bae9 in istrsenvisxl (mbdstp=mbdstp@entry=0x3080, 
dlen=dlen@entry=0x3084, 
| mbsrc=mbsrc@entry=0x2000 , 
flags=96, mbextra=0xf7f9d9be "", 
| cerr_ptr=0x0) at vis.c:583
| No locals.
| #2  0xf7f9be2c in strnvis (mbdst=, dlen=, 
| mbsrc=0x2000 , flags=96) 
at vis.c:707
| No locals.
| #3  0x56558ea8 in printhead (mesg=1) at cmd1.c:229
| mp = 0x5657a1c0
| headline = "From root@localhost.localdomain  Tue May 22 08:25:32 
2018", '\000' 
| subjline = 0x5657cdd8 "Anacron job 'cron.daily' on turtle"
| dispc = 
| visname = '\000' , 
"\300-WV\300-WV\030Q\377\377\202\364UV\035\242\377\377\030Q\377\377", '\000' 
, 
"\034Q\377\377\035\242\377\377\000\000\000\000\000\000\000\000\220q\377\377root@localhost.localdomain",
 '\000' ...
| vissub = '\000' , 
"\v{X\000\000\000\000\000\000\000\000\351\363UV\300-WV\374\241\377\377:\000\000\000\001\000\000\000\213\365UV\374\241\377\377Pq\377\377\\q\377\377\000\000\000\000\\q\377\377\000\000\000\000wq\377\377root@localhost.localdoma"...
| pbuf = "root@localhost.localdomain\000Tue May 22 08:25:32 
2018\000@\240WV\006\000\000\000\300\241WV\000\000\000\000\240\241WV\024\000\000\000K/\341\367\300-WV@\240WV\006\000\000\000\300\241WV\302\065VV@\240WV\024\000\000\000\024\000\000\000*\342UV\247\065VV\300-WV\024\000\000\000\225\342UV@\240WV\300\241WV\024\000\000\000\300-WV\000\000\000\000\001\000\000\000LRWV@nWV\350\221\377\377\024\000\000\000\211\341UV\300-WV\000\000\000\000\001\000\000\000\001\000\000\000\034\350UV@\240WV"...
| fmtline = '\000' , 
"e\035\342\367H\036\342\367W\027\342\367L\261\377\377\254\262\377\377\205\062\342\367L\261\377\377\254\262\377\377\253\302\377\377\000\v{X\354\261\377\377L\261\377\377[h\337\367\000\060\370\367\354\261\377\377L\261\377\377\224\262\377\377-=\353\367L\261\377\377^\202VV\224\262\377\377\254\262\377\377\000\000\000\000^\202VV\377\017\000\000\254\262\377\377",
 '\000' , 
"\001\200\255\373\254\262\377\377\254\262\377\377\254\262\377\377\254\262\377\377\276\262\377\377\253\302\377\377\254\262\377\377\253\302\377\377\200=\370\367"...
| fmt = 
| hl = {l_from = 0x90ac "root@localhost.localdomain", l_tty = 0x0, 
|   l_date = 0x90c7 "Tue May 22 08:25:32 2018"}
| name = 0x5657a720 "root@localhost.localdomain"
| to = 0x5657cdfc "root@localhost.localdomain"
| from = 0x5657a720 "root@localhost.localdomain"
| np = 
| ap = 
| #4  0x565590a3 in headers (v=0xd2c4) at cmd1.c:88
| msgvec = 0xd2c4
| n = 
| mesg = 1
| flag = 1
| size = 60
| mp = 0x5657a1c0
| act = {__sigaction_handler = {sa_handler = 0x56558ba0 , 
sa_sigaction = 0x56558ba0 }, sa_mask = {
| __val = {0 }}, sa_flags = 268435456, 
sa_restorer = 0xf7e20b00 }
| oact = {__sigaction_handler = {sa_handler = 0x0, sa_sigaction = 0x0}, 
sa_mask = {__val = {0, 0, 3, 4158230517, 
|   4160623906, 4294955568, 4294955232, 4294955092, 4158502609, 
4160737344, 1, 268435456, 1448506508, 
|   1448507604, 0, 0, 0, 0, 0, 1448506489, 1448553920, 4294955716, 
0, 1448507604, 1448506620, 1448507604, 0, 0, 
|   0, 0, 0, 1448506601}}, sa_flags = 0, sa_restorer = 0x0}
| oset = {__val = {2, 0, 199, 294, 4, 0, 1990304, 60, 5, 0, 
1990368, 4160239576, 176, 0, 0, 4160239576, 16, 10, 
| 1448579088, 32768, 32768, 4158418805, 4159255269, 40, 0, 
4158787097, 0, 1448582144, 8, 4160237568, 
| 4158783371, 1448594868}}
| #5  0x56560ca6 in announce () at lex.c:621
| vec = {1, 0}
| mdot = 
| #6  0x56557631 in main (argc=, argv=) at 
main.c:303
| i = 
| to = 
| cc = 
| bcc = 
| smopts = 0x0
| fromaddr = 
| subject = 
| replyto = 0x0
| header = 
| ef = 
| cmd = 
| nosrc = 
| rc = 
| (gdb)