Upgraded cyrus 2.5.6: lmtpd segfaults

Ken Murchison murch at andrew.cmu.edu
Mon Nov 2 16:47:46 EST 2015


On 11/02/2015 04:42 PM, Stefan G. Weichinger wrote:
> Am 2015-11-02 um 22:38 schrieb Ken Murchison:
>
>> gdb /usr/local/cyrus/lmtpd /tmo/core.XXX  (use proper locations)
>>
>> At the (gdb) prompt run the backtrace command (bt)
>>
>> It should give you info that you can post here.
> tmp # gdb /usr/lib64/cyrus/lmtpd core.32682
>
>
> Using host libthread_db library "/lib64/libthread_db.so.1".
> Core was generated by `lmtpd'.
> Program terminated with signal SIGSEGV, Segmentation fault.
> #0  0x00007ff3212963ab in ?? () from /lib64/libc.so.6
> (gdb) bt
> #0  0x00007ff3212963ab in ?? () from /lib64/libc.so.6
> #1  0x00007ff3212977ec in ?? () from /lib64/libc.so.6
> #2  0x00007ff321299b2e in malloc () from /lib64/libc.so.6
> #3  0x00007ff3212ed1d6 in ?? () from /lib64/libc.so.6
> #4  0x00007ff3212ee5c9 in regcomp () from /lib64/libc.so.6
> #5  0x00007ff3225fd4d5 in bc_compile_regex (s=0x7ff32291b1a8 <error:
> Cannot access memory at address 0x7ff32291b1a8>, ctag=97, ctag at entry=33,
>      errmsg=errmsg at entry=0x7ffe30e97d30 "L\t", errsiz=errsiz at entry=100)
> at sieve/bc_eval.c:131
> #6  0x00007ff3225fe5eb in eval_bc_test (interp=interp at entry=0x1e5ced0,
> m=m at entry=0x7ffe30e9be60, bc=bc at entry=0x7ff32291b000,
> ip=ip at entry=0x7ffe30e97eac,
>      workingflags=<optimized out>, version=version at entry=5) at
> sieve/bc_eval.c:819
> #7  0x00007ff3225ffbc5 in sieve_eval_bc (exe=exe at entry=0x1e75910,
> is_incl=is_incl at entry=0, i=i at entry=0x1e5ced0,
> sc=sc at entry=0x7ffe30e9a120, m=m at entry=0x7ffe30e9be60,
>      flagvars=flagvars at entry=0x7ffe30e99060,
> actions=actions at entry=0x1e78310,
> notify_list=notify_list at entry=0x1e782d0,
> errmsg=errmsg at entry=0x7ffe30e99030,
>      workingvars=workingvars at entry=0x7ffe30e99080) at sieve/bc_eval.c:1584
> #8  0x00007ff322605368 in sieve_execute_bytecode (exe=0x1e75910,
> interp=interp at entry=0x1e5ced0,
> script_context=script_context at entry=0x7ffe30e9a120,
>      message_context=message_context at entry=0x7ffe30e9be60) at
> sieve/script.c:877
> #9  0x0000000000410af1 in run_sieve (user=0x1e63cd0 "spa3mei",
> domain=0x0, mailbox=0x0, interp=0x1e5ced0,
> msgdata=msgdata at entry=0x7ffe30e9be60) at imap/lmtp_sieve.c:904
> #10 0x000000000040916d in deliver (msgdata=0x1e61eb0, authuser=0x0,
> authstate=0x0) at imap/lmtpd.c:903
> #11 0x000000000040bab9 in lmtpmode (func=func at entry=0x616b40 <mylmtp>,
> pin=0x1e5fc90, pout=<optimized out>, fd=fd at entry=0) at
> imap/lmtpengine.c:1270
> #12 0x00000000004075d1 in service_main (argc=1, argv=0x1e59030,
> envp=envp at entry=0x7ffe30e9f578) at imap/lmtpd.c:341
> #13 0x00000000004066df in main (argc=<optimized out>, argv=<optimized
> out>, envp=0x7ffe30e9f578) at master/service.c:622
> (gdb)
>
>
> Does that tell you anything?
> thanks, Stefan

lmtpd is crashing inside of the sieve code.  It looks like its trying to 
compile a regular expression that appears in the recipient's sieve script.

I don't know if this is a bug, a bad sieve script, or if your version of 
Cyrus wasn't compiled with support for the particular regular expression.

If you want to get email delivered, you can simply disable the user's 
sieve script.  You could also try recompiling the script with sievec

-- 
Kenneth Murchison
Principal Systems Software Engineer
Carnegie Mellon University



More information about the Info-cyrus mailing list