Fixed findings
List of Findings
Error: SHELLCHECK_WARNING (CWE-457): [#def1]
/usr/bin/blkdeactivate:151:23: warning[SC2154]: kname is referenced but not assigned (did you mean 'xname'?).
Error: SHELLCHECK_WARNING (CWE-457): [#def2]
/usr/bin/blkdeactivate:168:11: warning[SC2154]: mnt is referenced but not assigned.
Error: SHELLCHECK_WARNING (CWE-457): [#def3]
/usr/bin/blkdeactivate:171:35: warning[SC2154]: name is referenced but not assigned (did you mean 'xname'?).
Error: SHELLCHECK_WARNING (CWE-457): [#def4]
/usr/bin/blkdeactivate:187:8: warning[SC2154]: devtype is referenced but not assigned.
Error: SHELLCHECK_WARNING (CWE-140): [#def5]
/usr/bin/lvm_import_vdo:207:19: warning[SC2207]: Prefer mapfile or read -a to split command output (or quote to avoid splitting).
Error: SHELLCHECK_WARNING (CWE-140): [#def6]
/usr/bin/lvm_import_vdo:225:12: warning[SC2207]: Prefer mapfile or read -a to split command output (or quote to avoid splitting).
Error: SHELLCHECK_WARNING: [#def7]
/usr/bin/lvmdump:133:8: warning[SC2294]: eval negates the benefit of arrays. Drop eval to preserve whitespace/symbols (or eval as string).
Error: SHELLCHECK_WARNING (CWE-140): [#def8]
/usr/bin/lvmpersist:171:9: warning[SC2207]: Prefer mapfile or read -a to split command output (or quote to avoid splitting).
Error: SHELLCHECK_WARNING (CWE-670): [#def9]
/usr/bin/lvmpersist:856:13: warning[SC2128]: Expanding an array without an index only gives the first element.
Error: SHELLCHECK_WARNING (CWE-140): [#def10]
/usr/bin/lvmpersist:1379:12: warning[SC2207]: Prefer mapfile or read -a to split command output (or quote to avoid splitting).
Error: SHELLCHECK_WARNING (CWE-670): [#def11]
/usr/bin/lvmpersist:1386:15: warning[SC2128]: Expanding an array without an index only gives the first element.
Error: GCC_ANALYZER_WARNING (CWE-775): [#def12]
LVM2.2.03.38/daemons/dmeventd/dmeventd.c:2487:13: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘dup2(open("/dev/null", 2), 0)’
LVM2.2.03.38/daemons/dmeventd/dmeventd.c:2441:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/daemons/dmeventd/dmeventd.c:2445:9: branch_false: ...to here
LVM2.2.03.38/daemons/dmeventd/dmeventd.c:2479:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/daemons/dmeventd/dmeventd.c:2482:9: branch_false: ...to here
LVM2.2.03.38/daemons/dmeventd/dmeventd.c:2484:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/daemons/dmeventd/dmeventd.c:2487:12: branch_false: ...to here
LVM2.2.03.38/daemons/dmeventd/dmeventd.c:2487:12: branch_true: following ‘true’ branch...
LVM2.2.03.38/daemons/dmeventd/dmeventd.c:2487:44: branch_true: ...to here
LVM2.2.03.38/daemons/dmeventd/dmeventd.c:2487:44: acquire_resource: opened here
LVM2.2.03.38/daemons/dmeventd/dmeventd.c:2487:13: danger: ‘dup2(open("/dev/null", 2), 0)’ leaks here; was opened at [(11)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/10)
Error: GCC_ANALYZER_WARNING (CWE-775): [#def13]
LVM2.2.03.38/daemons/dmeventd/dmeventd.c:2487:13: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/null", 2)’
LVM2.2.03.38/daemons/dmeventd/dmeventd.c:2441:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/daemons/dmeventd/dmeventd.c:2445:9: branch_false: ...to here
LVM2.2.03.38/daemons/dmeventd/dmeventd.c:2479:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/daemons/dmeventd/dmeventd.c:2482:9: branch_false: ...to here
LVM2.2.03.38/daemons/dmeventd/dmeventd.c:2484:24: acquire_resource: opened here
LVM2.2.03.38/daemons/dmeventd/dmeventd.c:2484:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/daemons/dmeventd/dmeventd.c:2487:12: branch_false: ...to here
LVM2.2.03.38/daemons/dmeventd/dmeventd.c:2488:13: branch_false: following ‘false’ branch...
LVM2.2.03.38/daemons/dmeventd/dmeventd.c:2487:13: branch_false: ...to here
LVM2.2.03.38/daemons/dmeventd/dmeventd.c:2487:13: danger: ‘open("/dev/null", 2)’ leaks here; was opened at [(7)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/6)
Error: GCC_ANALYZER_WARNING (CWE-775): [#def14]
LVM2.2.03.38/daemons/dmeventd/dmeventd.c:2488:13: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘dup2(open("/dev/null", 2), 1)’
LVM2.2.03.38/daemons/dmeventd/dmeventd.c:2441:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/daemons/dmeventd/dmeventd.c:2445:9: branch_false: ...to here
LVM2.2.03.38/daemons/dmeventd/dmeventd.c:2479:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/daemons/dmeventd/dmeventd.c:2482:9: branch_false: ...to here
LVM2.2.03.38/daemons/dmeventd/dmeventd.c:2484:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/daemons/dmeventd/dmeventd.c:2487:12: branch_false: ...to here
LVM2.2.03.38/daemons/dmeventd/dmeventd.c:2488:45: acquire_resource: opened here
LVM2.2.03.38/daemons/dmeventd/dmeventd.c:2488:13: danger: ‘dup2(open("/dev/null", 2), 1)’ leaks here; was opened at [(9)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/8)
Error: GCC_ANALYZER_WARNING (CWE-775): [#def15]
LVM2.2.03.38/daemons/dmeventd/dmeventd.c:2489:13: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘dup2(open("/dev/null", 2), 2)’
LVM2.2.03.38/daemons/dmeventd/dmeventd.c:2441:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/daemons/dmeventd/dmeventd.c:2445:9: branch_false: ...to here
LVM2.2.03.38/daemons/dmeventd/dmeventd.c:2479:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/daemons/dmeventd/dmeventd.c:2482:9: branch_false: ...to here
LVM2.2.03.38/daemons/dmeventd/dmeventd.c:2484:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/daemons/dmeventd/dmeventd.c:2487:12: branch_false: ...to here
LVM2.2.03.38/daemons/dmeventd/dmeventd.c:2487:13: branch_false: following ‘false’ branch...
LVM2.2.03.38/daemons/dmeventd/dmeventd.c:2487:13: branch_false: ...to here
LVM2.2.03.38/daemons/dmeventd/dmeventd.c:2489:45: acquire_resource: opened here
LVM2.2.03.38/daemons/dmeventd/dmeventd.c:2489:13: danger: ‘dup2(open("/dev/null", 2), 2)’ leaks here; was opened at [(11)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/10)
Error: GCC_ANALYZER_WARNING (CWE-775): [#def16]
LVM2.2.03.38/daemons/dmeventd/dmeventd.c:2490:20: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/null", 2)’
LVM2.2.03.38/daemons/dmeventd/dmeventd.c:2441:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/daemons/dmeventd/dmeventd.c:2445:9: branch_false: ...to here
LVM2.2.03.38/daemons/dmeventd/dmeventd.c:2479:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/daemons/dmeventd/dmeventd.c:2482:9: branch_false: ...to here
LVM2.2.03.38/daemons/dmeventd/dmeventd.c:2484:24: acquire_resource: opened here
LVM2.2.03.38/daemons/dmeventd/dmeventd.c:2484:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/daemons/dmeventd/dmeventd.c:2487:12: branch_false: ...to here
LVM2.2.03.38/daemons/dmeventd/dmeventd.c:2490:20: danger: ‘open("/dev/null", 2)’ leaks here; was opened at [(7)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/6)
Error: GCC_ANALYZER_WARNING (CWE-775): [#def17]
LVM2.2.03.38/daemons/dmeventd/dmeventd.c:2496:12: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/null", 2)’
LVM2.2.03.38/daemons/dmeventd/dmeventd.c:2441:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/daemons/dmeventd/dmeventd.c:2445:9: branch_false: ...to here
LVM2.2.03.38/daemons/dmeventd/dmeventd.c:2479:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/daemons/dmeventd/dmeventd.c:2482:9: branch_false: ...to here
LVM2.2.03.38/daemons/dmeventd/dmeventd.c:2484:24: acquire_resource: opened here
LVM2.2.03.38/daemons/dmeventd/dmeventd.c:2484:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/daemons/dmeventd/dmeventd.c:2487:12: branch_false: ...to here
LVM2.2.03.38/daemons/dmeventd/dmeventd.c:2487:13: branch_false: following ‘false’ branch...
LVM2.2.03.38/daemons/dmeventd/dmeventd.c:2487:13: branch_false: ...to here
LVM2.2.03.38/daemons/dmeventd/dmeventd.c:2489:13: branch_false: following ‘false’ branch...
LVM2.2.03.38/daemons/dmeventd/dmeventd.c:2496:12: branch_false: ...to here
LVM2.2.03.38/daemons/dmeventd/dmeventd.c:2496:12: danger: ‘open("/dev/null", 2)’ leaks here; was opened at [(7)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/6)
Error: GCC_ANALYZER_WARNING (CWE-686): [#def18]
LVM2.2.03.38/daemons/lvmlockd/lvmlockctl.c:123:38: warning[-Wanalyzer-va-arg-type-mismatch]: ‘va_arg’ expected ‘int *’ but received ‘long unsigned int’ for variadic argument 1 of ‘args’
LVM2.2.03.38/daemons/lvmlockd/lvmlockctl.c:698:12: enter_function: entry to ‘do_dump’
LVM2.2.03.38/daemons/lvmlockd/lvmlockctl.c:705:14: call_function: calling ‘setup_dump_socket’ from ‘do_dump’
LVM2.2.03.38/daemons/lvmlockd/lvmlockctl.c:705:14: return_function: returning to ‘do_dump’ from ‘setup_dump_socket’
LVM2.2.03.38/daemons/lvmlockd/lvmlockctl.c:706:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/daemons/lvmlockd/lvmlockctl.c:711:17: branch_false: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockctl.c:713:12: branch_false: following ‘false’ branch (when ‘<unknown> == 0’)...
LVM2.2.03.38/daemons/lvmlockd/lvmlockctl.c:713:12: branch_false: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockctl.c:729:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/daemons/lvmlockd/lvmlockctl.c:732:9: branch_false: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockctl.c:737:12: branch_false: following ‘false’ branch (when ‘rv >= 0’)...
LVM2.2.03.38/daemons/lvmlockd/lvmlockctl.c:742:9: branch_false: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockctl.c:749:13: branch_false: following ‘false’ branch (when the strings are non-equal)...
LVM2.2.03.38/daemons/lvmlockd/lvmlockctl.c:752:17: branch_false: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockctl.c:752:17: call_function: calling ‘format_info’ from ‘do_dump’
Error: GCC_ANALYZER_WARNING (CWE-686): [#def19]
LVM2.2.03.38/daemons/lvmlockd/lvmlockctl.c:137:47: warning[-Wanalyzer-va-arg-type-mismatch]: ‘va_arg’ expected ‘unsigned int *’ but received ‘long unsigned int’ for variadic argument 1 of ‘args’
LVM2.2.03.38/daemons/lvmlockd/lvmlockctl.c:698:12: enter_function: entry to ‘do_dump’
LVM2.2.03.38/daemons/lvmlockd/lvmlockctl.c:705:14: call_function: calling ‘setup_dump_socket’ from ‘do_dump’
LVM2.2.03.38/daemons/lvmlockd/lvmlockctl.c:705:14: return_function: returning to ‘do_dump’ from ‘setup_dump_socket’
LVM2.2.03.38/daemons/lvmlockd/lvmlockctl.c:706:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/daemons/lvmlockd/lvmlockctl.c:711:17: branch_false: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockctl.c:713:12: branch_false: following ‘false’ branch (when ‘<unknown> == 0’)...
LVM2.2.03.38/daemons/lvmlockd/lvmlockctl.c:713:12: branch_false: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockctl.c:729:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/daemons/lvmlockd/lvmlockctl.c:732:9: branch_false: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockctl.c:737:12: branch_false: following ‘false’ branch (when ‘rv >= 0’)...
LVM2.2.03.38/daemons/lvmlockd/lvmlockctl.c:742:9: branch_false: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockctl.c:749:13: branch_false: following ‘false’ branch (when the strings are non-equal)...
LVM2.2.03.38/daemons/lvmlockd/lvmlockctl.c:752:17: branch_false: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockctl.c:752:17: call_function: calling ‘format_info’ from ‘do_dump’
Error: GCC_ANALYZER_WARNING: [#def20]
LVM2.2.03.38/daemons/lvmlockd/lvmlockctl.c:828:13: warning[-Wanalyzer-fd-use-without-check]: ‘dup2’ on possibly invalid file descriptor ‘fd’
LVM2.2.03.38/daemons/lvmlockd/lvmlockctl.c:818:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/daemons/lvmlockd/lvmlockctl.c:823:13: branch_false: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockctl.c:823:13: release_resource: closed here
LVM2.2.03.38/daemons/lvmlockd/lvmlockctl.c:823:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/daemons/lvmlockd/lvmlockctl.c:828:13: branch_false: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockctl.c:828:13: danger: ‘fd’ could be invalid
Error: GCC_ANALYZER_WARNING: [#def21]
LVM2.2.03.38/daemons/lvmlockd/lvmlockctl.c:936:26: warning[-Wanalyzer-fd-use-without-check]: ‘dup2’ on possibly invalid file descriptor ‘1’
LVM2.2.03.38/daemons/lvmlockd/lvmlockctl.c:846:13: enter_function: entry to ‘_run_command_pipe’
LVM2.2.03.38/daemons/lvmlockd/lvmlockctl.c:859:21: branch_true: following ‘true’ branch (when ‘i != 33’)...
LVM2.2.03.38/daemons/lvmlockd/lvmlockctl.c:860:17: branch_true: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockctl.c:907:12: branch_false: following ‘false’ branch (when ‘arg_len == 0’)...
LVM2.2.03.38/daemons/lvmlockd/lvmlockctl.c:915:13: branch_false: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockctl.c:915:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/daemons/lvmlockd/lvmlockctl.c:920:15: branch_false: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockctl.c:922:12: branch_false: following ‘false’ branch (when ‘pid >= 0’)...
LVM2.2.03.38/daemons/lvmlockd/lvmlockctl.c:928:12: branch_false: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockctl.c:928:12: branch_true: following ‘true’ branch (when ‘pid == 0’)...
LVM2.2.03.38/daemons/lvmlockd/lvmlockctl.c:930:22: branch_true: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockctl.c:930:22: call_function: calling ‘_reopen_fd_to_null’ from ‘_run_command_pipe’
LVM2.2.03.38/daemons/lvmlockd/lvmlockctl.c:930:22: return_function: returning to ‘_run_command_pipe’ from ‘_reopen_fd_to_null’
LVM2.2.03.38/daemons/lvmlockd/lvmlockctl.c:930:20: branch_false: following ‘false’ branch...
LVM2.2.03.38/daemons/lvmlockd/lvmlockctl.c:932:26: branch_false: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockctl.c:932:25: branch_false: following ‘false’ branch...
LVM2.2.03.38/daemons/lvmlockd/lvmlockctl.c:934:26: branch_false: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockctl.c:934:26: release_resource: closed here
LVM2.2.03.38/daemons/lvmlockd/lvmlockctl.c:934:25: branch_false: following ‘false’ branch...
LVM2.2.03.38/daemons/lvmlockd/lvmlockctl.c:936:26: branch_false: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockctl.c:936:26: danger: ‘1’ could be invalid
Error: COMPILER_WARNING: [#def22]
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c: scope_hint: In function ‘clear_locks’
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:2548:13: warning[-Wunused-but-set-variable=]: variable ‘lk_count’ set but not used
Error: COMPILER_WARNING: [#def23]
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c: scope_hint: In function ‘lockspace_thread_main’
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:3374:9: warning[-Wstringop-truncation]: ‘strncpy’ specified bound 65 equals destination size
Error: COMPILER_WARNING: [#def24]
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c: scope_hint: In function ‘worker_thread_main’
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7072:17: warning[-Wstringop-truncation]: ‘strncpy’ output may be truncated copying 64 bytes from a string of length 64
Error: GCC_ANALYZER_WARNING (CWE-121): [#def25]
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-internal.h:304:9: warning[-Wanalyzer-out-of-bounds]: stack-based buffer overflow
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:6342:13: enter_function: entry to ‘adopt_locks’
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:6362:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:6371:33: branch_false: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:6373:20: branch_false: following ‘false’ branch...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:6377:37: branch_false: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:6383:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:6392:14: branch_false: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:6392:14: call_function: calling ‘read_adopt_file’ from ‘adopt_locks’
Error: GCC_ANALYZER_WARNING (CWE-126): [#def26]
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-internal.h:315:9: warning[-Wanalyzer-out-of-bounds]: stack-based buffer over-read
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:6342:13: enter_function: entry to ‘adopt_locks’
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:6362:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:6371:33: branch_false: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:6373:20: branch_false: following ‘false’ branch...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:6377:37: branch_false: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:6383:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:6392:14: branch_false: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:6392:14: call_function: calling ‘read_adopt_file’ from ‘adopt_locks’
Error: COMPILER_WARNING: [#def27]
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-sanlock.c: scope_hint: In function ‘lm_init_vg_sanlock’
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-sanlock.c:723:13: warning[-Wunused-but-set-variable=]: variable ‘i’ set but not used
Error: COMPILER_WARNING: [#def28]
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-sanlock.c: scope_hint: In function ‘lm_rename_vg_sanlock’
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-sanlock.c:1108:13: warning[-Wunused-but-set-variable=]: variable ‘i’ set but not used
Error: GCC_ANALYZER_WARNING (CWE-126): [#def29]
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-sanlock.c:1728:25: warning[-Wanalyzer-out-of-bounds]: stack-based buffer over-read
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-sanlock.c:1625:5: enter_function: entry to ‘lm_prepare_lockspace_sanlock’
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-sanlock.c:1661:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-sanlock.c:1666:14: branch_false: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-sanlock.c:1666:14: call_function: calling ‘lockd_lockargs_get_locklv’ from ‘lm_prepare_lockspace_sanlock’
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-sanlock.c:1666:14: return_function: returning to ‘lm_prepare_lockspace_sanlock’ from ‘lockd_lockargs_get_locklv’
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-sanlock.c:1667:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-sanlock.c:1674:20: branch_false: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-sanlock.c:1674:20: call_function: calling ‘build_dm_path’ from ‘lm_prepare_lockspace_sanlock’
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-sanlock.c:1674:20: return_function: returning to ‘lm_prepare_lockspace_sanlock’ from ‘build_dm_path’
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-sanlock.c:1674:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-sanlock.c:1689:9: branch_false: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-sanlock.c:1692:12: branch_false: following ‘false’ branch (when ‘rv >= 0’)...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-sanlock.c:1699:14: branch_false: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-sanlock.c:1706:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-sanlock.c:1713:15: call_function: inlined call to ‘zalloc’ from ‘lm_prepare_lockspace_sanlock’
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-sanlock.c:1714:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-sanlock.c:1719:9: branch_false: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-sanlock.c:1726:12: branch_true: following ‘true’ branch...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-sanlock.c:1727:22: branch_true: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-sanlock.c:1727:20: branch_true: following ‘true’ branch...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-sanlock.c:1728:25: branch_true: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-sanlock.c:1728:25: danger: out-of-bounds read from byte 49 till byte 63 but ‘lsname’ ends at byte 49
Error: GCC_ANALYZER_WARNING (CWE-775): [#def30]
LVM2.2.03.38/daemons/lvmpolld/lvmpolld-core.c:414:20: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘dup2(outfd, 1)’
LVM2.2.03.38/daemons/lvmpolld/lvmpolld-core.c:388:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/daemons/lvmpolld/lvmpolld-core.c:393:14: branch_false: ...to here
LVM2.2.03.38/daemons/lvmpolld/lvmpolld-core.c:393:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/daemons/lvmpolld/lvmpolld-core.c:410:12: branch_true: following ‘true’ branch (when ‘r == 0’)...
LVM2.2.03.38/daemons/lvmpolld/lvmpolld-core.c:414:22: branch_true: ...to here
LVM2.2.03.38/daemons/lvmpolld/lvmpolld-core.c:414:22: acquire_resource: opened here
LVM2.2.03.38/daemons/lvmpolld/lvmpolld-core.c:414:20: danger: ‘dup2(outfd, 1)’ leaks here; was opened at [(7)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/6)
Error: GCC_ANALYZER_WARNING (CWE-775): [#def31]
LVM2.2.03.38/daemons/lvmpolld/lvmpolld-core.c:414:21: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘dup2(errfd, 2)’
LVM2.2.03.38/daemons/lvmpolld/lvmpolld-core.c:388:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/daemons/lvmpolld/lvmpolld-core.c:393:14: branch_false: ...to here
LVM2.2.03.38/daemons/lvmpolld/lvmpolld-core.c:393:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/daemons/lvmpolld/lvmpolld-core.c:410:12: branch_true: following ‘true’ branch (when ‘r == 0’)...
LVM2.2.03.38/daemons/lvmpolld/lvmpolld-core.c:414:22: branch_true: ...to here
LVM2.2.03.38/daemons/lvmpolld/lvmpolld-core.c:414:20: branch_false: following ‘false’ branch...
LVM2.2.03.38/daemons/lvmpolld/lvmpolld-core.c:415:22: branch_false: ...to here
LVM2.2.03.38/daemons/lvmpolld/lvmpolld-core.c:415:22: acquire_resource: opened here
LVM2.2.03.38/daemons/lvmpolld/lvmpolld-core.c:414:21: danger: ‘dup2(errfd, 2)’ leaks here; was opened at [(9)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/8)
Error: GCC_ANALYZER_WARNING (CWE-775): [#def32]
LVM2.2.03.38/daemons/lvmpolld/lvmpolld-data-utils.c:401:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor
LVM2.2.03.38/daemons/lvmpolld/lvmpolld-data-utils.c:331:30: enter_function: entry to ‘lvmpolld_thread_data_constructor’
LVM2.2.03.38/daemons/lvmpolld/lvmpolld-data-utils.c:334:12: branch_false: following ‘false’ branch (when ‘data’ is non-NULL)...
LVM2.2.03.38/daemons/lvmpolld/lvmpolld-data-utils.c:337:9: branch_false: ...to here
LVM2.2.03.38/daemons/lvmpolld/lvmpolld-data-utils.c:343:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/daemons/lvmpolld/lvmpolld-data-utils.c:343:41: branch_false: ...to here
LVM2.2.03.38/daemons/lvmpolld/lvmpolld-data-utils.c:343:13: branch_true: following ‘true’ branch...
LVM2.2.03.38/daemons/lvmpolld/lvmpolld-data-utils.c:344:17: branch_true: ...to here
LVM2.2.03.38/daemons/lvmpolld/lvmpolld-data-utils.c:344:17: call_function: calling ‘lvmpolld_thread_data_destroy’ from ‘lvmpolld_thread_data_constructor’
Error: CPPCHECK_WARNING (CWE-457): [#def33]
LVM2.2.03.38/device_mapper/ioctl/libdm-iface.c:814: error[legacyUninitvar]: Uninitialized variable: names1
Error: COMPILER_WARNING: [#def34]
LVM2.2.03.38/lib/activate/dev_manager.c: scope_hint: In function ‘add_areas_line’
LVM2.2.03.38/lib/activate/dev_manager.c:3031:18: warning[-Wunused-but-set-variable=]: variable ‘num_existing_areas’ set but not used
Error: CPPCHECK_WARNING (CWE-476): [#def35]
LVM2.2.03.38/lib/cache/lvmcache.c:298: warning[nullPointer]: Possible null pointer dereference: vgname
Error: GCC_ANALYZER_WARNING (CWE-401): [#def36]
LVM2.2.03.38/lib/cache/lvmcache.c:2035:12: warning[-Wanalyzer-malloc-leak]: leak of ‘strdup(lock_type)’
LVM2.2.03.38/lib/cache/lvmcache.c:2086:5: enter_function: entry to ‘lvmcache_update_vgname_and_id’
LVM2.2.03.38/lib/cache/lvmcache.c:2116:14: call_function: calling ‘_lvmcache_update_vgname’ from ‘lvmcache_update_vgname_and_id’
LVM2.2.03.38/lib/cache/lvmcache.c:2116:14: return_function: returning to ‘lvmcache_update_vgname_and_id’ from ‘_lvmcache_update_vgname’
LVM2.2.03.38/lib/cache/lvmcache.c:2116:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/lib/cache/lvmcache.c:2125:14: branch_false: ...to here
LVM2.2.03.38/lib/cache/lvmcache.c:2125:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/lib/cache/lvmcache.c:2139:14: branch_false: ...to here
LVM2.2.03.38/lib/cache/lvmcache.c:2159:17: branch_false: following ‘false’ branch...
LVM2.2.03.38/lib/cache/lvmcache.c:2162:14: branch_false: ...to here
LVM2.2.03.38/lib/cache/lvmcache.c:2162:12: branch_true: following ‘true’ branch...
LVM2.2.03.38/lib/cache/lvmcache.c:2163:39: branch_true: ...to here
LVM2.2.03.38/lib/cache/lvmcache.c:2181:12: branch_false: following ‘false’ branch (when ‘vginfo’ is non-NULL)...
LVM2.2.03.38/lib/cache/lvmcache.c:2184:14: branch_false: ...to here
LVM2.2.03.38/lib/cache/lvmcache.c:2184:12: branch_true: following ‘true’ branch...
LVM2.2.03.38/lib/cache/lvmcache.c:2185:33: branch_true: ...to here
LVM2.2.03.38/lib/cache/lvmcache.c:2247:14: call_function: calling ‘_lvmcache_update_vgstatus’ from ‘lvmcache_update_vgname_and_id’
Error: GCC_ANALYZER_WARNING (CWE-835): [#def37]
LVM2.2.03.38/lib/device/dev-type.c:288:24: warning[-Wanalyzer-infinite-loop]: infinite loop
LVM2.2.03.38/lib/device/dev-type.c:288:24: danger: infinite loop here
LVM2.2.03.38/lib/device/dev-type.c:288:24: branch_true: if it ever follows ‘true’ branch, it will always do so...
LVM2.2.03.38/lib/device/dev-type.c:289:25: branch_true: ...to here
Error: COMPILER_WARNING: [#def38]
LVM2.2.03.38/lib/device/persist.c: scope_hint: In function ‘persist_start_extend’
LVM2.2.03.38/lib/device/persist.c:2323:13: warning[-Wunused-but-set-variable=]: variable ‘y’ set but not used
Error: GCC_ANALYZER_WARNING (CWE-401): [#def39]
LVM2.2.03.38/lib/label/hints.c:859:17: warning[-Wanalyzer-malloc-leak]: leak of ‘calloc(1, 4288)’
LVM2.2.03.38/lib/label/hints.c:691:12: enter_function: entry to ‘_read_hint_file’
LVM2.2.03.38/lib/label/hints.c:713:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/lib/label/hints.c:716:9: branch_false: ...to here
LVM2.2.03.38/lib/label/hints.c:718:21: branch_true: following ‘true’ branch (when ‘i != 4’)...
LVM2.2.03.38/lib/label/hints.c:719:17: branch_true: ...to here
LVM2.2.03.38/lib/label/hints.c:721:16: branch_true: following ‘true’ branch...
LVM2.2.03.38/lib/label/hints.c:722:17: branch_true: ...to here
LVM2.2.03.38/lib/label/hints.c:726:20: branch_false: following ‘false’ branch (when ‘p’ is NULL)...
LVM2.2.03.38/lib/label/hints.c:740:22: branch_false: ...to here
LVM2.2.03.38/lib/label/hints.c:740:20: branch_false: following ‘false’ branch...
LVM2.2.03.38/lib/label/hints.c:757:22: branch_false: ...to here
LVM2.2.03.38/lib/label/hints.c:757:20: branch_false: following ‘false’ branch...
LVM2.2.03.38/lib/label/hints.c:770:22: branch_false: ...to here
LVM2.2.03.38/lib/label/hints.c:770:20: branch_false: following ‘false’ branch...
LVM2.2.03.38/lib/label/hints.c:783:22: branch_false: ...to here
LVM2.2.03.38/lib/label/hints.c:783:20: branch_false: following ‘false’ branch...
LVM2.2.03.38/lib/label/hints.c:795:22: branch_false: ...to here
LVM2.2.03.38/lib/label/hints.c:795:20: branch_false: following ‘false’ branch...
LVM2.2.03.38/lib/label/hints.c:814:22: branch_false: ...to here
LVM2.2.03.38/lib/label/hints.c:814:20: branch_false: following ‘false’ branch...
LVM2.2.03.38/lib/label/hints.c:827:21: branch_false: ...to here
LVM2.2.03.38/lib/label/hints.c:827:20: branch_false: following ‘false’ branch...
LVM2.2.03.38/lib/label/hints.c:830:21: branch_false: ...to here
LVM2.2.03.38/lib/label/hints.c:830:20: branch_false: following ‘false’ branch...
LVM2.2.03.38/lib/label/hints.c:833:17: branch_false: ...to here
LVM2.2.03.38/lib/label/hints.c:853:36: call_function: inlined call to ‘zalloc’ from ‘_read_hint_file’
LVM2.2.03.38/lib/label/hints.c:853:20: branch_false: following ‘false’ branch...
LVM2.2.03.38/lib/label/hints.c:857:17: branch_false: ...to here
LVM2.2.03.38/lib/label/hints.c:859:17: danger: ‘calloc(1, 4288)’ leaks here; was allocated at [(28)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/27)
Error: COMPILER_WARNING: [#def40]
LVM2.2.03.38/lib/metadata/integrity_manip.c:535:38: warning[-Wunused-but-set-variable=]: variable ‘lbs_unknown’ set but not used
Error: COMPILER_WARNING: [#def41]
LVM2.2.03.38/lib/metadata/integrity_manip.c: scope_hint: In function ‘lv_add_integrity_to_raid’
LVM2.2.03.38/lib/metadata/integrity_manip.c:536:38: warning[-Wunused-but-set-variable=]: variable ‘pbs_unknown’ set but not used
Error: GCC_ANALYZER_WARNING (CWE-121): [#def42]
LVM2.2.03.38/lib/metadata/mirror.c:1739:9: warning[-Wanalyzer-out-of-bounds]: stack-based buffer overflow
LVM2.2.03.38/lib/metadata/mirror.c:1876:5: enter_function: entry to ‘add_mirror_log’
LVM2.2.03.38/lib/metadata/mirror.c:1896:12: branch_false: following ‘false’ branch (when ‘old_log_count != log_count’)...
LVM2.2.03.38/lib/metadata/mirror.c:1903:12: branch_false: ...to here
LVM2.2.03.38/lib/metadata/mirror.c:1912:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/lib/metadata/mirror.c:1915:25: branch_false: ...to here
LVM2.2.03.38/lib/metadata/mirror.c:1915:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/lib/metadata/mirror.c:1918:13: branch_false: ...to here
LVM2.2.03.38/lib/metadata/mirror.c:1926:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/lib/metadata/mirror.c:1934:12: branch_false: ...to here
LVM2.2.03.38/lib/metadata/mirror.c:1934:12: branch_true: following ‘true’ branch (when ‘old_log_count != 0’)...
LVM2.2.03.38/lib/metadata/mirror.c:1936:22: branch_true: ...to here
LVM2.2.03.38/lib/metadata/mirror.c:1936:22: call_function: calling ‘_form_mirror’ from ‘add_mirror_log’
Error: COMPILER_WARNING: [#def43]
LVM2.2.03.38/lib/metadata/raid_manip.c: scope_hint: In function ‘_reorder_raid10_near_seg_areas’
LVM2.2.03.38/lib/metadata/raid_manip.c:769:18: warning[-Wunused-but-set-variable=]: variable ‘i’ set but not used
Error: GCC_ANALYZER_WARNING (CWE-835): [#def44]
LVM2.2.03.38/lib/metadata/raid_manip.c:881:17: warning[-Wanalyzer-infinite-loop]: infinite loop
Error: GCC_ANALYZER_WARNING (CWE-775): [#def45]
LVM2.2.03.38/lib/misc/lvm-exec.c:129:12: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘dup2(open("/dev/null", 2), fd)’
LVM2.2.03.38/lib/misc/lvm-exec.c:119:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/lib/misc/lvm-exec.c:124:12: branch_false: ...to here
LVM2.2.03.38/lib/misc/lvm-exec.c:124:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/lib/misc/lvm-exec.c:129:13: branch_false: ...to here
LVM2.2.03.38/lib/misc/lvm-exec.c:129:13: acquire_resource: opened here
LVM2.2.03.38/lib/misc/lvm-exec.c:129:12: danger: ‘dup2(open("/dev/null", 2), fd)’ leaks here; was opened at [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
Error: GCC_ANALYZER_WARNING: [#def46]
LVM2.2.03.38/lib/misc/lvm-exec.c:129:13: warning[-Wanalyzer-fd-use-without-check]: ‘dup2’ on possibly invalid file descriptor ‘fd’
LVM2.2.03.38/lib/misc/lvm-exec.c:119:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/lib/misc/lvm-exec.c:124:12: branch_false: ...to here
LVM2.2.03.38/lib/misc/lvm-exec.c:124:12: branch_true: following ‘true’ branch...
LVM2.2.03.38/lib/misc/lvm-exec.c:124:32: branch_true: ...to here
LVM2.2.03.38/lib/misc/lvm-exec.c:124:32: release_resource: closed here
LVM2.2.03.38/lib/misc/lvm-exec.c:124:13: branch_false: following ‘false’ branch...
LVM2.2.03.38/lib/misc/lvm-exec.c:129:13: branch_false: ...to here
LVM2.2.03.38/lib/misc/lvm-exec.c:129:13: danger: ‘fd’ could be invalid
Error: GCC_ANALYZER_WARNING: [#def47]
LVM2.2.03.38/lib/misc/lvm-exec.c:178:26: warning[-Wanalyzer-fd-use-without-check]: ‘dup2’ on possibly invalid file descriptor ‘1’
LVM2.2.03.38/lib/misc/lvm-exec.c:144:7: enter_function: entry to ‘pipe_open’
LVM2.2.03.38/lib/misc/lvm-exec.c:154:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/lib/misc/lvm-exec.c:159:9: branch_false: ...to here
LVM2.2.03.38/lib/misc/lvm-exec.c:161:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/lib/misc/lvm-exec.c:170:12: branch_false: ...to here
LVM2.2.03.38/lib/misc/lvm-exec.c:170:12: branch_true: following ‘true’ branch...
LVM2.2.03.38/lib/misc/lvm-exec.c:172:22: branch_true: ...to here
LVM2.2.03.38/lib/misc/lvm-exec.c:172:22: call_function: calling ‘_reopen_fd_to_null’ from ‘pipe_open’
LVM2.2.03.38/lib/misc/lvm-exec.c:172:22: return_function: returning to ‘pipe_open’ from ‘_reopen_fd_to_null’
LVM2.2.03.38/lib/misc/lvm-exec.c:172:20: branch_false: following ‘false’ branch...
LVM2.2.03.38/lib/misc/lvm-exec.c:174:26: branch_false: ...to here
LVM2.2.03.38/lib/misc/lvm-exec.c:174:25: branch_false: following ‘false’ branch...
LVM2.2.03.38/lib/misc/lvm-exec.c:176:26: branch_false: ...to here
LVM2.2.03.38/lib/misc/lvm-exec.c:176:26: release_resource: closed here
LVM2.2.03.38/lib/misc/lvm-exec.c:176:25: branch_false: following ‘false’ branch...
LVM2.2.03.38/lib/misc/lvm-exec.c:178:26: branch_false: ...to here
LVM2.2.03.38/lib/misc/lvm-exec.c:178:26: danger: ‘1’ could be invalid
Error: GCC_ANALYZER_WARNING (CWE-775): [#def48]
LVM2.2.03.38/libdaemon/server/daemon-server.c:389:13: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘dup2(open("/dev/null", 2), 0)’
LVM2.2.03.38/libdaemon/server/daemon-server.c:338:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/libdaemon/server/daemon-server.c:343:9: branch_false: ...to here
LVM2.2.03.38/libdaemon/server/daemon-server.c:344:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/libdaemon/server/daemon-server.c:349:9: branch_false: ...to here
LVM2.2.03.38/libdaemon/server/daemon-server.c:383:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/libdaemon/server/daemon-server.c:389:12: branch_false: ...to here
LVM2.2.03.38/libdaemon/server/daemon-server.c:389:12: branch_true: following ‘true’ branch...
LVM2.2.03.38/libdaemon/server/daemon-server.c:389:39: branch_true: ...to here
LVM2.2.03.38/libdaemon/server/daemon-server.c:389:39: acquire_resource: opened here
LVM2.2.03.38/libdaemon/server/daemon-server.c:389:13: danger: ‘dup2(open("/dev/null", 2), 0)’ leaks here; was opened at [(11)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/10)
Error: GCC_ANALYZER_WARNING (CWE-775): [#def49]
LVM2.2.03.38/libdaemon/server/daemon-server.c:389:13: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/null", 2)’
LVM2.2.03.38/libdaemon/server/daemon-server.c:338:19: acquire_resource: opened here
LVM2.2.03.38/libdaemon/server/daemon-server.c:338:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/libdaemon/server/daemon-server.c:343:9: branch_false: ...to here
LVM2.2.03.38/libdaemon/server/daemon-server.c:344:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/libdaemon/server/daemon-server.c:349:9: branch_false: ...to here
LVM2.2.03.38/libdaemon/server/daemon-server.c:383:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/libdaemon/server/daemon-server.c:389:12: branch_false: ...to here
LVM2.2.03.38/libdaemon/server/daemon-server.c:390:13: branch_false: following ‘false’ branch...
LVM2.2.03.38/libdaemon/server/daemon-server.c:389:13: branch_false: ...to here
LVM2.2.03.38/libdaemon/server/daemon-server.c:389:13: danger: ‘open("/dev/null", 2)’ leaks here; was opened at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
Error: GCC_ANALYZER_WARNING (CWE-775): [#def50]
LVM2.2.03.38/libdaemon/server/daemon-server.c:390:13: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘dup2(open("/dev/null", 2), 1)’
LVM2.2.03.38/libdaemon/server/daemon-server.c:338:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/libdaemon/server/daemon-server.c:343:9: branch_false: ...to here
LVM2.2.03.38/libdaemon/server/daemon-server.c:344:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/libdaemon/server/daemon-server.c:349:9: branch_false: ...to here
LVM2.2.03.38/libdaemon/server/daemon-server.c:383:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/libdaemon/server/daemon-server.c:389:12: branch_false: ...to here
LVM2.2.03.38/libdaemon/server/daemon-server.c:390:40: acquire_resource: opened here
LVM2.2.03.38/libdaemon/server/daemon-server.c:390:13: danger: ‘dup2(open("/dev/null", 2), 1)’ leaks here; was opened at [(9)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/8)
Error: GCC_ANALYZER_WARNING (CWE-775): [#def51]
LVM2.2.03.38/libdaemon/server/daemon-server.c:391:13: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘dup2(open("/dev/null", 2), 2)’
LVM2.2.03.38/libdaemon/server/daemon-server.c:338:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/libdaemon/server/daemon-server.c:343:9: branch_false: ...to here
LVM2.2.03.38/libdaemon/server/daemon-server.c:344:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/libdaemon/server/daemon-server.c:349:9: branch_false: ...to here
LVM2.2.03.38/libdaemon/server/daemon-server.c:383:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/libdaemon/server/daemon-server.c:389:12: branch_false: ...to here
LVM2.2.03.38/libdaemon/server/daemon-server.c:389:13: branch_false: following ‘false’ branch...
LVM2.2.03.38/libdaemon/server/daemon-server.c:389:13: branch_false: ...to here
LVM2.2.03.38/libdaemon/server/daemon-server.c:391:40: acquire_resource: opened here
LVM2.2.03.38/libdaemon/server/daemon-server.c:391:13: danger: ‘dup2(open("/dev/null", 2), 2)’ leaks here; was opened at [(11)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/10)
Error: GCC_ANALYZER_WARNING (CWE-775): [#def52]
LVM2.2.03.38/libdaemon/server/daemon-server.c:393:20: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/null", 2)’
LVM2.2.03.38/libdaemon/server/daemon-server.c:338:19: acquire_resource: opened here
LVM2.2.03.38/libdaemon/server/daemon-server.c:338:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/libdaemon/server/daemon-server.c:343:9: branch_false: ...to here
LVM2.2.03.38/libdaemon/server/daemon-server.c:344:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/libdaemon/server/daemon-server.c:349:9: branch_false: ...to here
LVM2.2.03.38/libdaemon/server/daemon-server.c:383:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/libdaemon/server/daemon-server.c:389:12: branch_false: ...to here
LVM2.2.03.38/libdaemon/server/daemon-server.c:393:20: danger: ‘open("/dev/null", 2)’ leaks here; was opened at [(1)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/0)
Error: GCC_ANALYZER_WARNING (CWE-775): [#def53]
LVM2.2.03.38/libdaemon/server/daemon-server.c:399:12: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/null", 2)’
LVM2.2.03.38/libdaemon/server/daemon-server.c:338:19: acquire_resource: opened here
LVM2.2.03.38/libdaemon/server/daemon-server.c:338:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/libdaemon/server/daemon-server.c:343:9: branch_false: ...to here
LVM2.2.03.38/libdaemon/server/daemon-server.c:344:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/libdaemon/server/daemon-server.c:349:9: branch_false: ...to here
LVM2.2.03.38/libdaemon/server/daemon-server.c:383:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/libdaemon/server/daemon-server.c:389:12: branch_false: ...to here
LVM2.2.03.38/libdaemon/server/daemon-server.c:389:13: branch_false: following ‘false’ branch...
LVM2.2.03.38/libdaemon/server/daemon-server.c:389:13: branch_false: ...to here
LVM2.2.03.38/libdaemon/server/daemon-server.c:391:13: branch_false: following ‘false’ branch...
LVM2.2.03.38/libdaemon/server/daemon-server.c:399:12: branch_false: ...to here
LVM2.2.03.38/libdaemon/server/daemon-server.c:399:12: danger: ‘open("/dev/null", 2)’ leaks here; was opened at [(1)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/0)
Error: GCC_ANALYZER_WARNING (CWE-775): [#def54]
LVM2.2.03.38/libdm/dm-tools/dmfilemapd.c:664:21: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘dup2(open("/dev/null", 2), 0)’
LVM2.2.03.38/libdm/dm-tools/dmfilemapd.c:816:5: enter_function: entry to ‘main’
LVM2.2.03.38/libdm/dm-tools/dmfilemapd.c:820:14: call_function: calling ‘_parse_args’ from ‘main’
LVM2.2.03.38/libdm/dm-tools/dmfilemapd.c:820:14: return_function: returning to ‘main’ from ‘_parse_args’
LVM2.2.03.38/libdm/dm-tools/dmfilemapd.c:820:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/libdm/dm-tools/dmfilemapd.c:825:9: branch_false: ...to here
LVM2.2.03.38/libdm/dm-tools/dmfilemapd.c:831:12: branch_true: following ‘true’ branch...
LVM2.2.03.38/libdm/dm-tools/dmfilemapd.c:831:30: branch_true: ...to here
LVM2.2.03.38/libdm/dm-tools/dmfilemapd.c:831:30: call_function: calling ‘_daemonize’ from ‘main’
Error: GCC_ANALYZER_WARNING (CWE-775): [#def55]
LVM2.2.03.38/libdm/dm-tools/dmfilemapd.c:664:21: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/null", 2)’
LVM2.2.03.38/libdm/dm-tools/dmfilemapd.c:816:5: enter_function: entry to ‘main’
LVM2.2.03.38/libdm/dm-tools/dmfilemapd.c:820:14: call_function: calling ‘_parse_args’ from ‘main’
LVM2.2.03.38/libdm/dm-tools/dmfilemapd.c:820:14: return_function: returning to ‘main’ from ‘_parse_args’
LVM2.2.03.38/libdm/dm-tools/dmfilemapd.c:820:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/libdm/dm-tools/dmfilemapd.c:825:9: branch_false: ...to here
LVM2.2.03.38/libdm/dm-tools/dmfilemapd.c:831:12: branch_true: following ‘true’ branch...
LVM2.2.03.38/libdm/dm-tools/dmfilemapd.c:831:30: branch_true: ...to here
LVM2.2.03.38/libdm/dm-tools/dmfilemapd.c:831:30: call_function: calling ‘_daemonize’ from ‘main’
Error: GCC_ANALYZER_WARNING (CWE-775): [#def56]
LVM2.2.03.38/libdm/dm-tools/dmfilemapd.c:665:21: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘dup2(open("/dev/null", 2), 1)’
LVM2.2.03.38/libdm/dm-tools/dmfilemapd.c:816:5: enter_function: entry to ‘main’
LVM2.2.03.38/libdm/dm-tools/dmfilemapd.c:820:14: call_function: calling ‘_parse_args’ from ‘main’
LVM2.2.03.38/libdm/dm-tools/dmfilemapd.c:820:14: return_function: returning to ‘main’ from ‘_parse_args’
LVM2.2.03.38/libdm/dm-tools/dmfilemapd.c:820:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/libdm/dm-tools/dmfilemapd.c:825:9: branch_false: ...to here
LVM2.2.03.38/libdm/dm-tools/dmfilemapd.c:831:12: branch_true: following ‘true’ branch...
LVM2.2.03.38/libdm/dm-tools/dmfilemapd.c:831:30: branch_true: ...to here
LVM2.2.03.38/libdm/dm-tools/dmfilemapd.c:831:30: call_function: calling ‘_daemonize’ from ‘main’
Error: GCC_ANALYZER_WARNING (CWE-775): [#def57]
LVM2.2.03.38/libdm/dm-tools/dmfilemapd.c:666:21: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘dup2(open("/dev/null", 2), 2)’
LVM2.2.03.38/libdm/dm-tools/dmfilemapd.c:816:5: enter_function: entry to ‘main’
LVM2.2.03.38/libdm/dm-tools/dmfilemapd.c:820:14: call_function: calling ‘_parse_args’ from ‘main’
LVM2.2.03.38/libdm/dm-tools/dmfilemapd.c:820:14: return_function: returning to ‘main’ from ‘_parse_args’
LVM2.2.03.38/libdm/dm-tools/dmfilemapd.c:820:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/libdm/dm-tools/dmfilemapd.c:825:9: branch_false: ...to here
LVM2.2.03.38/libdm/dm-tools/dmfilemapd.c:831:12: branch_true: following ‘true’ branch...
LVM2.2.03.38/libdm/dm-tools/dmfilemapd.c:831:30: branch_true: ...to here
LVM2.2.03.38/libdm/dm-tools/dmfilemapd.c:831:30: call_function: calling ‘_daemonize’ from ‘main’
Error: GCC_ANALYZER_WARNING (CWE-775): [#def58]
LVM2.2.03.38/libdm/dm-tools/dmfilemapd.c:667:28: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/null", 2)’
LVM2.2.03.38/libdm/dm-tools/dmfilemapd.c:816:5: enter_function: entry to ‘main’
LVM2.2.03.38/libdm/dm-tools/dmfilemapd.c:820:14: call_function: calling ‘_parse_args’ from ‘main’
LVM2.2.03.38/libdm/dm-tools/dmfilemapd.c:820:14: return_function: returning to ‘main’ from ‘_parse_args’
LVM2.2.03.38/libdm/dm-tools/dmfilemapd.c:820:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/libdm/dm-tools/dmfilemapd.c:825:9: branch_false: ...to here
LVM2.2.03.38/libdm/dm-tools/dmfilemapd.c:831:12: branch_true: following ‘true’ branch...
LVM2.2.03.38/libdm/dm-tools/dmfilemapd.c:831:30: branch_true: ...to here
LVM2.2.03.38/libdm/dm-tools/dmfilemapd.c:831:30: call_function: calling ‘_daemonize’ from ‘main’
Error: GCC_ANALYZER_WARNING (CWE-775): [#def59]
LVM2.2.03.38/libdm/dm-tools/dmfilemapd.c:673:20: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/null", 2)’
LVM2.2.03.38/libdm/dm-tools/dmfilemapd.c:816:5: enter_function: entry to ‘main’
LVM2.2.03.38/libdm/dm-tools/dmfilemapd.c:820:14: call_function: calling ‘_parse_args’ from ‘main’
LVM2.2.03.38/libdm/dm-tools/dmfilemapd.c:820:14: return_function: returning to ‘main’ from ‘_parse_args’
LVM2.2.03.38/libdm/dm-tools/dmfilemapd.c:820:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/libdm/dm-tools/dmfilemapd.c:825:9: branch_false: ...to here
LVM2.2.03.38/libdm/dm-tools/dmfilemapd.c:831:12: branch_true: following ‘true’ branch...
LVM2.2.03.38/libdm/dm-tools/dmfilemapd.c:831:30: branch_true: ...to here
LVM2.2.03.38/libdm/dm-tools/dmfilemapd.c:831:30: call_function: calling ‘_daemonize’ from ‘main’
Error: CPPCHECK_WARNING (CWE-758): [#def60]
LVM2.2.03.38/libdm/dm-tools/dmsetup.c:5022: warning[objectIndex]: The address of variable 'region_id' might be accessed at non-zero index.
Error: COMPILER_WARNING: [#def61]
LVM2.2.03.38/libdm/libdm-stats.c: scope_hint: In function ‘_stats_group_tag_len’
LVM2.2.03.38/libdm/libdm-stats.c:1867:17: warning[-Wunused-but-set-variable=]: variable ‘nr_regions’ set but not used
Error: CPPCHECK_WARNING (CWE-457): [#def62]
LVM2.2.03.38/libdm/libdm-stats.c:2293: error[legacyUninitvar]: Uninitialized variable: lines
Error: GCC_ANALYZER_WARNING (CWE-457): [#def63]
LVM2.2.03.38/test/unit/radix_tree_t.c:437:35: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘k[1]’
LVM2.2.03.38/test/unit/radix_tree_t.c:426:13: enter_function: entry to ‘test_iterate_subset’
LVM2.2.03.38/test/unit/radix_tree_t.c:435:21: branch_true: following ‘true’ branch (when ‘i != 100000’)...
LVM2.2.03.38/test/unit/radix_tree_t.c:436:17: branch_true: ...to here
LVM2.2.03.38/test/unit/radix_tree_t.c:436:17: call_function: calling ‘_gen_key’ from ‘test_iterate_subset’
LVM2.2.03.38/test/unit/radix_tree_t.c:436:17: return_function: returning to ‘test_iterate_subset’ from ‘_gen_key’
LVM2.2.03.38/test/unit/radix_tree_t.c:437:20: branch_true: following ‘true’ branch...
LVM2.2.03.38/test/unit/radix_tree_t.c:437:35: branch_true: ...to here
LVM2.2.03.38/test/unit/radix_tree_t.c:437:35: danger: use of uninitialized value ‘k[1]’ here
Error: CPPCHECK_WARNING (CWE-119): [#def64]
LVM2.2.03.38/tools/command.c:298: error[bufferAccessOutOfBounds]: Buffer is accessed out of bounds: cmd_names[1].name
Error: CPPCHECK_WARNING (CWE-119): [#def65]
LVM2.2.03.38/tools/command.c:446: error[bufferAccessOutOfBounds]: Buffer is accessed out of bounds: command_names[0].name
Error: COMPILER_WARNING: [#def66]
LVM2.2.03.38/tools/lvconvert.c:6043:13: warning[-Wunused-but-set-variable=]: variable ‘lbs_unknown’ set but not used
Error: COMPILER_WARNING: [#def67]
LVM2.2.03.38/tools/lvconvert.c:6044:13: warning[-Wunused-but-set-variable=]: variable ‘pbs_unknown’ set but not used
Error: COMPILER_WARNING: [#def68]
LVM2.2.03.38/tools/lvconvert.c: scope_hint: In function ‘_set_writecache_block_size’
LVM2.2.03.38/tools/lvconvert.c:6044:42: warning[-Wunused-but-set-variable=]: variable ‘pbs_512’ set but not used
Error: CPPCHECK_WARNING (CWE-457): [#def69]
LVM2.2.03.38/tools/lvmdevices.c:1036: error[legacyUninitvar]: Uninitialized variable: idname
Error: CPPCHECK_WARNING (CWE-457): [#def70]
LVM2.2.03.38/tools/lvmdevices.c:1044: error[legacyUninitvar]: Uninitialized variable: idname
Error: GCC_ANALYZER_WARNING (CWE-122): [#def71]
LVM2.2.03.38/tools/pvck.c:2919:13: warning[-Wanalyzer-out-of-bounds]: heap-based buffer over-read
LVM2.2.03.38/tools/pvck.c:3011:12: enter_function: entry to ‘_pvck_mf’
LVM2.2.03.38/tools/pvck.c:3031:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/tools/pvck.c:3050:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/tools/pvck.c:3074:14: branch_false: ...to here
LVM2.2.03.38/tools/pvck.c:3074:14: call_function: calling ‘_get_settings’ from ‘_pvck_mf’
LVM2.2.03.38/tools/pvck.c:3074:14: return_function: returning to ‘_pvck_mf’ from ‘_get_settings’
LVM2.2.03.38/tools/pvck.c:3074:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/tools/pvck.c:3077:13: branch_false: ...to here
LVM2.2.03.38/tools/pvck.c:3077:12: branch_true: following ‘true’ branch...
LVM2.2.03.38/tools/pvck.c:3077:43: branch_true: ...to here
LVM2.2.03.38/tools/pvck.c:3078:20: branch_false: following ‘false’ branch...
LVM2.2.03.38/tools/pvck.c:3081:22: branch_false: ...to here
LVM2.2.03.38/tools/pvck.c:3081:22: call_function: calling ‘_read_metadata_file’ from ‘_pvck_mf’
Error: GCC_ANALYZER_WARNING (CWE-401): [#def72]
LVM2.2.03.38/tools/vgcfgbackup.c:50:9: warning[-Wanalyzer-malloc-leak]: leak of ‘_expand_filename(arg_value(cmd, 204), *vg.name, last_filename)’
LVM2.2.03.38/tools/vgcfgbackup.c:56:12: enter_function: entry to ‘_vg_backup_single’
LVM2.2.03.38/tools/vgcfgbackup.c:63:12: branch_true: following ‘true’ branch...
LVM2.2.03.38/tools/vgcfgbackup.c:64:34: branch_true: ...to here
LVM2.2.03.38/tools/vgcfgbackup.c:64:34: call_function: calling ‘_expand_filename’ from ‘_vg_backup_single’
LVM2.2.03.38/tools/vgcfgbackup.c:64:34: return_function: returning to ‘_vg_backup_single’ from ‘_expand_filename’
LVM2.2.03.38/tools/vgcfgbackup.c:64:20: branch_false: following ‘false’ branch...
LVM2.2.03.38/tools/vgcfgbackup.c:68:47: branch_false: ...to here
LVM2.2.03.38/tools/vgcfgbackup.c:50:9: danger: ‘_expand_filename(arg_value(cmd, 204), *vg.name, last_filename)’ leaks here; was allocated at [(8)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/7)
Scan Properties
| analyzer-version-clippy | 1.95.0 |
| analyzer-version-cppcheck | 2.20.0 |
| analyzer-version-gcc | 16.1.1 |
| analyzer-version-gcc-analyzer | 16.1.1 |
| analyzer-version-shellcheck | 0.11.0 |
| analyzer-version-unicontrol | 0.0.2 |
| diffbase-analyzer-version-clippy | 1.95.0 |
| diffbase-analyzer-version-cppcheck | 2.20.0 |
| diffbase-analyzer-version-gcc | 16.1.1 |
| diffbase-analyzer-version-gcc-analyzer | 16.1.1 |
| diffbase-analyzer-version-shellcheck | 0.11.0 |
| diffbase-analyzer-version-unicontrol | 0.0.2 |
| diffbase-enabled-plugins | clippy, cppcheck, gcc, shellcheck, unicontrol |
| diffbase-exit-code | 0 |
| diffbase-host | ip-172-16-1-152.us-west-2.compute.internal |
| diffbase-known-false-positives | /usr/share/csmock/known-false-positives.js |
| diffbase-known-false-positives-rpm | known-false-positives-0.0.0.20260524.213755.g3c6d0be.main-1.el9.noarch |
| diffbase-mock-config | fedora-rawhide-x86_64 |
| diffbase-project-name | lvm2-2.03.41-1.fc45 |
| diffbase-store-results-to | /tmp/tmpomrp04cw/lvm2-2.03.41-1.fc45.tar.xz |
| diffbase-time-created | 2026-06-01 15:03:26 |
| diffbase-time-finished | 2026-06-01 15:07:17 |
| diffbase-tool | csmock |
| diffbase-tool-args | '/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'shellcheck,cppcheck,clippy,unicontrol,gcc' '-o' '/tmp/tmpomrp04cw/lvm2-2.03.41-1.fc45.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmpomrp04cw/lvm2-2.03.41-1.fc45.src.rpm' |
| diffbase-tool-version | csmock-3.8.5.20260529.133039.g6f3b5c6-1.el9 |
| enabled-plugins | clippy, cppcheck, gcc, shellcheck, unicontrol |
| exit-code | 0 |
| host | ip-172-16-1-152.us-west-2.compute.internal |
| known-false-positives | /usr/share/csmock/known-false-positives.js |
| known-false-positives-rpm | known-false-positives-0.0.0.20260524.213755.g3c6d0be.main-1.el9.noarch |
| mock-config | fedora-rawhide-x86_64 |
| project-name | lvm2-2.03.38-2.fc44 |
| store-results-to | /tmp/tmpt5tliicx/lvm2-2.03.38-2.fc44.tar.xz |
| time-created | 2026-06-01 14:58:37 |
| time-finished | 2026-06-01 15:02:59 |
| title | Fixed findings |
| tool | csmock |
| tool-args | '/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'shellcheck,cppcheck,clippy,unicontrol,gcc' '-o' '/tmp/tmpt5tliicx/lvm2-2.03.38-2.fc44.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmpt5tliicx/lvm2-2.03.38-2.fc44.src.rpm' |
| tool-version | csmock-3.8.5.20260529.133039.g6f3b5c6-1.el9 |