CVE-2014-8143:auth: Force talloc type of session_info pointer to match
authorAndrew Bartlett <abartlet@samba.org>
Tue, 11 Nov 2014 02:23:02 +0000 (15:23 +1300)
committerKarolin Seeger <kseeger@samba.org>
Thu, 15 Jan 2015 11:33:08 +0000 (12:33 +0100)
This helps us keep things safe in LDB where we put this in a opaque pointer.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=10993

Andrew Bartlett

Change-Id: I46fe53ba655ca0810c276b72fbca524884cdf22d
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
source4/auth/session.c

index b4b4200337ac20adfbee3d49eed1e33538f0bc4f..3d8714c3e1f9f46cdff7b2b3b36f1a854c85b8b0 100644 (file)
@@ -233,6 +233,11 @@ struct auth_session_info *auth_session_info_from_transport(TALLOC_CTX *mem_ctx,
 {
        struct auth_session_info *session_info;
        session_info = talloc_steal(mem_ctx, session_info_transport->session_info);
+       /*
+        * This is to allow us to check the type of this pointer using
+        * talloc_get_type()
+        */
+       talloc_set_name(session_info, "struct auth_session_info");
 #ifdef HAVE_GSS_IMPORT_CRED
        if (session_info_transport->exported_gssapi_credentials.length) {
                struct cli_credentials *creds;