imapfilter Segmentation fault

Bug #1619968 reported by j^
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
imapfilter (Ubuntu)
Fix Released
Undecided
Unassigned
Xenial
Incomplete
Undecided
Unassigned
Yakkety
Incomplete
Undecided
Unassigned
Zesty
Fix Released
Undecided
Unassigned

Bug Description

imapfilter with config.lua trying to connect to tls imap server crashes:

Starting program: /usr/bin/imapfilter
[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.
__strcasecmp_l_avx () at ../sysdeps/x86_64/multiarch/strcmp-sse42.S:164
164 ../sysdeps/x86_64/multiarch/strcmp-sse42.S: No such file or directory.
(gdb) bt
#0 __strcasecmp_l_avx () at ../sysdeps/x86_64/multiarch/strcmp-sse42.S:164
#1 0x0000000000410431 in ?? ()
#2 0x0000000000408fe9 in ?? ()
#3 0x0000000000405972 in ?? ()
#4 0x00007ffff7bb08ed in luaD_precall (L=L@entry=0x65bd10, func=<optimized out>, func@entry=0x6c39e0,
    nresults=nresults@entry=2) at ldo.c:319
#5 0x00007ffff7bbc4ed in luaV_execute (L=L@entry=0x65bd10) at lvm.c:709
#6 0x00007ffff7bb0c2e in luaD_call (L=0x65bd10, func=<optimized out>, nResults=<optimized out>, allowyield=<optimized out>)
    at ldo.c:402
#7 0x00007ffff7bb026f in luaD_rawrunprotected (L=L@entry=0x65bd10, f=f@entry=0x7ffff7bab810 <f_call>,
    ud=ud@entry=0x7fffffffe430) at ldo.c:131
#8 0x00007ffff7bb0e71 in luaD_pcall (L=L@entry=0x65bd10, func=func@entry=0x7ffff7bab810 <f_call>, u=u@entry=0x7fffffffe430,
    old_top=32, ef=<optimized out>) at ldo.c:603
#9 0x00007ffff7bacd91 in lua_pcallk (L=0x65bd10, nargs=<optimized out>, nresults=-1, errfunc=<optimized out>,
    ctx=<optimized out>, k=<optimized out>) at lapi.c:949
#10 0x0000000000407318 in ?? ()
#11 0x000000000040623d in ?? ()
#12 0x00007ffff6ec8830 in __libc_start_main (main=0x405fff, argc=1, argv=0x7fffffffe578, init=<optimized out>,
    fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffe568) at ../csu/libc-start.c:291
#13 0x0000000000403449 in ?? ()

Tags: bitesize
Revision history for this message
j^ (j) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in imapfilter (Ubuntu):
status: New → Confirmed
Revision history for this message
Nish Aravamudan (nacc) wrote :

Fixed in 2.6.10, which is in Zesty and Artful.

Changed in imapfilter (Ubuntu Zesty):
status: New → Fix Released
Changed in imapfilter (Ubuntu):
status: Confirmed → Fix Released
Changed in imapfilter (Ubuntu Xenial):
status: New → Triaged
Changed in imapfilter (Ubuntu Yakkety):
status: New → Triaged
tags: added: bitesize
Changed in imapfilter (Ubuntu Xenial):
assignee: nobody → Nish Aravamudan (nacc)
Changed in imapfilter (Ubuntu Yakkety):
assignee: nobody → Nish Aravamudan (nacc)
David Britton (dpb)
Changed in imapfilter (Ubuntu Xenial):
assignee: Nish Aravamudan (nacc) → David Britton (davidpbritton)
status: Triaged → In Progress
Changed in imapfilter (Ubuntu Yakkety):
assignee: Nish Aravamudan (nacc) → David Britton (davidpbritton)
status: Triaged → In Progress
Revision history for this message
David Britton (dpb) wrote :

I've tried to repro with a skeleton config.lua and cannot on an up to date xenial.

If someone has a config.lua that repros this, please attach to the bug with your password stripped and anything else personal that you would rather not show redacted. Thanks!

Changed in imapfilter (Ubuntu Xenial):
status: In Progress → Incomplete
Changed in imapfilter (Ubuntu Yakkety):
status: In Progress → Incomplete
Revision history for this message
David Britton (dpb) wrote :

Also a dpkg -l attached to the bug would be helpful if you can repro on Xenial.

David Britton (dpb)
Changed in imapfilter (Ubuntu Xenial):
assignee: David Britton (davidpbritton) → nobody
Changed in imapfilter (Ubuntu Yakkety):
assignee: David Britton (davidpbritton) → nobody
Revision history for this message
Charly Bazaugour (cbazaugour) wrote :

I am currently recreating this bug on Ubuntu Xenial with a minimal config file :

options.timeout = 120
options.namespace = false
options.subscribe = true
options.charset = 'UTF-8'

cbaz_laposte = IMAP
{
 server = 'imap.laposte.net',
 username = 'cbazaugour'
}

Placing print('a') before and after the IMAP call shows the segfault happens in the IMAP call :

~$ imapfilter -v
a
Enter password for <email address hidden>:
S (3): * OK IMAP4 ready
C (3): 1000 CAPABILITY
S (3): 1000 OK completed
C (3): 1001 STARTTLS
S (3): 1001 OK completed
Erreur de segmentation (core dumped)

After adding the ssl information in my IMAP parameter :

cbaz_laposte = IMAP
{
 server = 'imap.laposte.net',
 username = 'cbazaugour',
 ssl = 'ssl2'
}

the segfault does no longer happen :

~$ imapfilter -v
Enter password for <email address hidden>:
S (3): * OK IMAP4 ready
C (3): 1000 CAPABILITY
S (3): 1000 OK completed
C (3): 1001 LOGIN "cbazaugour" *
S (3): 1001 OK [CAPABILITY IMAP4rev1 ACL BINARY CATENATE CHILDREN CONDSTORE ENABLE ESEARCH ESORT I18NLEVEL=1 ID IDLE LIST-EXTENDED LIST-STATUS LITERAL+ LOGIN-REFERRALS MULTIAPPEND NAMESPACE QRESYNC QUOTA RIGHTS=ektx SASL-IR SEARCHRES SORT THREAD=ORDEREDSUBJECT UIDPLUS UNSELECT WITHIN XLIST] LOGIN completed
C (3): 1002 CAPABILITY
S (3): 1002 OK CAPABILITY completed
C (3): 1003 LOGOUT

I would like to give you more informations to allow you to test this, but this account is my main personnal account. I''' try creating a new account reproducing the segfault.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.