[LU-10809] New static analysis issues in v2_9_52_0-160-gb8e26a7 Created: 03/Mar/17  Updated: 30/Aug/23  Resolved: 22/Nov/18

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

Type: Bug Priority: Major
Reporter: Dmitry Eremin (Inactive) Assignee: Sonia Sharma (Inactive)
Resolution: Fixed 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_9_52_0-160-gb8e26a7 (Review https://review.whamcloud.com/25739):

  1. Format String Vulnerability
    • libcfs/libcfs/util/parser.c: in Parser_list_commands, function 'snprintf' possibly accepts format string that may be influenced by user, causing format string vulnerability. Undefined string lengths can lead to buffer overflows and potential exploitation by attackers. Use a defined value for string lengths.
  2. Null pointer may be passed to function that may dereference it
    • lustre/mgc/mgc_request.c: in config_log_add, Null pointer 'sptlrpc_cld' that comes from line 315 may be passed to function and can be dereferenced there by passing argument 1 to function 'config_log_put' at line 419.
  3. Null pointer may be passed to function that may dereference it
    • lustre/mgc/mgc_request.c: in config_log_add, Null pointer 'nodemap_cld' that comes from line 317 may be passed to function and can be dereferenced there by passing argument 1 to function 'config_log_put' at line 416.
  4. Null pointer may be passed to function that may dereference it
    • lustre/mgc/mgc_request.c: in config_log_add, Null pointer 'params_cld' that comes from line 316 may be passed to function and can be dereferenced there by passing argument 1 to function 'config_log_put' at line 413.

The list of commits since the previous build v2_9_52_0-69-gabe6c0f:

b8e26a7 LU-9119 lnet: Fix deleting peers from YAML
5221f27 LU-9119 lnet: add enhanced statistics
94ffb03 LU-9119 lnet: selftest MR fix
53b58bd LU-9119 lnet: add "lnetctl discover"
2a02d85 LU-9077 lnet: fix for static analysis issues
690c1fa LU-9119 lnet: add "lnetctl ping" command
b19eb95 LU-9119 lnet: add "lnetctl peer list"
fefc90a LU-9119 lnet: implement Peer Discovery
88fe9c5 LU-9119 lnet: add the Push target
66e29c8 LU-9119 lnet: tune lnet_peer_discovery_enabled with lnetctl
2ec136f LU-9119 lnet: add discovery thread
99acff0 LU-9119 lnet: add msg_type to lnet_event
2eac5af LU-9119 lnet: reference counts on lnet_peer/lnet_peer_net
3e2f855 LU-9119 lnet: add LNET_PEER_CONFIGURED flag
7df2b83 LU-9119 lnet: preferred NIs for non-Multi-Rail peers
5bd8227 LU-9119 lnet: introduce LNET_PEER_MULTI_RAIL flag bit
5c6188c LU-9119 lnet: refactor lnet_add_peer_ni()
a985e73 LU-9119 lnet: refactor lnet_del_peer_ni()
672bb45 LU-9119 lnet: rename lnet_add/del_peer_ni_to/from_peer()
6b4d1d9 LU-9119 lnet: cleanup of lnet_peer_ni_addref/decref_locked()
3c304e7 LU-9119 lnet: add sanity checks on ping-related constants
7f76503 LU-9119 lnet: add LNET_PING_FEAT_MULTI_RAIL bit
b7a53fc LU-9119 lnet: automatic sizing of router pinger buffers
28b64af LU-9119 lnet: add struct lnet_ping_buffer
7111968 LU-9119 lnet: cleanup debug code
93ae383 LU-9119 lnet: configure lnet_max_interfaces tunable from dlc
2a49da0 LU-9119 lnet: add lnet_max_interfaces tunable
e2cb112 LU-9119 lnet: rename LNET_MAX_INTERFACES
bf042f5 LU-9119 lnet: loopback NID in lnet_select_pathway()
1e388c2 LU-9119 socklnd: propagate errors on send failure
7b782ce LU-9119 lnet: fix lnet shutdown race
70c7d3d LU-9057 lnet: fix static analysis issues
f548d1a LU-9118 o2iblnd: handle MOFED libcfs time api collision
147529f LU-8642 build: suppport building various OFED
1736c1b LU-9109 ldlm: restore missing newlines in ldlm sysfs files
cc39448 LU-8686 osd: add few more credits if debugging is enabled
29c434b LU-9132 utils: tuning max_sectors_kb on mount
11eda87 LU-9127 target: tgt_cb_last_committed is too noisy
0c8d53e LU-9116 libcfs: avoid overflow of crypto bandwidth caculation
592bb85 LU-4423 llite: use 64-bit times in another debug print
85aec75 LU-9103 tests: SKIP recovery-small/110g for old MDS versions
e53bbbc LU-9067 utils: ensure debugfs is mounted
ea57362 LU-8981 test: sanity 311 check is too strict
35a3f95 LU-8911 tests: sanity-hsm test_24d fails on a local setup
5571c9a LU-9038 obdclass: handle early requests vs CT registering
37cef58 LU-6210 mdd: Change positional struct initializers to C99
2789a4b LU-8403 obd: remove OBD_NOTIFY_SYNC {,_NONBLOCK}
d6604b4 LU-9019 obd: use 64-bit timestamps for rpc stats
824120d LU-9094 o2iblnd: kill timedout txs from ibp_tx_queue
dab78a9 LU-9094 lnet: remove ni from lnet_finalize
cd362fa LU-7441 nrs: Free hash table if failed to start a nrs policy
f913720 LU-8773 llite: refactor lov_object_fiemap()
8d27681 LU-8767 llite: Improve proc file text in lproc_llite.c
db99971 LU-9100 lnet: lctl net down success when lnet not loaded
40fe3cd LU-8703 libcfs: remove usless abstraction
ad8f669 LU-8888 clio: remove unused members from struct cl_thread_info
c152f7b LU-7670 mdt: allow changelog commands to return errors
1f58cac LU-9019 mdt: use 64-bit timestamps for rename stats
6e67953 LU-8560 build: announce linux kernel 4.6.7 support
dad9ce4 LU-9125 test: Correct setstripe -s option
2b16d2d LU-9123 test: correct setstripe options in layout test
603aa7a LU-9094 o2iblnd: reconnect peer for REJ_INVALID_SERVICE_ID
81e010d LU-9115 llite: buggy special handling on MULTIMODRPCS
540fcd2 LU-4423 mdc: use 64-bit timestamps for mdc
19f057c LU-9101 kernel: kernel update [SLES11 SP4 3.0.101-94]
adf08bd LU-8066 ldlm: move server side /proc/fs/lustre/ldlm to sysfs
9d13d28 LU-8947 test: fix getting OST name at sanity test_253
a1c8e27 LU-9125 utils: Postpone deprecation of some options.
57ba9de LU-9081 config: don't attach sub logs for LWP
723f400 LU-5170 utils: Add support for --list-commands option
70e9d4e LU-6210 utils: Change positional struct initializers to C99
e4761eb LU-6499 obdclass: obdclass module cleanup upon load error
3dc5a9f LU-8550 test: fix problems of conf-sanity test_32
d891911 LU-5969 lustreapi: allow "version" without "lustre:"
eecf886 LU-9059 utils: skip label check for client
04794b3 LU-8526 tests: ensure all OSTs active for allocations
05ad99f LU-6142 lnet: remove most of typedefs from LNet headers
1e42682 LU-9040 scrub: handle group boundary properly
a4bbf41 New tag 2.9.53
f03c8b1 LU-9032 tests: syntax error in cleanup_test32_mount
3403364 LU-8843 client: fix all less than 0 comparison for unsigned values
9ab8061 LU-9078 lnet: Fix route hops print
cfa981f LU-8974 osd-ldiskfs: increase supported ldiskfs fs size
d2c4033 LU-5620 ptlrpc: Add QoS for opcode in NRS-TBF
74d0cf9 LU-9019 osd: migrate osd-ldiskfs thandle stats to 64 bit time
ad0a085 LU-8702 tests: parallel execution of IOR and MDTEST added.
c39d13d LU-8066 obdclass: Get rid of remaining /proc/sys/lustre plumbing
b5c4f03 LU-9073 gss: quiet insecure key file warning
1196bd1 LU-8066 ldlm: move /proc/fs/lustre/ldlm to sysfs
4f3c451 LU-9029 kernel: kernel update [SLES12 SP2 4.4.38-93]
fe46b10 LU-8995 tests: set debug size correctly
c4e98d7 LU-4423 libcfs: remove IS_PO2 and __is_po2
fc117cc LU-6245 libcfs: replace IS_PO2 with is_power_of_2 in server code
abe6765 LU-8066 obdclass: move lustre server sysctl to sysfs
fcd92d6 LU-8928 osd: convert osd-zfs to reference dnode, not db
ce87359 LU-8769 lnet: removal of obsolete LNDs
1bec033 LU-9019 o2iblnd: use 64-bit ibn_incarnation computation
9018f11 LU-8457 pacemaker: Pacemaker script to monitor LNet
18c95c4 LU-8420 ldlm: take at_current change into account on prolong
8c5d216 LU-4121 tests: Enable zfs tests dependent on ost,mgs ordering
1d2fbad LU-1573 recovery: Avoid data corruption for DIO during FOFB
4bca07f LU-8979 ldlm: disable brw lock request in recovery
254aec0 LU-7734 gnilnd: update GNI lnd driver to handle multirail api changes
0308951 LU-9034 mgc: relate sptlrpc & params to MGC
66153d8 LU-9031 osd: handle jinode change for ldiskfs
62e77ea LU-9030 kernel: kernel update RHEL7.3 [3.10.0-514.6.1.el7]
c6f5e81 LU-8602 gss: Support GSS on linux 4.6+ kernels
8718346 LU-9033 llite: don't zero timestamps internally
0a9f9ab LU-8954 kernel: kernel update [SLES12 SP1 3.12.67-60.64.24]
1125aff LU-8903 tests: racer test_1 to drop all error messages
0bf8b39 LU-8865 tests: add fs_test test
80d5a0e LU-6210 gss: Change positional struct initializers to C99
587a25e LU-6210 lnet: Change positional struct initializers to C99
ed336c7 LU-9041 test: Add version check to sanity test_402
b29b9fb LU-8687 tests: list pool on mds when mgs is separate
a4c325b LU-7910 osd: do not lookup child objects in osd_dir_insert()
8126eb0 LU-8382 hsm: reorder coordinator's cleanup functions
3ef62a1 LU-6319 tests: Resume parallel-grouplock testing
6f56f71 LU-8972 osp: skip subsequent orphan cleanups
d1b4778 LU-9019 mdt: use ktime_t for calculating elapsed time
f431777 LU-6245 libcfs: use libcfs_private.h only for kernel space
6a81ffa LU-8411 ofd: handle last_rcvd file can't update properly
bfa1dbc LU-8900 mgs: use reference count for fs_db
8b98c8a LU-6455 tests: Re-enable replay-vbr and replay-single tests
db1ef0a LU-9045 osp: Revert "LU-8840 osp: handle EA cache properly"
e0e9ea6 LU-7734 lnet: multi-rail feature


 Comments   
Comment by Sonia Sharma (Inactive) [ 06/Mar/17 ]

The 4 static analysis issues in this ticket are not related to any changes with LU-9119. So should be in a different ticket that corresponds to the patches where these changes were made.

Also, I find the 2nd, 3rd and 4th issue are false positive.

The first issue can be addressed and think needs a separate ticket to track it per the patch where the change was made.

Comment by Andreas Dilger [ 10/Mar/18 ]

Is there a reason this ticket is in LDEV and not LU? It doesn't seem worse than any other static analysis issue.

Comment by Andreas Dilger [ 13/Mar/18 ]

I agree the #2, #3, #4 issues are invalid, as config_log_put() checks for a NULL argument.

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