[LU-7952] Suspicious dereference of pointer before NULL check in osp_declare_xattr_get() Created: 29/Mar/16  Updated: 23/Dec/16  Resolved: 23/Dec/16

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

Type: Bug Priority: Minor
Reporter: Dmitry Eremin (Inactive) Assignee: WC Triage
Resolution: Fixed Votes: 0
Labels: kw

Severity: 3
Rank (Obsolete): 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);


 Comments   
Comment by Gerrit Updater [ 22/Jun/16 ]

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

Comment by Gerrit Updater [ 23/Dec/16 ]

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

Comment by Peter Jones [ 23/Dec/16 ]

Landed for 2.10

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