aboutsummaryrefslogtreecommitdiff
path: root/src/lib/gssapi/krb5/gssapiP_krb5.h
diff options
context:
space:
mode:
authorGreg Hudson <ghudson@mit.edu>2015-11-01 22:45:21 -0500
committerGreg Hudson <ghudson@mit.edu>2015-11-05 12:11:33 -0500
commit3db8dfec1ef50ddd78d6ba9503185995876a39fd (patch)
tree7813ec8d62e50c53d460b5bd4c73f9dcc9810904 /src/lib/gssapi/krb5/gssapiP_krb5.h
parent92d6dd045dfc06cc03d20b327a6ee7a71e6bc24d (diff)
downloadkrb5-3db8dfec1ef50ddd78d6ba9503185995876a39fd.zip
krb5-3db8dfec1ef50ddd78d6ba9503185995876a39fd.tar.gz
krb5-3db8dfec1ef50ddd78d6ba9503185995876a39fd.tar.bz2
Fix IAKERB context export/import [CVE-2015-2698]
The patches for CVE-2015-2696 contained a regression in the newly added IAKERB iakerb_gss_export_sec_context() function, which could cause it to corrupt memory. Fix the regression by properly dereferencing the context_handle pointer before casting it. Also, the patches did not implement an IAKERB gss_import_sec_context() function, under the erroneous belief that an exported IAKERB context would be tagged as a krb5 context. Implement it now to allow IAKERB contexts to be successfully exported and imported after establishment. CVE-2015-2698: In any MIT krb5 release with the patches for CVE-2015-2696 applied, an application which calls gss_export_sec_context() may experience memory corruption if the context was established using the IAKERB mechanism. Historically, some vulnerabilities of this nature can be translated into remote code execution, though the necessary exploits must be tailored to the individual application and are usually quite complicated. CVSSv2 Vector: AV:N/AC:H/Au:S/C:C/I:C/A:C/E:POC/RL:OF/RC:C ticket: 8273 (new) target_version: 1.14 tags: pullup
Diffstat (limited to 'src/lib/gssapi/krb5/gssapiP_krb5.h')
-rw-r--r--src/lib/gssapi/krb5/gssapiP_krb5.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/lib/gssapi/krb5/gssapiP_krb5.h b/src/lib/gssapi/krb5/gssapiP_krb5.h
index 97e090d..1663500 100644
--- a/src/lib/gssapi/krb5/gssapiP_krb5.h
+++ b/src/lib/gssapi/krb5/gssapiP_krb5.h
@@ -1397,6 +1397,11 @@ OM_uint32 KRB5_CALLCONV
iakerb_gss_export_sec_context(OM_uint32 *minor_status,
gss_ctx_id_t *context_handle,
gss_buffer_t interprocess_token);
+
+OM_uint32 KRB5_CALLCONV
+iakerb_gss_import_sec_context(OM_uint32 *minor_status,
+ const gss_buffer_t interprocess_token,
+ gss_ctx_id_t *context_handle);
#endif /* LEAN_CLIENT */
OM_uint32 KRB5_CALLCONV