[LU-7945] Suspicious dereference of pointer before NULL check in mdt_handle_idmap() Created: 29/Mar/16  Updated: 10/Mar/18  Resolved: 10/Mar/18

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

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

Issue Links:
Related
is related to LU-6971 Remove obsolete remote client and "lf... Resolved
Severity: 3
Rank (Obsolete): 9223372036854775807

 Description   

Suspicious dereference of pointer 'req->rq_export' by passing argument 1 to function 'mdt_exp2dev' at line 138 before NULL check at line 146

  • An event which alters the program's state, leading to the defect
    mdt_idmap.c:138: 'req->rq_export' is dereferenced by being passed as argument 1 to function 'mdt_exp2dev'.
  • An event which alters the program's state, leading to the defect
    mdt_internal.h:915: 'exp' is passed to function 'mdt_exp2dev'.
  • An event which alters the program's state, leading to the defect
    mdt_internal.h:917: 'exp' is explicitly dereferenced.
  • An event which alters the program's state, leading to the defect
    mdt_idmap.c:146: 'req->rq_export' is checked for NULL.
    135		int mdt_handle_idmap(struct tgt_session_info *tsi)
    136		{
    137			struct ptlrpc_request	*req = tgt_ses_req(tsi);
    138			struct mdt_device	*mdt = mdt_exp2dev(req->rq_export);
    139		        struct mdt_export_data *med;
    140		        struct ptlrpc_user_desc *pud = req->rq_user_desc;
    141		        struct md_identity *identity;
    142		        __u32 opc;
    143		        int rc = 0;
    144		        ENTRY;
    145		 
    146		        if (!req->rq_export)
    147		                RETURN(0);
    


 Comments   
Comment by Andreas Dilger [ 10/Mar/18 ]

This code was removed in patch http://review.whamcloud.com/19789 "LU-6971 cleanup: not support remote client anymore".

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