EionRobb / skype4pidgin

Skype Plugin for Pidgin, libpurple and more
https://github.com/EionRobb/skype4pidgin/tree/master/skypeweb#skypeweb-plugin-for-pidgin
625 stars 88 forks source link

Crash during Keep-alive connection expired after ask for single-use code #692

Open Thaodan opened 1 year ago

Thaodan commented 1 year ago

Description

The skypeweb plugin makes the libpurple application crashes after the question for using a sinlge-use to login code is asked.

Http-request and response that triggers the bug

``` dtrace user_id= nss: SSL version 3.4 using 256-bit AES-GCM with 128-bit AEAD MAC Server Auth: 2048-bit TLS 1.3, Key Exchange: 256-bit TLS 1.3, Compression: NULL Cipher Suite Name: TLS_AES_256_GCM_SHA384 DEBUG nss: subject=CN=login.skype.com,O=Microsoft Corporation,L=Redmond,ST=WA,C=US issuer=CN=Microsoft Azure TLS Issuing CA 01,O=Microsoft Corporation,C=US DEBUG nss: subject=CN=Microsoft Azure TLS Issuing CA 01,O=Microsoft Corporation,C=US issuer=CN=DigiCert Global Root G2,OU=www.digicert.com,O=DigiCert Inc,C=US DEBUG nss: partial certificate chain DEBUG certificate/x509/tls_cached: Starting verify for login.skype.com DEBUG certificate/x509/tls_cached: Checking for cached cert... DEBUG certificate/x509/tls_cached: ...Found cached cert DEBUG nss/x509: Loading certificate from /var/lib/bitlbee//purple/username/certificates/x509/tls_peers/login.skype.com DEBUG certificate/x509/tls_cached: Peer cert matched cached DEBUG nss/x509: Exporting certificate to /var/lib/bitlbee//purple/username/certificates/x509/tls_peers/login.skype.com DEBUG util: Writing file /var/lib/bitlbee//purple/username/certificates/x509/tls_peers/login.skype.com DEBUG nss: Trusting CN=login.skype.com,O=Microsoft Corporation,L=Redmond,ST=WA,C=US DEBUG certificate: Successfully verified certificate for login.skype.com DEBUG dnsquery: Performing DNS lookup for login.live.com DEBUG dns: Successfully sent DNS request to child 1636746 DEBUG dns: Got response for 'login.live.com' DEBUG dnsquery: IP resolved for login.live.com DEBUG proxy: Attempting connection to 20.190.160.17 DEBUG proxy: Connecting to login.live.com:443 with no proxy DEBUG proxy: Connection in progress DEBUG proxy: Connecting to login.live.com:443. DEBUG proxy: Connected to login.live.com:443. DEBUG nss: SSL version 3.3 using 256-bit AES-GCM with 128-bit AEAD MAC Server Auth: 2048-bit RSA, Key Exchange: 384-bit ECDHE, Compression: NULL Cipher Suite Name: TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 DEBUG nss: subject=CN=graph.windows.net,O=Microsoft Corporation,L=Redmond,ST=Washington,C=US issuer=CN=DigiCert SHA2 Secure Server CA,O=DigiCert Inc,C=US DEBUG nss: subject=CN=DigiCert SHA2 Secure Server CA,O=DigiCert Inc,C=US issuer=CN=DigiCert Global Root CA,OU=www.digicert.com,O=DigiCert Inc,C=US DEBUG nss: partial certificate chain DEBUG certificate/x509/tls_cached: Starting verify for login.live.com DEBUG certificate/x509/tls_cached: Checking for cached cert... DEBUG certificate/x509/tls_cached: ...Found cached cert DEBUG nss/x509: Loading certificate from /var/lib/bitlbee//purple/username/certificates/x509/tls_peers/login.live.com DEBUG certificate/x509/tls_cached: Peer cert matched cached DEBUG nss/x509: Exporting certificate to /var/lib/bitlbee//purple/username/certificates/x509/tls_peers/login.live.com DEBUG util: Writing file /var/lib/bitlbee//purple/username/certificates/x509/tls_peers/login.live.com DEBUG nss: Trusting CN=graph.windows.net,O=Microsoft Corporation,L=Redmond,ST=Washington,C=US DEBUG certificate: Successfully verified certificate for login.live.com DEBUG http: Request 0x555555a5c890 performed successfully. DEBUG skypeweb: PPFT2: 200 Sign in to Skype DEBUG http: Performing new request 0x555555aad8e0 to login.live.com. DEBUG dnsquery: Performing DNS lookup for login.live.com DEBUG dns: Successfully sent DNS request to child 1636746 DEBUG dns: Got response for 'login.live.com' DEBUG dnsquery: IP resolved for login.live.com DEBUG proxy: Attempting connection to 20.190.160.14 DEBUG proxy: Connecting to login.live.com:443 with no proxy DEBUG proxy: Connection in progress DEBUG proxy: Connecting to login.live.com:443. DEBUG proxy: Connected to login.live.com:443. DEBUG nss: SSL version 3.3 using 256-bit AES-GCM with 128-bit AEAD MAC Server Auth: 2048-bit RSA, Key Exchange: 384-bit ECDHE, Compression: NULL Cipher Suite Name: TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 DEBUG nss: subject=CN=graph.windows.net,O=Microsoft Corporation,L=Redmond,ST=Washington,C=US issuer=CN=DigiCert SHA2 Secure Server CA,O=DigiCert Inc,C=US DEBUG nss: subject=CN=DigiCert SHA2 Secure Server CA,O=DigiCert Inc,C=US issuer=CN=DigiCert Global Root CA,OU=www.digicert.com,O=DigiCert Inc,C=US DEBUG nss: partial certificate chain DEBUG certificate/x509/tls_cached: Starting verify for login.live.com DEBUG certificate/x509/tls_cached: Checking for cached cert... DEBUG certificate/x509/tls_cached: ...Found cached cert DEBUG nss/x509: Loading certificate from /var/lib/bitlbee//purple/username/certificates/x509/tls_peers/login.live.com DEBUG certificate/x509/tls_cached: Peer cert matched cached DEBUG nss/x509: Exporting certificate to /var/lib/bitlbee//purple/username/certificates/x509/tls_peers/login.live.com DEBUG util: Writing file /var/lib/bitlbee//purple/username/certificates/x509/tls_peers/login.live.com DEBUG nss: Trusting CN=graph.windows.net,O=Microsoft Corporation,L=Redmond,ST=Washington,C=US DEBUG certificate: Successfully verified certificate for login.live.com DEBUG http: Request 0x555555aad8e0 performed successfully. DEBUG http: Performing new request 0x555555a73600 to login.live.com. DEBUG dnsquery: Performing DNS lookup for login.live.com DEBUG dns: Successfully sent DNS request to child 1636746 DEBUG dns: Got response for 'login.live.com' DEBUG dnsquery: IP resolved for login.live.com DEBUG proxy: Attempting connection to 20.190.160.17 DEBUG proxy: Connecting to login.live.com:443 with no proxy DEBUG proxy: Connection in progress DEBUG proxy: Connecting to login.live.com:443. DEBUG proxy: Connected to login.live.com:443. DEBUG nss: SSL version 3.3 using 256-bit AES-GCM with 128-bit AEAD MAC Server Auth: 2048-bit RSA, Key Exchange: 384-bit ECDHE, Compression: NULL Cipher Suite Name: TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 DEBUG nss: subject=CN=graph.windows.net,O=Microsoft Corporation,L=Redmond,ST=Washington,C=US issuer=CN=DigiCert SHA2 Secure Server CA,O=DigiCert Inc,C=US DEBUG nss: subject=CN=DigiCert SHA2 Secure Server CA,O=DigiCert Inc,C=US issuer=CN=DigiCert Global Root CA,OU=www.digicert.com,O=DigiCert Inc,C=US DEBUG nss: partial certificate chain DEBUG certificate/x509/tls_cached: Starting verify for login.live.com DEBUG certificate/x509/tls_cached: Checking for cached cert... DEBUG certificate/x509/tls_cached: ...Found cached cert DEBUG nss/x509: Loading certificate from /var/lib/bitlbee//purple/username/certificates/x509/tls_peers/login.live.com DEBUG certificate/x509/tls_cached: Peer cert matched cached DEBUG nss/x509: Exporting certificate to /var/lib/bitlbee//purple/username/certificates/x509/tls_peers/login.live.com DEBUG util: Writing file /var/lib/bitlbee//purple/username/certificates/x509/tls_peers/login.live.com DEBUG nss: Trusting CN=graph.windows.net,O=Microsoft Corporation,L=Redmond,ST=Washington,C=US DEBUG certificate: Successfully verified certificate for login.live.com 202592231%2C506529616%2C495438817%2C183482635%2C37620672%2C320399734%2C9505092 ```

Backtrace

``` dtrace pher Suite Name: TLS_AES_256_GCM_SHA384 DEBUG nss: subject=CN=*.vo.msecnd.net,O=Microsoft Corporation,L=Redmond,ST=Washington,C=US issuer=CN=DigiCert SHA2 Secure Server CA,O=DigiCert Inc,C=US DEBUG nss: subject=CN=DigiCert SHA2 Secure Server CA,O=DigiCert Inc,C=US issuer=CN=DigiCert Global Root CA,OU=www.digicert.com,O=DigiCert Inc,C=US DEBUG nss: subject=CN=DigiCert Global Root CA,OU=www.digicert.com,O=DigiCert Inc,C=US issuer=CN=DigiCert Global Root CA,OU=www.digicert.com,O=DigiCert Inc,C=US DEBUG certificate/x509/tls_cached: Starting verify for bot-framework.azureedge.net DEBUG certificate/x509/tls_cached: Checking for cached cert... DEBUG certificate/x509/tls_cached: ...Found cached cert DEBUG nss/x509: Loading certificate from /var/lib/bitlbee//purple/bidar/certificates/x509/tls_peers/bot-framework.azureedge.net DEBUG certificate/x509/tls_cached: Peer cert matched cached DEBUG nss/x509: Exporting certificate to /var/lib/bitlbee//purple/bidar/certificates/x509/tls_peers/bot-framework.azureedge.net DEBUG util: Writing file /var/lib/bitlbee//purple/bidar/certificates/x509/tls_peers/bot-framework.azureedge.net DEBUG nss: Trusting CN=*.vo.msecnd.net,O=Microsoft Corporation,L=Redmond,ST=Washington,C=US DEBUG certificate: Successfully verified certificate for bot-framework.azureedge.net DEBUG http: Request 0x555555d70ba0 performed successfully. DEBUG http: Request 0x555555db6510 performed successfully. DEBUG http: Performing new request 0x555555db6510 to azscus1-client-s.gateway.messenger.live.com. DEBUG http: Request 0x555555db6510 performed successfully. DEBUG skypeweb: executing callback for https://azscus1-client-s.gateway.messenger.live.com/v1/users/ME/endpoints/SELF/subscriptions/0/poll DEBUG blist: Updating buddy status for fayolin3 (Skype (HTTP)) DEBUG blist: Updating buddy status for melody-love-music (Skype (HTTP)) DEBUG blist: Updating buddy status for joana19982 (Skype (HTTP)) DEBUG blist: Updating buddy status for joana19982 (Skype (HTTP)) DEBUG http: Performing new request 0x555555db6510 to azscus1-client-s.gateway.messenger.live.com. DEBUG util: Writing file blist.xml to directory /var/lib/bitlbee//purple/bidar DEBUG util: Writing file /var/lib/bitlbee//purple/bidar/blist.xml DEBUG http: Request 0x555555db6510 performed successfully. DEBUG skypeweb: executing callback for https://azscus1-client-s.gateway.messenger.live.com/v1/users/ME/endpoints/SELF/subscriptions/0/poll DEBUG http: Performing new request 0x555555b4cfb0 to azscus1-client-s.gateway.messenger.live.com. DEBUG http: Performing new request 0x555555c03ab0 to contacts.skype.com. DEBUG http: Request 0x555555c03ab0 performed successfully. DEBUG skypeweb: executing callback for https://contacts.skype.com/contacts/v2/users/SELF/invites DEBUG http: Request 0x555555b4cfb0 performed successfully. DEBUG skypeweb: executing callback for https://azscus1-client-s.gateway.messenger.live.com/v1/users/ME/endpoints/SELF/subscriptions/0/poll DEBUG http: Performing new request 0x555555b9dca0 to azscus1-client-s.gateway.messenger.live.com. DEBUG http: Performing new request 0x555555db6510 to contacts.skype.com. DEBUG http: Request 0x555555db6510 performed successfully. DEBUG skypeweb: executing callback for https://contacts.skype.com/contacts/v2/users/SELF/invites DEBUG http: Request 0x555555b9dca0 performed successfully. DEBUG skypeweb: executing callback for https://azscus1-client-s.gateway.messenger.live.com/v1/users/ME/endpoints/SELF/subscriptions/0/poll DEBUG http: Performing new request 0x555555c2a360 to azscus1-client-s.gateway.messenger.live.com. DEBUG prefs: /purple/savedstatus/isidleaway changed, scheduling save. DEBUG util: Writing file prefs.xml to directory /var/lib/bitlbee//purple/bidar DEBUG util: Writing file /var/lib/bitlbee//purple/bidar/prefs.xml DEBUG http: Request 0x555555c2a360 performed successfully. DEBUG skypeweb: executing callback for https://azscus1-client-s.gateway.messenger.live.com/v1/users/ME/endpoints/SELF/subscriptions/0/poll DEBUG http: Performing new request 0x555555b9dca0 to static.asm.skype.com. DEBUG http: Keep-alive connection expired (when writing), retrying... DEBUG http: Retrying connection 0x555555b9dca0... Program received signal SIGPIPE, Broken pipe. 0x00007ffff77e790d in send () from /usr/lib/libc.so.6 (gdb) bt #0 0x00007ffff77e790d in send () at /usr/lib/libc.so.6 #1 0x00007ffff62867e9 in () at /usr/lib/libnspr4.so #2 0x00007ffff3b2d103 in () at /usr/lib/libssl3.so #3 0x00007ffff3b16432 in () at /usr/lib/libssl3.so #4 0x00007ffff3b52bbc in () at /usr/lib/libssl3.so #5 0x00007ffff3b38b0e in () at /usr/lib/libssl3.so #6 0x00007ffff3af58a5 in () at /usr/lib/purple-2/ssl-nss.so #7 0x00007ffff796bba8 in purple_ssl_close () at /usr/lib/libpurple.so.0 #8 0x00007ffff39e4a42 in purple_socket_cancel (ps=0x555555a6fc50) at purple2compat/purple-socket.c:378 #9 purple_socket_destroy (ps=0x555555a6fc50) at purple2compat/purple-socket.c:400 #10 0x00007ffff39df3e2 in purple_http_socket_close_free (hs=0x555555a44ef0) at purple2compat/http.c:503 #11 purple_http_socket_close_free (hs=0x555555a44ef0) at purple2compat/http.c:495 #12 purple_http_keepalive_pool_release (invalidate=1, hs=0x555555a44ef0) at purple2compat/http.c:2364 #13 _purple_http_disconnect (hc=0x555555b9dca0, is_graceful=0) at purple2compat/http.c:1432 #14 0x00007ffff39e3c0d in purple_http_conn_retry (http_conn=0x555555b9dca0) at purple2compat/http.c:1740 #15 purple_http_conn_retry (http_conn=0x555555b9dca0) at purple2compat/http.c:1730 #16 _purple_http_send (fd=, cond=, _hc=0x555555b9dca0) at purple2compat/http.c:1381 #17 _purple_http_send (_hc=0x555555b9dca0, fd=, cond=) at purple2compat/http.c:1317 #18 0x000055555557de99 in () #19 0x00007ffff7dd4c6b in g_main_context_dispatch () at /usr/lib/libglib-2.0.so.0 #20 0x00007ffff7e2b001 in () at /usr/lib/libglib-2.0.so.0 #21 0x00007ffff7dd41cf in g_main_loop_run () at /usr/lib/libglib-2.0.so.0 #22 0x00005555555662d3 in main () ```

GDB log