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
Crash with WinSSL #3412
Comments
Verified from the cmd-line using a MSVC-built void Curl_ssl_sessionid_lock(struct connectdata *conn)
{
if(SSLSESSION_SHARED(conn->data))
|
Full call stack:
|
Bisected to fb445a1. |
Thanks. I'll look into it asap... |
I would've expected f3ce387 to have addressed that issue since it brings back the Line 786 in 251cabf
@MarcelRaad can you see what exactly is wrong at vtls/vtls.c:286 ? |
What happens is that Line 793 in ba266b3
Line 802 in ba266b3
According to the comment, the assignment in your snippet is for |
I think it looks like a mistake that The shutdown function needs a 'data' pointer to find the session_id cache (and lock/unlock it). I'm not sure what the best fix for this is now, but it might be to allow the shutdown to just skip the lock/unlock if there's no transfer associated with the connection anymore. Maybe like this: diff --git a/lib/vtls/schannel.c b/lib/vtls/schannel.c
index 56fd93e1e..ef9b068fa 100644
--- a/lib/vtls/schannel.c
+++ b/lib/vtls/schannel.c
@@ -5,11 +5,11 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
* Copyright (C) 2012 - 2016, Marc Hoersken, <info@marc-hoersken.de>
* Copyright (C) 2012, Mark Salisbury, <mark.salisbury@hp.com>
- * Copyright (C) 2012 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 2012 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
* are also available at https://curl.haxx.se/docs/copyright.html.
*
@@ -2011,13 +2011,15 @@ static int Curl_schannel_shutdown(struct connectdata *conn, int sockindex)
Curl_safefree(BACKEND->ctxt);
}
/* free SSPI Schannel API credential handle */
if(BACKEND->cred) {
- Curl_ssl_sessionid_lock(conn);
+ if(conn->data)
+ Curl_ssl_sessionid_lock(conn);
Curl_schannel_session_free(BACKEND->cred);
- Curl_ssl_sessionid_unlock(conn);
+ if(conn->data)
+ Curl_ssl_sessionid_unlock(conn);
BACKEND->cred = NULL;
}
/* free internal buffer for received encrypted data */
if(BACKEND->encdata_buffer != NULL) { |
I'm still seeing something similar, even after 6ee6729. I think we may need to check that Line 264 in 6ee6729
...because Line 235 in 6ee6729
However, it seems like anywhere we might call I don't have a proposed fix, but I think for now I'm just going to try checking for Line 1965 in 6ee6729
|
I did this
See the WinSSL autobuilds since December 23 on https://curl.haxx.se/dev/builds.html:
I expected the following
No segmentation fault
curl/libcurl version
Daily tarball since December 23
operating system
Windows 10, MSYS2 shell, MinGW-w64
I'll try to have a look when I'm back from my holidays tomorrow.
The text was updated successfully, but these errors were encountered: