[LU-11021] New static analysis issues in v2_11_51_0-59-g782ff36 Created: 15/May/18  Updated: 30/Aug/23  Resolved: 23/Jul/18

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

Type: Bug Priority: Major
Reporter: Dmitry Eremin (Inactive) Assignee: Sonia Sharma (Inactive)
Resolution: Not a Bug Votes: 0
Labels: kw

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

 Description   

Found 4 new static analysis issues in v2_11_51_0-59-g782ff36:

  1. Null pointer may be passed to function that may dereference it
    • lnet/utils/lnetctl.c: in jt_del_peer_nid, Null pointer 'nids' that comes from line 1366 may be passed to function and can be dereferenced there by passing argument 2 to function 'lustre_lnet_del_peer_nid' at line 1431.
  2. Result of function that can return NULL may be dereferenced
    • lnet/utils/lnetconfig/liblnetconfig.c: in lustre_lnet_parse_nids, Pointer 'comma' returned from call to function 'get_next_delimiter_in_nid' at line 303 may be NULL and may be dereferenced at line 303.
  3. Uninitialized Array
    • lnet/utils/lnetconfig/liblnetconfig.c: in lnet_expr2ips, 'ip_range' array elements are used uninitialized in this function.
  4. Null pointer may be passed to function that may dereference it
    • lnet/utils/lnetctl.c: in jt_add_peer_nid, Null pointer 'nids' that comes from line 1272 may be passed to function and can be dereferenced there by passing argument 2 to function 'lustre_lnet_config_peer_nid' at line 1344.

The list of commits since the previous build v2_11_51_0-0-g68add0d:

782ff36 LU-10805 libcfs: timer_setup() API changes
afd9e3c LU-10560 llite: remove assigning f_version in ll_readir.
f7c3540 LU-10988 lfsck: load object attr when prepare LFSCK request
1cabcb4 LU-10944 kernel: kernel update [SLES12 SP3 4.4.126-94.22]
f3157cb LU-10924 tests: conf-sanity test_116 server version check
8036c16 LU-10560 osd: bi_bdev is replaced by bi_disk
86295a2 LU-10857 tests: allow to disable project quotas
0c94b23 LU-4423 ptlrpc: use workqueue for pinger
4031b88 LU-8066 mdc: move mdc-specific procfs files to sysfs
6d2b66d LU-8066 fld: move all files from procfs to debugfs
b51e8d6 LU-9857 lmv: dir page is released while in use
9d49453 LU-7763 tests: improve sanityn 33d
6b8638b LU-10992 llite: decrease sa_running if fail to start statahead
ee9a90e LU-10900 osd: wrong assertion in osd_transfer_project
e2cac9f LU-1644 ptlrpc: fix return type of boolean functions
37932c4 LU-10175 ldlm: IBITS lock convert instead of cancel
6a39600 LU-10985 mdt: properly handle unknown intent requests
212e35b LU-10575 build: make lustre-test dpkg depend on mpi-default-dev
69727e4 LU-10413 ldlm: expose dirty age limit for flush-on-glimpse
6f8d0e2 LU-8837 obd: remove linux directory
8d26553 LU-10922 osd-zfs: return -ENOENT if object destoryed
99cc32b LU-10902 mdd: force disable changelogs early and safely
9b5337b LU-10850 fld: handle empty ranges in fld_index_init()
6c617a3 LU-10856 tests: remove deprecated lfs getstripe -M usage
da028f9 LU-10805 ldlm: convert ACCESS_ONCE() to READ_ONCE()
8020bf0 LU-10838 tests: replay-single/89 to wait for recovery
39d7f8a LU-10624 tests: conf-sanity needs larger ZFS filesystems
3c90091 LU-8066 lov: Move suitable variables from procfs to sysfs
d76e96c LU-8066 lmv: Move suitable entries from procfs to sysfs
c99b645 LU-8293 lnet: Add insserv header to lnet init script
9776609 LU-10932 libcfs: properly handle failure cases in SMP code
b99344d LU-6349 mds: remove obsolete MDS_VTX_BYPASS flag
14b9859 LU-4684 ptlrpc: add dir migration connect flag
fdb5d3d LU-9019 libcfs: remove the remaining cfs_time wrappers
21501de LU-9780 tests: Testing Round-Robin allocation
471c796 LU-3665 tests: Cleanup echo client after obdfilter-survey
c1d465d LU-6655 ptlrpc: skip delayed replay requests
a0c644f LU-1644 mgc: remove obsolete IR swabbing workaround
51c11d7 LU-10910 mdd: deny layout swap for DoM file
9ac477c LU-10909 utils: enable non-shared libmount_utils_ldiskfs.a
e36d3aa LU-930 doc: include status in "lfs df" man page
8878bab LU-10903 obdecho: use OBD_ALLOC_LARGE for lnb
457e36a LU-10886 build: fix warnings during autoconf
04c4b9c LU-8200 test: improve sanityn.sh 33c
9bc0d83 LU-10699 hsm: simplify mdt_hsm_ {add,get}

_actions()

32fb31f LU-8066 osc: move suitable values from procfs to sysfs
b79a2cc LU-2711 tests: conf-sanity clean up environment in test
9724df2 LU-5170 lfs: Standardize error messages in lfs_path2fid()
eb48930 LU-5170 lfs: Standardize error messages in lfs_fid2path()
a92ac52 LU-5170 lfs: Standardize error messages in lfs_data_version()
70c9545 LU-10825 lnet: add ip2nets syntax handling for peer
4c5f788 LU-10825 libcfs: generate ip addresses
05a3653 LU-8066 ldlm: move all remaining files from procfs to debugfs
f2d5622 LU-8066 mgc: migrate away from procfs
9514d54 LU-5170 lfs: Standardize llapi messages for lfs_find()
58a4c59 LU-5170 lfs: Standardize error messages in lfs_mv()
b1870a1 LU-5170 lfs: Standardize error messages in set_time()
235e8de LU-10214 lnet: allow expressions for route config
81af3db LU-10926 llite: avoid panic in ll_set_acl()


 Comments   
Comment by Sonia Sharma (Inactive) [ 18/May/18 ]

All the above 4 issues are false positive .

1 and 4 are similar and even if nids=NULL, then the call to lustre_lnet_parse_nids returns first making ti go to "failed". So the call to lustre_lnet_del_peer_nid or lustre_lnet_config_peer_nid would never have nids=NULL.

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