028-CVE-2016-2125-v3.6.patch 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. From: =?utf-8?q?Guido_G=C3=BCnther?= <agx@sigxcpu.org>
  2. Date: Wed, 28 Dec 2016 19:21:49 +0100
  3. Subject: security-CVE-2016-2125: Don't pass GSS_C_DELEG_FLAG by default
  4. This is a backport of upstream commits
  5. b1a056f77e793efc45df34ab7bf78fbec1bf8a59
  6. b83897ae49fdee1fda73c10c7fe73362bfaba690 (code not used in wheezy)
  7. 3106964a640ddf6a3c08c634ff586a814f94dff8 (code not used in wheezy)
  8. ---
  9. source3/librpc/crypto/gse.c | 1 -
  10. source3/libsmb/clifsinfo.c | 2 +-
  11. source4/auth/gensec/gensec_gssapi.c | 2 +-
  12. source4/scripting/bin/nsupdate-gss | 2 +-
  13. 4 files changed, 3 insertions(+), 4 deletions(-)
  14. --- a/source3/librpc/crypto/gse.c
  15. +++ b/source3/librpc/crypto/gse.c
  16. @@ -162,7 +162,6 @@ static NTSTATUS gse_context_init(TALLOC_
  17. memcpy(&gse_ctx->gss_mech, gss_mech_krb5, sizeof(gss_OID_desc));
  18. gse_ctx->gss_c_flags = GSS_C_MUTUAL_FLAG |
  19. - GSS_C_DELEG_FLAG |
  20. GSS_C_DELEG_POLICY_FLAG |
  21. GSS_C_REPLAY_FLAG |
  22. GSS_C_SEQUENCE_FLAG;
  23. --- a/source3/libsmb/clifsinfo.c
  24. +++ b/source3/libsmb/clifsinfo.c
  25. @@ -726,7 +726,7 @@ static NTSTATUS make_cli_gss_blob(TALLOC
  26. &es->s.gss_state->gss_ctx,
  27. srv_name,
  28. GSS_C_NO_OID, /* default OID. */
  29. - GSS_C_MUTUAL_FLAG | GSS_C_REPLAY_FLAG | GSS_C_SEQUENCE_FLAG | GSS_C_DELEG_FLAG,
  30. + GSS_C_MUTUAL_FLAG | GSS_C_REPLAY_FLAG | GSS_C_SEQUENCE_FLAG | GSS_C_DELEG_POLICY_FLAG,
  31. GSS_C_INDEFINITE, /* requested ticket lifetime. */
  32. NULL, /* no channel bindings */
  33. p_tok_in,
  34. --- a/source4/auth/gensec/gensec_gssapi.c
  35. +++ b/source4/auth/gensec/gensec_gssapi.c
  36. @@ -172,7 +172,7 @@ static NTSTATUS gensec_gssapi_start(stru
  37. if (gensec_setting_bool(gensec_security->settings, "gensec_gssapi", "mutual", true)) {
  38. gensec_gssapi_state->want_flags |= GSS_C_MUTUAL_FLAG;
  39. }
  40. - if (gensec_setting_bool(gensec_security->settings, "gensec_gssapi", "delegation", true)) {
  41. + if (gensec_setting_bool(gensec_security->settings, "gensec_gssapi", "delegation", false)) {
  42. gensec_gssapi_state->want_flags |= GSS_C_DELEG_FLAG;
  43. }
  44. if (gensec_setting_bool(gensec_security->settings, "gensec_gssapi", "replay", true)) {
  45. --- a/source4/scripting/bin/nsupdate-gss
  46. +++ b/source4/scripting/bin/nsupdate-gss
  47. @@ -178,7 +178,7 @@ sub negotiate_tkey($$$$)
  48. my $flags =
  49. GSS_C_REPLAY_FLAG | GSS_C_MUTUAL_FLAG |
  50. GSS_C_SEQUENCE_FLAG | GSS_C_CONF_FLAG |
  51. - GSS_C_INTEG_FLAG | GSS_C_DELEG_FLAG;
  52. + GSS_C_INTEG_FLAG;
  53. $status = GSSAPI::Cred::acquire_cred(undef, 120, undef, GSS_C_INITIATE,