Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-13698

stack overflow (OpenSSL on Windows)

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 10.2
    • 10.2.9
    • Platform Windows, SSL
    • None
    • Windows

    Description

      The CRYPTO_set_mem_functions call in function check_openssl_compatibility causes a stack overflow when freeing the memory:

      mysys_ssl/openssl.c

      if (!CRYPTO_set_mem_functions(coc_malloc, CRYPTO_realloc, CRYPTO_free))
          return 1;
      

      OpenSSL evp_enc.c

      void CRYPTO_free(void *str, const char *file, int line)
      {
          if (free_impl != NULL && free_impl != &CRYPTO_free) {
              free_impl(str, file, line);
              return;
          }
      

      function pointers

        &CRYPTO_free	0x5da87f00 {libcrypto-1_1.dll!CRYPTO_free
        free_impl	0x0138b1de {mysqld.exe!_CRYPTO_free}	
      

      Suggested fix:

      if (!CRYPTO_set_mem_functions(coc_malloc, NULL, NULL))
          return 1;
      

      Attachments

        Activity

          People

            serg Sergei Golubchik
            georg Georg Richter
            Votes:
            0 Vote for this issue
            Watchers:
            3 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.