[LU-9315] New static analysis issues in v2_9_55_0-35-gaa32cc5 Created: 11/Apr/17  Updated: 30/Aug/23  Resolved: 16/May/17

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

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

Issue Links:
Related
is related to LU-4629 Issues found by static analysis tools Resolved
is related to LU-8998 Progressive File Layout (PFL) Resolved
Severity: 3
Rank (Obsolete): 9223372036854775807

 Description   

Found 4 new static analysis issues in v2_9_55_0-35-gaa32cc5:

  1. Buffer Overflow - Non-null Terminated String
    • lustre/utils/liblustreapi_layout.c: in llapi_layout_expected, Buffer overflow of 'donor_path' due to non null terminated string 'donor_path'
  2. Use of Freed Memory by Pointer
    • lustre/utils/liblustreapi_layout.c: in llapi_layout_comp_del, Object 'comp' was dereferenced at line 1770 after being freed by calling '__llapi_comp_free' at line 1769
  3. Result of function that may return NULL will be dereferenced
    • lustre/lov/lov_pack.c: in lov_unpackmd, Pointer 'lsm_op_find(magic)' returned from call to function 'lsm_op_find' at line 334 may be NULL and will be dereferenced at line 334.
  4. Uninitialized Variable - possible
    • lustre/utils/liblustreapi.c: in find_check_comp_options, 'ret' might be used uninitialized in this function. Also there are 2 similar errors on lines 3243, 3264.

The list of commits since the previous build v2_9_55_0-13-g1d40214:

aa32cc5 LU-8998 pfl: PFL feature implementation
514b7da LU-9300 test: need copytool setup for sanity-hsm 1b
7da1d93 LU-9165 pfl: MDS handling of write intent IT_LAYOUT RPC
7107e54 LU-9008 pfl: dynamic layout modification with write/truncate
03b86ce LU-8998 pfl: test cases for lfsck on PFL
d1df591 LU-8998 docs: add llapi_ man pages to Makefile.am
c6e9f4f LU-8998 docs: add lfs-setripe manpage to dist
e2cdf46 LU-8998 pfl: layout LFSCK handles PFL file
db5661e LU-8998 pfl: enhance PFID EA for PFL
e61be5b LU-8998 docs: man pages for composite layout APIs
cebc79b LU-8054 lfsck: enhance lfsck notify API
12a130c LU-8050 osp: not use obdo::o_lcookie for non-onwire RPC data
b6dfd13 LU-8998 utils: enlarge default inode size
41bfc1e LU-8998 tests: test scripts for PFL
f50cc4e LU-8998 docs: man pages for tools of PFL
5a76aee LU-8998 lfs: user space tools for PFL
c4702b7 LU-8998 lustreapi: composite llapi_layout
fafe6b4 LU-8998 clio: getstripe support comp layout
e584b8f LU-8998 clio: Client side implementation for PFL
f3f6515 LU-8998 lov: add composite layout unpacking
8969392 LU-8998 lod: accomodate to composite layout
427ced3 LU-8998 pfl: Basic data structures for composite layout


 Comments   
Comment by Joseph Gmitter (Inactive) [ 11/Apr/17 ]

Hi Bobijam,

Can you look into these issues resulting from the PFL merge to master?

Thanks.
Joe

Comment by Gerrit Updater [ 11/Apr/17 ]

Bobi Jam (bobijam@hotmail.com) uploaded a new patch: https://review.whamcloud.com/26503
Subject: LU-9315 pfl: New static analysis issues
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 5e9431fcc79fc22a5df1158a9a5f55933043a4a6

Comment by Gerrit Updater [ 16/May/17 ]

Oleg Drokin (oleg.drokin@intel.com) merged in patch https://review.whamcloud.com/26503/
Subject: LU-9315 pfl: static analysis issues
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: a6d463ff0b018e902afe63801c8b2c1e9a92ddc2

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