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

Suspicious dereference of pointer before NULL check in osp_declare_xattr_get()

Details

    • Bug
    • Resolution: Fixed
    • Minor
    • Lustre 2.10.0
    • None
    • 3
    • 9223372036854775807

    Description

      Suspicious dereference of pointer 'name' by passing argument 1 to function 'strlen' at line 841 before NULL check at line 845

      • An event which alters the program's state, leading to the defect
        osp_object.c:841: 'name' is dereferenced by being passed as argument 1 to function 'strlen'.
      • An event which alters the program's state, leading to the defect
        osp_object.c:845: 'name' is checked for NULL.
      841			__u16			 namelen = strlen(name);
      842			int			 rc	 = 0;
      843		 
      844			LASSERT(buf != NULL);
      845			LASSERT(name != NULL);
      

      Attachments

        Activity

          [LU-7952] Suspicious dereference of pointer before NULL check in osp_declare_xattr_get()
          pjones Peter Jones added a comment -

          Landed for 2.10

          pjones Peter Jones added a comment - Landed for 2.10

          Oleg Drokin (oleg.drokin@intel.com) merged in patch https://review.whamcloud.com/20919/
          Subject: LU-7952 osp: Move strlen() call below LASSERT()
          Project: fs/lustre-release
          Branch: master
          Current Patch Set:
          Commit: 6719f3102abd39fd1af7d2ba34cb39a7ebb37339

          gerrit Gerrit Updater added a comment - Oleg Drokin (oleg.drokin@intel.com) merged in patch https://review.whamcloud.com/20919/ Subject: LU-7952 osp: Move strlen() call below LASSERT() Project: fs/lustre-release Branch: master Current Patch Set: Commit: 6719f3102abd39fd1af7d2ba34cb39a7ebb37339

          Arshad Hussain (arshad.super@gmail.com) uploaded a new patch: http://review.whamcloud.com/20919
          Subject: LU-7952 osp: Move strlen() call below LASSERT()
          Project: fs/lustre-release
          Branch: master
          Current Patch Set: 1
          Commit: 1f2d50c447df5e47e89e61720d38efd55d804e67

          gerrit Gerrit Updater added a comment - Arshad Hussain (arshad.super@gmail.com) uploaded a new patch: http://review.whamcloud.com/20919 Subject: LU-7952 osp: Move strlen() call below LASSERT() Project: fs/lustre-release Branch: master Current Patch Set: 1 Commit: 1f2d50c447df5e47e89e61720d38efd55d804e67

          People

            wc-triage WC Triage
            dmiter Dmitry Eremin (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: