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

Heap corruption with auth_gssapi on Windows, in FreeContextAttributes()

    XMLWordPrintable

Details

    Description

      On Windows Server 2012 R2, in debug compiled mysqld (did not try optimized),
      I see intermittent heap corruption when trying to use auth_gssapi authentication.

      The line where it crashes is FreeContextAttrbutes() to free memory previously allocated previously with

      QueryContextAttributes(ctxt, SECPKG_ATTR_NATIVE_NAMES, &native_names);

      https://github.com/MariaDB/server/blob/df704b5a1b581f4f9a02b9310f2b2c8ef36eb98f/plugin/auth_gssapi/sspi_server.cc#L106

      Apparently, FreeContextBuffer(&native_names) seems to be incorrect, since it refers
      to structure on stack, rather than heap allocated by the structure members.

      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.