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

stack overflow (OpenSSL on Windows)

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 10.2
    • Fix Version/s: 10.2.9
    • Component/s: Platform Windows, SSL
    • Labels:
      None
    • Environment:
      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

            Assignee:
            serg Sergei Golubchik
            Reporter:
            georg Georg Richter
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: