[LU-9430] logic errors in lgss_sk code Created: 02/May/17  Updated: 09/May/17  Resolved: 09/May/17

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: Lustre 2.9.0
Fix Version/s: Lustre 2.10.0

Type: Bug Priority: Trivial
Reporter: Chris Hanna Assignee: Chris Hanna
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Related
is related to LU-9073 SSK: lgss_sk generates keys with inva... Resolved
is related to LU-8602 Support GSS crypto code with linux 4.... Resolved
Severity: 4
Rank (Obsolete): 9223372036854775807

 Description   

Aside from the encryption protocol problems affecting the shared key feature in LU-9073, there are a couple trivial bugs in sk_name2hmac(). These affect logic for setting the hash type when creating a shared key. For example, the encryption type is echoed to stdout rather than being properly assigned. I will submit a patch to fix this.

Example:
$ ./lgss_sk -w testlu.key -f lustretest -d /dev/urandom -i SHA512 -t server
sha512Reading random data for shared key from '/dev/urandom'
$ ./lgss_sk -r testlu.key
Version: 1
Type: server
HMAC alg: crypt
Crypto alg: sha256
Ctx Expiration: 604800 seconds
Shared keylen: 256 bits
Prime length: 2048 bits
File system: lustretest
MGS NIDs:
Nodemap name: default
Shared key:
0000: a685 0f19 c96a 625e 9cd7 d800 26f2 228b .....jb^....&.".
0010: 86b8 a0e0 34a4 2fae 0b45 5d46 450a 5285 ....4./..E]FE.R.



 Comments   
Comment by Gerrit Updater [ 02/May/17 ]

Chris Hanna (hannac@iu.edu) uploaded a new patch: https://review.whamcloud.com/26920
Subject: LU-9430 utils: fix logic errors and putchar in sk_name2hmac()
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 66a6aa1aa50f4a4786704e35e8b265970af3e09a

Comment by Andreas Dilger [ 02/May/17 ]

Chris, how does this relate to patch https://review.whamcloud.com/25199 "LU-9073 gss: Fix mixup between standard crypto and krb5 handling"? Does that patch still need to be updated to fix issues in GSS/SSK or is it totally incorrect and should be abandoned?

Comment by Chris Hanna [ 03/May/17 ]

LU-9073 (and LU-9086, see https://review.whamcloud.com/#/c/25959/) still need to be addressed before this can be restored to function.

Comment by James A Simmons [ 03/May/17 ]

I did plan to get to this work over last week end but then other dead line happened. I will work something out over this coming weekend.

Comment by Gerrit Updater [ 09/May/17 ]

Oleg Drokin (oleg.drokin@intel.com) merged in patch https://review.whamcloud.com/26920/
Subject: LU-9430 utils: fix logic errors and putchar in sk_name2hmac()
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 2ffbcc9f9ad930fee2df53238b3244b7c3e6bb91

Comment by Peter Jones [ 09/May/17 ]

Landed for 2.10

Comment by James A Simmons [ 09/May/17 ]

I will continue the GSS fixing work under ticket LU-7183

Generated at Sat Feb 10 02:26:07 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.