Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cyrus https signaled to death by Windows webdav #2198

Open
willrcwc opened this issue Nov 11, 2017 · 13 comments
Open

cyrus https signaled to death by Windows webdav #2198

willrcwc opened this issue Nov 11, 2017 · 13 comments

Comments

@willrcwc
Copy link

When I attempt to access webdav storage using a Windows client the http process on the server crashes. No core dump is generated. Tested with Windows 7 SP1 32bit and Windows 10 1703 with the same result. The webdav storage can be successfully mounted and used by a MacOS 10.12 client. SSL cert self-signed and added to the clients machine account Trusted Root Certificates store.

Mount command and error on Windows 7 (note this is identical on Windows 10):

C:\Users\wtr30>net use * https://spice.prv.citywest.com/dav/drive/user/wtr30/
System error 59 has occurred.

An unexpected network error occurred.

cyrus log:

Nov 11 13:02:10 spice https[8912]: inittls: Loading hard-coded DH parameters
Nov 11 13:02:10 spice https[8912]: starttls failed: ex-wrk-50.prv.citywest.com [10.184.22.172]
Nov 11 13:02:10 spice https[8913]: inittls: Loading hard-coded DH parameters
Nov 11 13:02:10 spice https[8913]: starttls failed: ex-wrk-50.prv.citywest.com [10.184.22.172]
Nov 11 13:02:10 spice https[8914]: inittls: Loading hard-coded DH parameters
Nov 11 13:02:10 spice https[8914]: starttls: TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits new) no authentication
Nov 11 13:02:10 spice master[8892]: process type:SERVICE name:https path:/usr/lib/cyrus-imapd/httpd age:0.122s pid:8914 signaled to death by signal 8 (Floating point exception)

Followed the procedure on the cyrus wiki to enable core dumps but no core dump is generated.

cyrus 3.0.4 on CentOS 7 compiled with:
./configure --enable-idled --enable-sieve --enable-http --enable-calalarmd --prefix=/usr/local --libexecdir=/usr/lib/cyrus-imapd --sbindir=/usr/lib/cyrus-imapd

imapd.conf:

configdirectory: /var/lib/imap
partition-default: /var/spool/imap
admins: cyrus
sieve_admins: cyrus
sievedir: /var/lib/imap/sieve
sendmail: /usr/sbin/sendmail
hashimapspool: true
sasl_pwcheck_method: saslauthd
allowplaintext: 1
sasl_mech_list: PLAIN LOGIN BASIC DIGEST-MD5
unixhierarchysep: yes
altnamespace: yes
allowusermoves: 1
tls_server_cert: /etc/pki/cyrus-imapd/selfsigned.pem
tls_server_key: /etc/pki/cyrus-imapd/key.pem
tls_client_ca_file: /etc/pki/tls/certs/ca-bundle.crt
idlesocket: /var/lib/imap/socket/idle
httpmodules: caldav carddav webdav
caldav_create_default: 1
caldav_create_attach: 1
caldav_create_sched: 1

cyrus.conf:

START {
recover cmd="ctl_cyrusdb -r"
}

SERVICES {
imap cmd="imapd" listen="imap" prefork=0
sieve cmd="timsieved" listen="sieve" prefork=0
lmtpunix cmd="lmtpd" listen="/var/lib/imap/socket/lmtp" prefork=1
http cmd="httpd" listen="10.184.23.233:http" prefork=0
https cmd="httpd -s" listen="10.184.23.233:https" prefork=0
}

EVENTS {
checkpoint cmd="ctl_cyrusdb -c" period=30
delprune cmd="cyr_expire -E 3" at=0400
deleteprune cmd="cyr_expire -E 4 -D 28" at=0430
expungeprune cmd="cyr_expire -E 4 -X 28" at=0445
tlsprune cmd="tls_prune" at=0400
squatter cmd="/usr/lib/cyrus-imapd/squatter -i -r user" period=600
}

DAEMON {
idled cmd="idled"
}

@rsto
Copy link
Member

rsto commented Nov 11, 2017

Thanks for the detailed issue report. There were a couple of fixes on master the last weeks around XML namespace handling.

Would it be possible for you to either test if the problem persists also on the master branch, or alternatively provide me with a the request body of the request that causes the crash?

If the issue doesn't occur on master, I'll see to cherry-pick the fixes on the 3.0 branch.

@willrcwc
Copy link
Author

willrcwc commented Nov 13, 2017

I've just compiled the master branch and tested the webdav mount and get the same result.

I disabled https on the server, modified the registry on the Windows client to allow BASIC authentication over non-ssl http, and used tcpdump to collect a packet trace. The cyrus log corresponding to the below trace was the same as before but no SSL info (as expected as not using SSL):

Nov 13 10:13:02 spice master[2999]: process type:SERVICE name:http path:/usr/lib/cyrus-imapd/httpd age:0.024s pid:3019 signaled to death by signal 8 (Floating point exception)

Full trace packet trace, host running cyrus 10.184.23.233, client running Windows 10 1703 64bit 10.184.22.132:

No.     Time           Source                Destination           Protocol Length Info
      1 0.000000       10.184.22.132         10.184.23.233         TCP      66     49841→80 [SYN] Seq=0 Win=64240 Len=0 MSS=1460 WS=256 SACK_PERM=1

Frame 1: 66 bytes on wire (528 bits), 66 bytes captured (528 bits)
Ethernet II, Src: d4:81:d7:aa:5c:d7 (d4:81:d7:aa:5c:d7), Dst: Vmware_a2:61:3c (00:50:56:a2:61:3c)
Internet Protocol Version 4, Src: 10.184.22.132, Dst: 10.184.23.233
Transmission Control Protocol, Src Port: 49841, Dst Port: 80, Seq: 0, Len: 0

No.     Time           Source                Destination           Protocol Length Info
      2 0.000064       10.184.23.233         10.184.22.132         TCP      66     80→49841 [SYN, ACK] Seq=0 Ack=1 Win=29200 Len=0 MSS=1460 SACK_PERM=1 WS=128

Frame 2: 66 bytes on wire (528 bits), 66 bytes captured (528 bits)
Ethernet II, Src: Vmware_a2:61:3c (00:50:56:a2:61:3c), Dst: d4:81:d7:aa:5c:d7 (d4:81:d7:aa:5c:d7)
Internet Protocol Version 4, Src: 10.184.23.233, Dst: 10.184.22.132
Transmission Control Protocol, Src Port: 80, Dst Port: 49841, Seq: 0, Ack: 1, Len: 0

No.     Time           Source                Destination           Protocol Length Info
      3 0.000387       10.184.22.132         10.184.23.233         TCP      60     49841→80 [ACK] Seq=1 Ack=1 Win=525568 Len=0

Frame 3: 60 bytes on wire (480 bits), 60 bytes captured (480 bits)
Ethernet II, Src: d4:81:d7:aa:5c:d7 (d4:81:d7:aa:5c:d7), Dst: Vmware_a2:61:3c (00:50:56:a2:61:3c)
Internet Protocol Version 4, Src: 10.184.22.132, Dst: 10.184.23.233
Transmission Control Protocol, Src Port: 49841, Dst Port: 80, Seq: 1, Ack: 1, Len: 0

No.     Time           Source                Destination           Protocol Length Info
      4 0.000481       10.184.22.132         10.184.23.233         HTTP     188    OPTIONS / HTTP/1.1 

Frame 4: 188 bytes on wire (1504 bits), 188 bytes captured (1504 bits)
Ethernet II, Src: d4:81:d7:aa:5c:d7 (d4:81:d7:aa:5c:d7), Dst: Vmware_a2:61:3c (00:50:56:a2:61:3c)
Internet Protocol Version 4, Src: 10.184.22.132, Dst: 10.184.23.233
Transmission Control Protocol, Src Port: 49841, Dst Port: 80, Seq: 1, Ack: 1, Len: 134
Hypertext Transfer Protocol
    OPTIONS / HTTP/1.1\r\n
        [Expert Info (Chat/Sequence): OPTIONS / HTTP/1.1\r\n]
            [OPTIONS / HTTP/1.1\r\n]
            [Severity level: Chat]
            [Group: Sequence]
        Request Method: OPTIONS
        Request URI: /
        Request Version: HTTP/1.1
    Connection: Keep-Alive\r\n
    User-Agent: DavClnt\r\n
    translate: f\r\n
    Host: spice.prv.exeter.mercedes-benzsouthwest.co.uk\r\n
    \r\n
    [Full request URI: http://spice.prv.exeter.mercedes-benzsouthwest.co.uk/]
    [HTTP request 1/1]

No.     Time           Source                Destination           Protocol Length Info
      5 0.000497       10.184.23.233         10.184.22.132         TCP      54     80→49841 [ACK] Seq=1 Ack=135 Win=30336 Len=0

Frame 5: 54 bytes on wire (432 bits), 54 bytes captured (432 bits)
Ethernet II, Src: Vmware_a2:61:3c (00:50:56:a2:61:3c), Dst: d4:81:d7:aa:5c:d7 (d4:81:d7:aa:5c:d7)
Internet Protocol Version 4, Src: 10.184.23.233, Dst: 10.184.22.132
Transmission Control Protocol, Src Port: 80, Dst Port: 49841, Seq: 1, Ack: 135, Len: 0

No.     Time           Source                Destination           Protocol Length Info
      6 0.025003       10.184.23.233         10.184.22.132         TCP      54     80→49841 [FIN, ACK] Seq=1 Ack=135 Win=30336 Len=0

Frame 6: 54 bytes on wire (432 bits), 54 bytes captured (432 bits)
Ethernet II, Src: Vmware_a2:61:3c (00:50:56:a2:61:3c), Dst: d4:81:d7:aa:5c:d7 (d4:81:d7:aa:5c:d7)
Internet Protocol Version 4, Src: 10.184.23.233, Dst: 10.184.22.132
Transmission Control Protocol, Src Port: 80, Dst Port: 49841, Seq: 1, Ack: 135, Len: 0

No.     Time           Source                Destination           Protocol Length Info
      7 0.025424       10.184.22.132         10.184.23.233         TCP      60     49841→80 [ACK] Seq=135 Ack=2 Win=525568 Len=0

Frame 7: 60 bytes on wire (480 bits), 60 bytes captured (480 bits)
Ethernet II, Src: d4:81:d7:aa:5c:d7 (d4:81:d7:aa:5c:d7), Dst: Vmware_a2:61:3c (00:50:56:a2:61:3c)
Internet Protocol Version 4, Src: 10.184.22.132, Dst: 10.184.23.233
Transmission Control Protocol, Src Port: 49841, Dst Port: 80, Seq: 135, Ack: 2, Len: 0

No.     Time           Source                Destination           Protocol Length Info
      8 0.025450       10.184.22.132         10.184.23.233         TCP      60     49841→80 [FIN, ACK] Seq=135 Ack=2 Win=525568 Len=0

Frame 8: 60 bytes on wire (480 bits), 60 bytes captured (480 bits)
Ethernet II, Src: d4:81:d7:aa:5c:d7 (d4:81:d7:aa:5c:d7), Dst: Vmware_a2:61:3c (00:50:56:a2:61:3c)
Internet Protocol Version 4, Src: 10.184.22.132, Dst: 10.184.23.233
Transmission Control Protocol, Src Port: 49841, Dst Port: 80, Seq: 135, Ack: 2, Len: 0

No.     Time           Source                Destination           Protocol Length Info
      9 0.025462       10.184.23.233         10.184.22.132         TCP      54     80→49841 [ACK] Seq=2 Ack=136 Win=30336 Len=0

Frame 9: 54 bytes on wire (432 bits), 54 bytes captured (432 bits)
Ethernet II, Src: Vmware_a2:61:3c (00:50:56:a2:61:3c), Dst: d4:81:d7:aa:5c:d7 (d4:81:d7:aa:5c:d7)
Internet Protocol Version 4, Src: 10.184.23.233, Dst: 10.184.22.132
Transmission Control Protocol, Src Port: 80, Dst Port: 49841, Seq: 2, Ack: 136, Len: 0

@ksmurchison
Copy link
Contributor

We will need a core dump in order to see what is happening.
You need to make sure that whatever directory you start cyrus master from is writable by the 'cyrus' user in order to receive core dumps. You may also need to allow core dumps of any size prior to starting cyrus:
ulimit -c unlimited

@elliefm
Copy link
Contributor

elliefm commented Jan 9, 2018

signal 8 (Floating point exception)

What do we use floating point for in httpd/dav, is there a lot of it?

@willrcwc
Copy link
Author

willrcwc commented Jan 9, 2018

@ksmurchison Thanks for those pointers. After running ulimit -c unlimited and launching /usr/lib/cyrus-imapd/master -d from /usr/lib/imap (owned by cyrus) a core dump was generated (see core.zip at the bottom of this post).

The log file that went with this (from launching master to the termination) was:

Jan 9 10:10:27 spice ctl_cyrusdb[11169]: skiplist: clean shutdown file missing, updating recovery stamp
Jan 9 10:10:27 spice ctl_cyrusdb[11169]: recovering cyrus databases
Jan 9 10:10:27 spice ctl_cyrusdb[11169]: done recovering cyrus databases
Jan 9 10:10:27 spice master[11168]: process type:EVENT name:squatter path:/usr/lib/cyrus-imapd/squatter age:0.051s pid:11170 exited, status 75
Jan 9 10:10:27 spice ctl_cyrusdb[11171]: checkpointing cyrus databases
Jan 9 10:10:27 spice ctl_cyrusdb[11171]: done checkpointing cyrus databases
Jan 9 10:10:33 spice https[11175]: inittls: Loading hard-coded DH parameters
Jan 9 10:10:33 spice https[11175]: starttls failed: ex-wrk-50.prv.exeter.mercedes-benzsouthwest.co.uk [10.184.22.166]
Jan 9 10:10:33 spice https[11176]: inittls: Loading hard-coded DH parameters
Jan 9 10:10:33 spice https[11176]: starttls failed: ex-wrk-50.prv.exeter.mercedes-benzsouthwest.co.uk [10.184.22.166]
Jan 9 10:10:33 spice https[11177]: inittls: Loading hard-coded DH parameters
Jan 9 10:10:33 spice https[11177]: starttls: TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits new) no authentication
Jan 9 10:10:33 spice master[11168]: process type:SERVICE name:https path:/usr/lib/cyrus-imapd/httpd age:0.140s pid:11177 signaled to death by signal 8 (Floating point exception, core dumped)

The command used to map the drive (from a Windows 7 Pro 32bit workstation) was:

C:\Users\wtr30>net use * https://spice.prv.exeter.mercedes-benzsouthwest.co.uk/dav/drive/user/wtr30/
System error 59 has occurred.

An unexpected network error occurred.

core.zip

@ksmurchison
Copy link
Contributor

@elliefm OTH, floats are only used in the quality values in some HTTP headers (e.g. Accept)

@willrcwc The core file is really only useful when examined against your compiled httpd.
Can you get a backtrace from this core?

gdb

(gdb) bt
(gdb) quit

@willrcwc
Copy link
Author

willrcwc commented Jan 9, 2018

@ksmurchison As requested:

Reading symbols from /usr/lib/cyrus-imapd/httpd...done.
[New LWP 11177]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Core was generated by `httpd -s'.
Program terminated with signal 8, Arithmetic exception.
#0  digestmd5_server_mech_step1 (stext=0x14de170, sparams=0x13a6270,
    serverout=0x7ffd8118c488, serveroutlen=0x7ffd8118c484,
    oparams=<optimized out>, clientinlen=<optimized out>,
    clientin=<optimized out>) at digestmd5.c:2119
2119            unsigned val = hash((char *) nonce) % text->reauth->size;
(gdb) bt
#0  digestmd5_server_mech_step1 (stext=0x14de170, sparams=0x13a6270,
    serverout=0x7ffd8118c488, serveroutlen=0x7ffd8118c484,
    oparams=<optimized out>, clientinlen=<optimized out>,
    clientin=<optimized out>) at digestmd5.c:2119
#1  0x00007f536581bb9b in sasl_server_step (conn=0x13a5060,
    clientin=<optimized out>, clientinlen=<optimized out>,
    serverout=0x7ffd8118c488, serveroutlen=<optimized out>) at server.c:1618
#2  0x00007f536581c0aa in sasl_server_start (conn=<optimized out>,
    mech=<optimized out>, clientin=clientin@entry=0x0, clientinlen=0,
    serverout=serverout@entry=0x7ffd8118c488,
    serveroutlen=serveroutlen@entry=0x7ffd8118c484) at server.c:1547
#3  0x0000000000455d25 in http_auth (creds=0x470085 "Digest",
    txn=txn@entry=0x7ffd8118c700) at imap/httpd.c:4286
#4  0x0000000000456fdd in list_auth_schemes (txn=txn@entry=0x7ffd8118c700)
    at imap/httpd.c:2842
#5  0x0000000000458753 in response_header (code=code@entry=-1964266986,
    txn=txn@entry=0x7ffd8118c700) at imap/httpd.c:3057
#6  0x0000000000458d1d in write_body (code=-1964266986, txn=0x7ffd8118c700,
    buf=0x14dd080 "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\"><html><head><title>401 Unauthorized</title></head><body><h1>Unauthorized</h1><p>Must authenticate "...,
    len=<optimized out>) at imap/httpd.c:3638
#7  0x000000000045a377 in cmdloop (conn=conn@entry=0x7ffd8118f900)
    at imap/httpd.c:2447
#8  0x000000000045b9b7 in service_main (argc=<optimized out>,
    argv=<optimized out>, envp=envp@entry=0x7ffd81191450) at imap/httpd.c:1535
#9  0x0000000000412ddd in main (argc=<optimized out>, argv=<optimized out>,
    envp=0x7ffd81191450) at master/service.c:634
(gdb) quit

@ksmurchison
Copy link
Contributor

OK. The bug isn't in the DAV code, its in the SASL DIGEST-MD5 plugin. I've found that HTTP Digest auth isn't very interoperable between different implementations. It may or may not work with Windows. I regret that I even tried to implement it in Cyrus. I would either disable the DIGEST-MD5 plugin, or try setting sasl_reauth_timeout: 1 in imapd.conf

@willrcwc
Copy link
Author

willrcwc commented Jan 9, 2018

@ksmurchison sasl_reauth_timeout: 1 causes Windows to prompt for a username and password (when it didn't before) but it still fails to authenticate. No crashing though.

Windows command prompt:

C:\Users\wtr30>net use * https://spice.prv.exeter.mercedes-benzsouthwest.co.uk/d
av/drive/user/wtr30/
Enter the user name for 'spice.prv.exeter.mercedes-benzsouthwest.co.uk': wtr30
Enter the password for spice.prv.exeter.mercedes-benzsouthwest.co.uk:
System error 59 has occurred.

An unexpected network error occurred.

cyrus log:

Jan  9 16:17:31 spice https[11635]: inittls: Loading hard-coded DH parameters
Jan  9 16:17:31 spice https[11635]: starttls failed: ex-wrk-50.prv.exeter.mercedes-benzsouthwest.co.uk [10.184.22.166]
Jan  9 16:17:31 spice https[11636]: inittls: Loading hard-coded DH parameters
Jan  9 16:17:31 spice https[11636]: starttls failed: ex-wrk-50.prv.exeter.mercedes-benzsouthwest.co.uk [10.184.22.166]
Jan  9 16:17:31 spice https[11637]: inittls: Loading hard-coded DH parameters
Jan  9 16:17:31 spice https[11637]: starttls: TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits new) no authentication
Jan  9 16:17:31 spice https[11637]: ex-wrk-50.prv.exeter.mercedes-benzsouthwest.co.uk [10.184.22.166] with "Microsoft-WebDAV-MiniRedir/6.1.7601"; "OPTIONS /dav/drive/user/wtr30 HTTP/1.1" => "HTTP/1.1 401 Unauthorized" (error=Must authenticate to access the specified target)
Jan  9 16:17:31 spice https[11637]: Connection reset by peer, closing connection
Jan  9 16:17:31 spice https[11637]: ex-wrk-50.prv.exeter.mercedes-benzsouthwest.co.uk [10.184.22.166]; "" => "HTTP/1.1 408 Request Timeout" (error=Connection reset by peer)
Jan  9 16:17:31 spice http[11638]: ex-wrk-50.prv.exeter.mercedes-benzsouthwest.co.uk [10.184.22.166] with "Microsoft-WebDAV-MiniRedir/6.1.7601"; "OPTIONS / HTTP/1.1" => "HTTP/1.1 200 OK"
Jan  9 16:17:31 spice http[11638]: ex-wrk-50.prv.exeter.mercedes-benzsouthwest.co.uk [10.184.22.166] with "Microsoft-WebDAV-MiniRedir/6.1.7601"; "PROPFIND /dav/drive/user/wtr30 HTTP/1.1" => "HTTP/1.1 401 Unauthorized" (error=Must authenticate to access the specified target)
Jan  9 16:17:38 spice https[11637]: starttls failed: ex-wrk-50.prv.exeter.mercedes-benzsouthwest.co.uk [10.184.22.166]
Jan  9 16:17:38 spice https[11639]: inittls: Loading hard-coded DH parameters
Jan  9 16:17:38 spice https[11639]: starttls: TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits new) no authentication
Jan  9 16:17:38 spice https[11639]: ex-wrk-50.prv.exeter.mercedes-benzsouthwest.co.uk [10.184.22.166] with "Microsoft-WebDAV-MiniRedir/6.1.7601"; "OPTIONS /dav/drive/user/wtr30 HTTP/1.1" => "HTTP/1.1 401 Unauthorized" (error=Must authenticate to access the specified target)
Jan  9 16:17:38 spice https[11639]: SASL failed: generic failure
Jan  9 16:17:38 spice https[11639]: ex-wrk-50.prv.exeter.mercedes-benzsouthwest.co.uk [10.184.22.166] with "Microsoft-WebDAV-MiniRedir/6.1.7601"; "OPTIONS /dav/drive/user/wtr30 HTTP/1.1" => "HTTP/1.1 500 Internal Server Error" (error=The server encountered an internal error.)
Jan  9 16:17:38 spice https[11639]: Connection reset by peer, closing connection
Jan  9 16:17:38 spice https[11639]: ex-wrk-50.prv.exeter.mercedes-benzsouthwest.co.uk [10.184.22.166]; "" => "HTTP/1.1 408 Request Timeout" (error=Connection reset by peer)

Based on your last comment should I assume we will consider the internal Windows 7 client 'badly behaved' and not try and hack cyrus to account for it?

@ksmurchison
Copy link
Contributor

The client WILL have to authenticate. It would probably be worth disabling Digest all together and just use Basic. The easiest way to do this without effecting other Cyrus services is to set a service-specific sasl_mech_list for your Cyrus HTTP services. For instance, if you have a service named 'https' in cyrus.conf, add the following to imapd.conf:

https_sasl_mech_list: PLAIN

@willrcwc
Copy link
Author

willrcwc commented Jan 10, 2018

Now running with:

https_sasl_mech_list: PLAIN

When attempting to connect to the dav drive using the Windows Network Location Wizard I get the following core dump:

Core was generated by `httpd -s'.
Program terminated with signal 11, Segmentation fault.
#0  __strlen_sse2_pminub ()
    at ../sysdeps/x86_64/multiarch/strlen-sse2-pminub.S:38
38              movdqu  (%rdi), %xmm1
(gdb) bt
#0  __strlen_sse2_pminub ()
    at ../sysdeps/x86_64/multiarch/strlen-sse2-pminub.S:38
#1  0x00007fb31c69c414 in buf_setcstr (buf=0x7ffdfb6b3a78,
    str=0x1 <Address 0x1 out of bounds>) at lib/util.c:1054
#2  0x000000000043a758 in propfind_collectionname (name=<optimized out>,
    ns=0xaa3530, fctx=0x7ffdfb6b38f0, prop=<optimized out>,
    resp=<optimized out>, propstat=<optimized out>, rock=0x0)
    at imap/http_dav.c:1745
#3  0x0000000000438f7f in xml_add_response (fctx=fctx@entry=0x7ffdfb6b38f0,
    code=code@entry=0, precond=precond@entry=0, desc=desc@entry=0x0,
    location=location@entry=0x0) at imap/http_dav.c:1496
#4  0x000000000043cd7a in meth_propfind (txn=0x7ffdfb6b4d60,
    params=0x682e80 <webdav_params>) at imap/http_dav.c:5992
#5  0x000000000045b1a2 in http1_input (txn=<optimized out>)
    at imap/httpd.c:2306
#6  cmdloop (conn=conn@entry=0x7ffdfb6b7f60) at imap/httpd.c:2444
#7  0x000000000045b9b7 in service_main (argc=<optimized out>,
    argv=<optimized out>, envp=envp@entry=0x7ffdfb6b9ab0) at imap/httpd.c:1535
#8  0x0000000000412ddd in main (argc=<optimized out>, argv=<optimized out>,
    envp=0x7ffdfb6b9ab0) at master/service.c:634
(gdb)

cyrus log was:

Jan 10 09:01:27 spice https[12608]: inittls: Loading hard-coded DH parameters
Jan 10 09:01:27 spice https[12608]: starttls: TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits new) no authentication
Jan 10 09:01:27 spice https[12608]: ex-wrk-50.prv.exeter.mercedes-benzsouthwest.co.uk [10.184.22.166] with "Microsoft-WebDAV-MiniRedir/6.1.7601"; "PROPFIND /dav/drive/user/wtr30 HTTP/1.1" (depth=0) => "HTTP/1.1 401 Unauthorized" (error=Must authenticate to access the specified target)
Jan 10 09:01:27 spice https[12608]: login: ex-wrk-50.prv.exeter.mercedes-benzsouthwest.co.uk [10.184.22.166] wtr30 Basic+TLS User logged in SESSIONID=<spice-12608-1515574887-1-17138040615646270390>
Jan 10 09:01:27 spice https[12608]: ex-wrk-50.prv.exeter.mercedes-benzsouthwest.co.uk [10.184.22.166] as "wtr30" with "Microsoft-WebDAV-MiniRedir/6.1.7601"; "PROPFIND /dav/drive/user/wtr30 HTTP/1.1" (depth=0) => "HTTP/1.1 207 Multi-Status"
Jan 10 09:01:27 spice https[12608]: login: ex-wrk-50.prv.exeter.mercedes-benzsouthwest.co.uk [10.184.22.166] wtr30 Basic+TLS User logged in SESSIONID=<spice-12608-1515574887-1-17138040615646270390>
Jan 10 09:01:27 spice https[12608]: ex-wrk-50.prv.exeter.mercedes-benzsouthwest.co.uk [10.184.22.166] as "wtr30" with "Microsoft-WebDAV-MiniRedir/6.1.7601"; "PROPFIND /dav/drive/user/wtr30 HTTP/1.1" (depth=0) => "HTTP/1.1 207 Multi-Status"
Jan 10 09:01:28 spice https[12608]: login: ex-wrk-50.prv.exeter.mercedes-benzsouthwest.co.uk [10.184.22.166] wtr30 Basic+TLS User logged in SESSIONID=<spice-12608-1515574887-1-17138040615646270390>
Jan 10 09:01:28 spice https[12608]: ex-wrk-50.prv.exeter.mercedes-benzsouthwest.co.uk [10.184.22.166] as "wtr30" with "Microsoft-WebDAV-MiniRedir/6.1.7601"; "PROPFIND /dav/drive/user HTTP/1.1" (depth=0) => "HTTP/1.1 207 Multi-Status"
Jan 10 09:01:28 spice master[12594]: process type:SERVICE name:https path:/usr/lib/cyrus-imapd/httpd age:0.246s pid:12608 signaled to death by signal 11 (Segmentation fault, core dumped)

@willrcwc
Copy link
Author

@ksmurchison Another core dump after a segfault, this time trying Webdrive a recommended third-party webdav client instead of the Windows 7 webdav-mini-redirector.

Core was generated by `httpd -s'.
Program terminated with signal 11, Segmentation fault.
#0  __strlen_sse2_pminub () at ../sysdeps/x86_64/multiarch/strlen-sse2-pminub.S:38
38              movdqu  (%rdi), %xmm1
(gdb) bt
#0  __strlen_sse2_pminub () at ../sysdeps/x86_64/multiarch/strlen-sse2-pminub.S:38
#1  0x0000000000441cce in dav_store_resource (txn=txn@entry=0x7fffc62d9db0, data=0x0, datalen=datalen@entry=0, mailbox=mailbox@entry=0x1f6d4e8, oldrecord=oldrecord@entry=0x0,
    imapflags=imapflags@entry=0x0) at imap/http_dav.c:8581
#2  0x0000000000453ea5 in webdav_put (txn=0x7fffc62d9db0, obj=0x7fffc62dcdd8, mailbox=0x1f6d4e8, resource=<optimized out>, destdb=<optimized out>, flags=<optimized out>)
    at imap/http_webdav.c:675
#3  0x0000000000440930 in meth_put (txn=0x7fffc62d9db0, params=0x682e80 <webdav_params>) at imap/http_dav.c:7255
#4  0x000000000045b1a2 in http1_input (txn=<optimized out>) at imap/httpd.c:2306
#5  cmdloop (conn=conn@entry=0x7fffc62dcfb0) at imap/httpd.c:2444
#6  0x000000000045b9b7 in service_main (argc=<optimized out>, argv=<optimized out>, envp=envp@entry=0x7fffc62deb00) at imap/httpd.c:1535
#7  0x0000000000412ddd in main (argc=<optimized out>, argv=<optimized out>, envp=0x7fffc62deb00) at master/service.c:634

The cyrus log that led to this was:

Jan 12 20:55:35 spice https[14751]: ex-wrk-50.prv.exeter.mercedes-benzsouthwest.co.uk [10.184.22.166] as "wtr30" with "WebDrive 17.0.4894 DAV"; "MKCOL /dav/drive/user/wtr30/New%20folder HTTP/1.1" => "HTTP/1.1 403 Forbidden"
Jan 12 20:55:35 spice https[14750]: starttls: TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits new) no authentication
Jan 12 20:55:35 spice https[14750]: login: ex-wrk-50.prv.exeter.mercedes-benzsouthwest.co.uk [10.184.22.166] wtr30 Basic+TLS User logged in SESSIONID=<spice-14750-1515790535-2-13655334230427095466>
Jan 12 20:55:35 spice https[14750]: ex-wrk-50.prv.exeter.mercedes-benzsouthwest.co.uk [10.184.22.166] as "wtr30" with "WebDrive 17.0.4894 DAV"; "MKCOL /dav/drive/user/wtr30/New%20folder HTTP/1.1" => "HTTP/1.1 403 Forbidden"
Jan 12 20:55:35 spice https[14748]: starttls: TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits new) no authentication
Jan 12 20:55:35 spice https[14748]: login: ex-wrk-50.prv.exeter.mercedes-benzsouthwest.co.uk [10.184.22.166] wtr30 Basic+TLS User logged in SESSIONID=<spice-14748-1515790535-3-11964295699179006262>
Jan 12 20:55:35 spice https[14748]: ex-wrk-50.prv.exeter.mercedes-benzsouthwest.co.uk [10.184.22.166] as "wtr30" with "WebDrive 17.0.4894 DAV"; "MKCOL /dav/drive/user/wtr30/New%20folder HTTP/1.1" => "HTTP/1.1 403 Forbidden"
Jan 12 20:55:35 spice https[14751]: starttls: TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits new) no authentication
Jan 12 20:55:35 spice https[14751]: login: ex-wrk-50.prv.exeter.mercedes-benzsouthwest.co.uk [10.184.22.166] wtr30 Basic+TLS User logged in SESSIONID=<spice-14751-1515790535-3-15614886188467347065>
Jan 12 20:55:35 spice https[14751]: ex-wrk-50.prv.exeter.mercedes-benzsouthwest.co.uk [10.184.22.166] as "wtr30" with "WebDrive 17.0.4894 DAV"; "MKCOL /dav/drive/user/wtr30/New%20folder HTTP/1.1" => "HTTP/1.1 403 Forbidden"
Jan 12 20:55:35 spice https[14750]: starttls: TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits new) no authentication
Jan 12 20:55:35 spice https[14750]: login: ex-wrk-50.prv.exeter.mercedes-benzsouthwest.co.uk [10.184.22.166] wtr30 Basic+TLS User logged in SESSIONID=<spice-14750-1515790535-4-13177902354079117810>
Jan 12 20:55:35 spice https[14750]: ex-wrk-50.prv.exeter.mercedes-benzsouthwest.co.uk [10.184.22.166] as "wtr30" with "WebDrive 17.0.4894 DAV"; "MKCOL /dav/drive/user/wtr30/New%20folder HTTP/1.1" => "HTTP/1.1 403 Forbidden"
Jan 12 20:55:44 spice https[14748]: starttls: TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits new) no authentication
Jan 12 20:55:44 spice https[14748]: login: ex-wrk-50.prv.exeter.mercedes-benzsouthwest.co.uk [10.184.22.166] wtr30 Basic+TLS User logged in SESSIONID=<spice-14748-1515790544-1-8612137002425297879>
Jan 12 20:55:44 spice master[14725]: process type:SERVICE name:https path:/usr/lib/cyrus-imapd/httpd age:312.567s pid:14748 signaled to death by signal 11 (Segmentation fault, core dumped)

That occured when trying to create a file on the share with 'Enable persistent connections (Keep-Alive)' disabled in the Webdrive connection settings.

With the persistent connections option enabled (the default) files can be created, but directory creation fails with much repitition of:

Jan 12 20:51:34 spice https[14751]: ex-wrk-50.prv.exeter.mercedes-benzsouthwest.co.uk [10.184.22.166] as "wtr30" with "WebDrive 17.0.4894 DAV"; "MKCOL /dav/drive/user/wtr30/unti
tled%20folder/New%20folder HTTP/1.1" => "HTTP/1.1 403 Forbidden"
Jan 12 20:51:34 spice https[14751]: starttls: TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits new) no authentication
Jan 12 20:51:34 spice https[14751]: login: ex-wrk-50.prv.exeter.mercedes-benzsouthwest.co.uk [10.184.22.166] wtr30 Basic+TLS User logged in SESSIONID=<spice-14751-1515790294-8-1
3303084836940724865>
Jan 12 20:51:34 spice https[14751]: ex-wrk-50.prv.exeter.mercedes-benzsouthwest.co.uk [10.184.22.166] as "wtr30" with "WebDrive 17.0.4894 DAV"; "MKCOL /dav/drive/user/wtr30/unti
tled%20folder/New%20folder HTTP/1.1" => "HTTP/1.1 403 Forbidden"
Jan 12 20:51:34 spice https[14751]: starttls: TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits new) no authentication
Jan 12 20:51:34 spice https[14751]: login: ex-wrk-50.prv.exeter.mercedes-benzsouthwest.co.uk [10.184.22.166] wtr30 Basic+TLS User logged in SESSIONID=<spice-14751-1515790294-10-
15066487623414994364>
Jan 12 20:51:34 spice https[14751]: ex-wrk-50.prv.exeter.mercedes-benzsouthwest.co.uk [10.184.22.166] as "wtr30" with "WebDrive 17.0.4894 DAV"; "MKCOL /dav/drive/user/wtr30/unti
tled%20folder/New%20folder HTTP/1.1" => "HTTP/1.1 403 Forbidden"
Jan 12 20:51:34 spice https[14751]: starttls: TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits new) no authentication
Jan 12 20:51:34 spice https[14751]: login: ex-wrk-50.prv.exeter.mercedes-benzsouthwest.co.uk [10.184.22.166] wtr30 Basic+TLS User logged in SESSIONID=<spice-14751-1515790294-12-
7489881743457905751>
Jan 12 20:51:34 spice https[14751]: ex-wrk-50.prv.exeter.mercedes-benzsouthwest.co.uk [10.184.22.166] as "wtr30" with "WebDrive 17.0.4894 DAV"; "MKCOL /dav/drive/user/wtr30/unti
tled%20folder/New%20folder HTTP/1.1" => "HTTP/1.1 403 Forbidden"
Jan 12 20:51:34 spice https[14751]: starttls: TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits new) no authentication
Jan 12 20:51:34 spice https[14751]: login: ex-wrk-50.prv.exeter.mercedes-benzsouthwest.co.uk [10.184.22.166] wtr30 Basic+TLS User logged in SESSIONID=<spice-14751-1515790294-14-
8297629474409738555>
Jan 12 20:51:34 spice https[14751]: ex-wrk-50.prv.exeter.mercedes-benzsouthwest.co.uk [10.184.22.166] as "wtr30" with "WebDrive 17.0.4894 DAV"; "MKCOL /dav/drive/user/wtr30/unti
tled%20folder/New%20folder HTTP/1.1" => "HTTP/1.1 403 Forbidden"
Jan 12 20:51:34 spice https[14751]: starttls: TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits new) no authentication
Jan 12 20:51:34 spice https[14751]: login: ex-wrk-50.prv.exeter.mercedes-benzsouthwest.co.uk [10.184.22.166] wtr30 Basic+TLS User logged in SESSIONID=<spice-14751-1515790294-16-
14421191381846842692>
Jan 12 20:51:34 spice https[14751]: ex-wrk-50.prv.exeter.mercedes-benzsouthwest.co.uk [10.184.22.166] as "wtr30" with "WebDrive 17.0.4894 DAV"; "MKCOL /dav/drive/user/wtr30/unti
tled%20folder/New%20folder HTTP/1.1" => "HTTP/1.1 403 Forbidden"
Jan 12 20:51:34 spice https[14751]: starttls: TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits new) no authentication
Jan 12 20:51:34 spice https[14751]: login: ex-wrk-50.prv.exeter.mercedes-benzsouthwest.co.uk [10.184.22.166] wtr30 Basic+TLS User logged in SESSIONID=<spice-14751-1515790294-18-
5801297314579095447>
Jan 12 20:51:34 spice https[14751]: ex-wrk-50.prv.exeter.mercedes-benzsouthwest.co.uk [10.184.22.166] as "wtr30" with "WebDrive 17.0.4894 DAV"; "MKCOL /dav/drive/user/wtr30/unti
tled%20folder/New%20folder HTTP/1.1" => "HTTP/1.1 403 Forbidden"

@bamthomas
Copy link
Contributor

bamthomas commented Sep 22, 2022

it maybe related, at least it is happening on CalDAV, with thunderbird (one under linux ubuntu 22.04, and another on windows 10 family). I have :

Sep 22 15:02:37 iroco cyrus/master[1366]: process type:SERVICE name:http path:/usr/local/libexec/httpd age:0.029s pid:106163 signaled to death by signal 11 (Segmentation fault) 
Sep 22 15:02:37 iroco kernel: [885066.187527] httpd[106163] segfault at 0 ip 00007fd9c9e1c559 sp 00007ffc08249208 error 4 in libcyrus_min.so.0.0.0[7fd9c9e11000+c000] 
Sep 22 15:02:37 iroco kernel: [885066.187534] Code: 90 49 89 f8 48 89 d1 48 85 d2 74 35 31 c0 48 83 e9 01 48 89 f2 75 13 eb 3f 0f 1f 84 00 00 00 00 00 48 83 c0 01 48 39 c8 74 27 <0f> b6 14 06 41 88 14 00 84 d2 75 eb c3 66 2e 0f 1f 84 00 00 00 00 

With cyrus 3.4.2.

After the segfault, the service is restarted and is responding normally. Then if we repeat the "synchronize calendars" several times it crashes again, and so on.

it is related to #4505

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants