Uploaded image for project: 'MariaDB Connector/C'
  1. MariaDB Connector/C
  2. CONC-555

Appverifier error in schannel_free_cert_context

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 3.1, 3.2(EOL)
    • 3.1.14
    • TLS/SSL
    • None

    Description

      When running server MTR tests that use client certificate, e.g main.ssl_ca, uner AppVerifier, following error pops up

       	ntdll.dll!KiUserExceptionDispatch()	Unknown
       	cryptsp.dll!CryptReleaseContext()	Unknown
       	crypt32.dll!FreeContextElement()	Unknown
       	crypt32.dll!CertFreeCertificateContext()	Unknown
       	mysql.exe!schannel_free_cert_context(const _CERT_CONTEXT * cert) Line 855	C
      >	mysql.exe!ma_tls_connect(st_ma_pvio_tls * ctls) Line 465	C
       	mysql.exe!ma_pvio_tls_connect(st_ma_pvio_tls * ctls) Line 83	C
       	mysql.exe!ma_pvio_start_ssl(st_ma_pvio * pvio) Line 531	C
       	mysql.exe!send_client_reply_packet(MCPVIO_EXT * mpvio, const unsigned char * data, int data_len) Line 317	C
       	mysql.exe!client_mpvio_write_packet(st_plugin_vio * mpv, const unsigned char * pkt, unsigned __int64 pkt_len) Line 480	C
       	mysql.exe!native_password_auth_client(st_plugin_vio * vio, st_mysql * mysql) Line 93	C
       	mysql.exe!run_plugin_auth(st_mysql * mysql, char * data, unsigned int data_len, const char * data_plugin, const char * db) Line 617	C
       	mysql.exe!mthd_my_real_connect(st_mysql * mysql, const char * host, const char * user, const char * passwd, const char * db, unsigned int port, const char * unix_socket, unsigned long client_flag) Line 1650	C
       	mysql.exe!mysql_real_connect(st_mysql * mysql, const char * host, const char * user, const char * passwd, const char * db, unsigned int port, const char * unix_socket, unsigned long client_flag) Line 1314	C
       	mysql.exe!do_connect(st_mysql * mysql, const char * host, const char * user, const char * password, const char * database, unsigned long flags) Line 1385	C++
       	mysql.exe!sql_real_connect(char * host, char * database, char * user, char * password, unsigned int silent) Line 4774	C++
       	mysql.exe!sql_connect(char * host, char * database, char * user, char * password, unsigned int silent) Line 4830	C++
       	mysql.exe!main(int argc, char * * argv) Line 1208	C++
       	[Inline Frame] mysql.exe!invoke_main() Line 78	C++
       	mysql.exe!__scrt_common_main_seh() Line 288	C++
       	kernel32.dll!BaseThreadInitThunk()	Unknown
       	ntdll.dll!RtlUserThreadStart()	Unknown
      
      

      This is mostly likely attributed to previous freeing of HCRYPTPROV that was set in the certificate to represent client private key (i.e CryptReleaseContext(cert_key_context.hCryptProv, 0) prior to CertFreeCertificateContext) . But this call can't be entirely omitted, since in that case test reveals there would be a memory leak.

      Attachments

        Activity

          People

            wlad Vladislav Vaintroub
            wlad Vladislav Vaintroub
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.