From: Andrew Bartlett Date: Tue, 11 Nov 2014 02:23:02 +0000 (+1300) Subject: CVE-2014-8143:auth: Force talloc type of session_info pointer to match X-Git-Tag: samba-4.0.24~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=392523a227671eb1570d1815c8280fe001d8a435;p=thirdparty%2Fsamba.git CVE-2014-8143:auth: Force talloc type of session_info pointer to match 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 Reviewed-by: Garming Sam Reviewed-by: Stefan Metzmacher --- diff --git a/source4/auth/session.c b/source4/auth/session.c index bb0b5bca636..8c853021a1e 100644 --- a/source4/auth/session.c +++ b/source4/auth/session.c @@ -204,6 +204,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;