Segfault in https fetching #992
Comments
|
|
I just diffed boringssl and openssl |
Repeating this with revision 063a4b93646788bd883fc0cb1b5eafc991ddacc4 of https://chromium.googlesource.com/chromium/deps/openssl.git which is what we were using in 1.9.23.3, I do see an additional check: if (s->ctx->alpn_client_proto_list) {
s->alpn_client_proto_list = BUF_memdup(s->ctx->alpn_client_proto_list,
s->ctx->alpn_client_proto_list_len);
if (s->alpn_client_proto_list == NULL) {
goto err;
}
s->alpn_client_proto_list_len = s->ctx->alpn_client_proto_list_len;
} I also found a check that I missed before, which was added in boringssl: s->psk_identity_hint = NULL;
if (ctx->psk_identity_hint) {
s->psk_identity_hint = BUF_strdup(ctx->psk_identity_hint);
if (s->psk_identity_hint == NULL) {
goto err;
}
} Neither of these seem like the problem, though, since they're both just verifying that a memory copy succeeded, and unless we're running out of memory this shouldn't be active. Doesn't seem worth continuing in this direction. |
@crowell is going to look through the code to see if I missed something. If not, we'll build a custom PSOL that does check that |
done with the pre-release of 1.9.32.5 from last week, looking at this today |
version of PSOL with some extra debug logging where the crashes would have happened, along with a check for null deref which was causing the crash rebuilding now, built that from the wrong tag 👎 |
whoops, built that from the wrong tag, rebuilding now. |
updated PSOL build here https://github.com/pagespeed/ngx_pagespeed/releases/tag/1.9.32.4-dbg-ssl-crash Please give this a try and report back. Thanks, |
fixed in apache/incubator-pagespeed-mod@7e36d7d I'd still like to get any feedback from the build in the comment above to get extra debugging information. |
Reported on the mailing list:
It looks like we have:
SSL_set_tlsext_host_name.
should be a valid SSL (connection) pointer, and then dereferences it,
hence the segfault.
This means serf_ssl_set_hostname is receiving a serf_ssl_context_t
*context where context->ssl is NULL.
So probably somewhere we're not checking return values properly, and
we're continuing on after a failed call. Candidates? (Most likely
something where BoringSSL tightened up error checking, but I'm not
sure where that is.)
The text was updated successfully, but these errors were encountered: