You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
V version: V 0.1.23 f0f62f6 OS: archlinux What did you do? http.get("https://127.0.0.1") What did you see instead? SIGSEGV
Solution:
on v/vlib/http/backend_nix.v ssl_do()
Dont do the handshake if BIO_do_connect fails.
res = C.BIO_do_connect(web)
if res != 1 {
return error('cannot connect')
}
res = C.BIO_do_handshake(web)
Crash:
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff7ccd680 in ?? () from /usr/lib/libcrypto.so.1.1
(gdb) bt
#0 0x00007ffff7ccd680 in ?? () from /usr/lib/libcrypto.so.1.1 #1 0x00007ffff7cd0ef4 in BIO_connect () from /usr/lib/libcrypto.so.1.1 #2 0x00007ffff7cd63af in ?? () from /usr/lib/libcrypto.so.1.1 #3 0x00007ffff7cd6690 in ?? () from /usr/lib/libcrypto.so.1.1 #4 0x00007ffff7cd450a in ?? () from /usr/lib/libcrypto.so.1.1 #5 0x00007ffff7cd3534 in ?? () from /usr/lib/libcrypto.so.1.1 #6 0x00007ffff7cd3a13 in BIO_write () from /usr/lib/libcrypto.so.1.1 #7 0x00007ffff7cd1d62 in ?? () from /usr/lib/libcrypto.so.1.1 #8 0x00007ffff7cd3ee6 in BIO_ctrl () from /usr/lib/libcrypto.so.1.1 #9 0x00007ffff7f4bd5e in ?? () from /usr/lib/libssl.so.1.1 #10 0x00007ffff7f50800 in ?? () from /usr/lib/libssl.so.1.1 #11 0x00007ffff7f4b252 in ?? () from /usr/lib/libssl.so.1.1 #12 0x00007ffff7f37136 in SSL_do_handshake () from /usr/lib/libssl.so.1.1 #13 0x00007ffff7f1c46b in ?? () from /usr/lib/libssl.so.1.1 #14 0x00007ffff7cd3ee6 in BIO_ctrl () from /usr/lib/libcrypto.so.1.1 #15 0x000055555556cc6e in http__Request_ssl_do () #16 0x000055555556e7a8 in http__Request_method_and_url_to_response () #17 0x000055555556e074 in http__Request_do () #18 0x000055555556d1af in http.get ()
The text was updated successfully, but these errors were encountered:
sha0coder
changed the title
SSL to any IP segfaults ie: http.get("https://127.0.0.1")
SSL handshake segfaults if BIO_do_connnect don't connect
Dec 8, 2019
V version: V 0.1.23 f0f62f6
OS: archlinux
What did you do? http.get("https://127.0.0.1")
What did you see instead? SIGSEGV
Solution:
on v/vlib/http/backend_nix.v ssl_do()
Dont do the handshake if BIO_do_connect fails.
Crash:
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff7ccd680 in ?? () from /usr/lib/libcrypto.so.1.1
(gdb) bt
#0 0x00007ffff7ccd680 in ?? () from /usr/lib/libcrypto.so.1.1
#1 0x00007ffff7cd0ef4 in BIO_connect () from /usr/lib/libcrypto.so.1.1
#2 0x00007ffff7cd63af in ?? () from /usr/lib/libcrypto.so.1.1
#3 0x00007ffff7cd6690 in ?? () from /usr/lib/libcrypto.so.1.1
#4 0x00007ffff7cd450a in ?? () from /usr/lib/libcrypto.so.1.1
#5 0x00007ffff7cd3534 in ?? () from /usr/lib/libcrypto.so.1.1
#6 0x00007ffff7cd3a13 in BIO_write () from /usr/lib/libcrypto.so.1.1
#7 0x00007ffff7cd1d62 in ?? () from /usr/lib/libcrypto.so.1.1
#8 0x00007ffff7cd3ee6 in BIO_ctrl () from /usr/lib/libcrypto.so.1.1
#9 0x00007ffff7f4bd5e in ?? () from /usr/lib/libssl.so.1.1
#10 0x00007ffff7f50800 in ?? () from /usr/lib/libssl.so.1.1
#11 0x00007ffff7f4b252 in ?? () from /usr/lib/libssl.so.1.1
#12 0x00007ffff7f37136 in SSL_do_handshake () from /usr/lib/libssl.so.1.1
#13 0x00007ffff7f1c46b in ?? () from /usr/lib/libssl.so.1.1
#14 0x00007ffff7cd3ee6 in BIO_ctrl () from /usr/lib/libcrypto.so.1.1
#15 0x000055555556cc6e in http__Request_ssl_do ()
#16 0x000055555556e7a8 in http__Request_method_and_url_to_response ()
#17 0x000055555556e074 in http__Request_do ()
#18 0x000055555556d1af in http.get ()
The text was updated successfully, but these errors were encountered: