Whamcloud - gitweb
LU-12401 gss: fix checksum for Kerberos and SSK 36/35536/10
authorSebastien Buisson <sbuisson@ddn.com>
Fri, 7 Jun 2019 14:45:26 +0000 (23:45 +0900)
committerOleg Drokin <green@whamcloud.com>
Fri, 26 Jul 2019 18:54:02 +0000 (18:54 +0000)
commitd29eea632bb8a99b83442ba7946707e8baf2dcef
tree6476f54ce99b288e7fe18e82e89aa0a0337c0e85
parent1c2b3b945c19e7e65bc57caf6e84582d7794b6ec
LU-12401 gss: fix checksum for Kerberos and SSK

When computing checksum for Kerberos, krb5 wire token header is
appended to the plain text. Make sure the actual header is appended
in gss_digest_hash().
For interop with older clients, introduce new server side tunable
'sptlrpc.gss.krb5_allow_old_client_csum'. When not set, servers refuse
Kerberos connection from older clients.

In gss_crypt_generic(), protect against an undefined behavior by
switching from memcpy to memmove.

When computing checksum for SSK, make sure the actual token is used
to store the checksum.

Lustre-change: https://review.whamcloud.com/35099
Lustre-commit: 218fc688c11f081881b2cc1c1632ceaf9ec77a77

Fixes: a21c13d4df ("LU-8602 gss: Properly port gss to newer crypto api.")
Test-Parameters: envdefinitions=SHARED_KEY=true testlist=sanity,recovery-small,sanity-sec
Test-Parameters: envdefinitions=SHARED_KEY=true clientbuildno=7033 clientjob=lustre-reviews-patchless testlist=sanity,recovery-small,sanity-sec
Signed-off-by: Sebastien Buisson <sbuisson@ddn.com>
Change-Id: I0233ada481f132af112bf88c065f5421902c942e
Reviewed-on: https://review.whamcloud.com/35536
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/ptlrpc/gss/gss_api.h
lustre/ptlrpc/gss/gss_cli_upcall.c
lustre/ptlrpc/gss/gss_crypto.c
lustre/ptlrpc/gss/gss_crypto.h
lustre/ptlrpc/gss/gss_internal.h
lustre/ptlrpc/gss/gss_krb5_mech.c
lustre/ptlrpc/gss/gss_mech_switch.c
lustre/ptlrpc/gss/gss_sk_mech.c
lustre/ptlrpc/gss/gss_svc_upcall.c
lustre/ptlrpc/gss/lproc_gss.c