[LU-8192] Unsafe access to keyrings in gss_kt_instantiate Created: 22/May/16 Updated: 30/Jan/22 |
|
| Status: | Open |
| Project: | Lustre |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major |
| Reporter: | Oleg Drokin | Assignee: | Jeremy Filizetti |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | patch, x | ||
| Severity: | 3 |
| Rank (Obsolete): | 9223372036854775807 |
| Description |
|
Apparently you cannot just fetch a keyring like: rc = key_link(key_tgcred(current)->session_keyring, key); This is unsafe and supposedly not even accessible, because sparse warns it's in wrong address space, also in ring = key_get(rcu_dereference(key_tgcred(tsk)
->session_keyring));
The errors I get are: lustre/ptlrpc/gss/gss_keyring.c:1308 warning: incorrect type in argument 1 (different address spaces) expected "struct key *keyring" got "struct key [noderef] <asn:4>*const [noderef] <asn:4>session_keyring" lustre/ptlrpc/gss/gss_keyring.c:695 warning: cast removes address space of expression |
| Comments |
| Comment by Joseph Gmitter (Inactive) [ 24/May/16 ] |
|
Hi Jeremy, Can you look at this code? Looks like it was recently added by IU. Thanks. |
| Comment by Gerrit Updater [ 27/Mar/17 ] |
|
Kit Westneat (kit.westneat@gmail.com) uploaded a new patch: https://review.whamcloud.com/26205 |