]> git.ipfire.org Git - thirdparty/krb5.git/commitdiff
Do not loop on add_cred_from and other new methods
authorSam Hartman <hartmans@debian.org>
Wed, 4 Jun 2014 16:06:27 +0000 (12:06 -0400)
committerGreg Hudson <ghudson@mit.edu>
Thu, 5 Jun 2014 16:13:18 +0000 (12:13 -0400)
Several new GSS-API methods were added but GSSAPI_ADD_METHOD was
called to add them rather than GSSAPI_ADD_METHOD_NOLOOP.  This means
that the implementation from the GSS-API mechglue would be used if the
mechanism had no implementation.  As a result, the mechglue will call
into itself exhausting the call stack in an endless loop when one of
these methods is called.

ticket: 7926
target_version: 1.12.2
tags: pullup

src/lib/gssapi/mechglue/g_initialize.c

index 8bce14cba11f0ee23b2d929fa8e8b30008704a00..b0eb40a5721576cb07ce1dd2b7c62c765e238b99 100644 (file)
@@ -703,11 +703,11 @@ build_dynamicMech(void *dl, const gss_OID mech_type)
         GSS_ADD_DYNAMIC_METHOD_NOLOOP(dl, mech, gss_inquire_mech_for_saslname);
         /* RFC 5587 */
         GSS_ADD_DYNAMIC_METHOD_NOLOOP(dl, mech, gss_inquire_attrs_for_mech);
-       GSS_ADD_DYNAMIC_METHOD(dl, mech, gss_acquire_cred_from);
-       GSS_ADD_DYNAMIC_METHOD(dl, mech, gss_store_cred_into);
+       GSS_ADD_DYNAMIC_METHOD_NOLOOP(dl, mech, gss_acquire_cred_from);
+       GSS_ADD_DYNAMIC_METHOD_NOLOOP(dl, mech, gss_store_cred_into);
        GSS_ADD_DYNAMIC_METHOD(dl, mech, gssspi_acquire_cred_with_password);
-       GSS_ADD_DYNAMIC_METHOD(dl, mech, gss_export_cred);
-       GSS_ADD_DYNAMIC_METHOD(dl, mech, gss_import_cred);
+       GSS_ADD_DYNAMIC_METHOD_NOLOOP(dl, mech, gss_export_cred);
+       GSS_ADD_DYNAMIC_METHOD_NOLOOP(dl, mech, gss_import_cred);
        GSS_ADD_DYNAMIC_METHOD(dl, mech, gssspi_import_sec_context_by_mech);
        GSS_ADD_DYNAMIC_METHOD(dl, mech, gssspi_import_name_by_mech);
        GSS_ADD_DYNAMIC_METHOD(dl, mech, gssspi_import_cred_by_mech);