Whamcloud - gitweb
LU-3289 gss: Fix issues with SK privacy and integrity mode 22/21922/8
authorJeremy Filizetti <jeremy.filizetti@gmail.com>
Tue, 9 Aug 2016 23:19:43 +0000 (19:19 -0400)
committerOleg Drokin <oleg.drokin@intel.com>
Thu, 13 Oct 2016 23:36:47 +0000 (23:36 +0000)
commit462037d5d302f408b840d2543de89b22f8eb7b73
tree1a7d93881405d1433640a7bd78a5a4c39cb1ee7c
parent99bc4ba277637656f6329a67158af6cee7070b48
LU-3289 gss: Fix issues with SK privacy and integrity mode

This patch has several fixes for skpi:

1. The original SK patches failed to account for out of order
handling of RPCs and bulk pages during encryption.  As a result
clients would be out of sync with the IV used for decryption.
This patches moves the encryption to a format similar to RFC3686
to handle these RPCs and bulk pages.

2. A header was added to the SK mode RPCs to allow versioning and
send the unencrypted IV used for an RPC.  The versioning will allow
for future protocol changes.

3. Several changes to fix or impove security of the implementation
based on a security review from Matthew Wood at Intel:
- Derive a unique key for integrity modes instead of using the
  shared secret key (ska, ski, and skpi modes).  This helps prevent
  replays.
- Use PBKDF2 instead of HMAC to derive keys for integrity and
  encryption.
- Have the server side pass a random value (like the client) and
  incorporate this value into the key binding information.

Signed-off-by: Jeremy Filizetti <jeremy.filizetti@gmail.com>
Change-Id: I247187ecbd8cb23c602cec6a92eca938f135e564
Reviewed-on: http://review.whamcloud.com/21922
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/ptlrpc/gss/gss_crypto.c
lustre/ptlrpc/gss/gss_crypto.h
lustre/ptlrpc/gss/gss_krb5_mech.c
lustre/ptlrpc/gss/gss_sk_mech.c
lustre/utils/gss/lgss_sk_utils.c
lustre/utils/gss/sk_utils.c
lustre/utils/gss/sk_utils.h
lustre/utils/gss/svcgssd_proc.c