Uploaded image for project: 'Lustre'
  1. Lustre
  2. LU-8192

Unsafe access to keyrings in gss_kt_instantiate

Details

    • Bug
    • Resolution: Unresolved
    • Major
    • None
    • None
    • 3
    • 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
      request_key_unlink():

                      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
      

      Attachments

        Activity

          [LU-8192] Unsafe access to keyrings in gss_kt_instantiate

          Kit Westneat (kit.westneat@gmail.com) uploaded a new patch: https://review.whamcloud.com/26205
          Subject: LU-8192 nodemap: modify lctl to allow non-contiguous nm ranges
          Project: fs/lustre-release
          Branch: master
          Current Patch Set: 1
          Commit: 77e53e7967aa77e2d60f31135b4bdc1d686c1a47

          gerrit Gerrit Updater added a comment - Kit Westneat (kit.westneat@gmail.com) uploaded a new patch: https://review.whamcloud.com/26205 Subject: LU-8192 nodemap: modify lctl to allow non-contiguous nm ranges Project: fs/lustre-release Branch: master Current Patch Set: 1 Commit: 77e53e7967aa77e2d60f31135b4bdc1d686c1a47

          Hi Jeremy,

          Can you look at this code? Looks like it was recently added by IU.

          Thanks.
          Joe

          jgmitter Joseph Gmitter (Inactive) added a comment - Hi Jeremy, Can you look at this code? Looks like it was recently added by IU. Thanks. Joe

          People

            jfilizetti Jeremy Filizetti
            green Oleg Drokin
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: