Newly introduced findings

List of Findings

Error: GCC_ANALYZER_WARNING (CWE-835): [#def1]
LVM2.2.03.41/lib/device/dev-type.c:341:24: warning[-Wanalyzer-infinite-loop]: infinite loop
LVM2.2.03.41/lib/device/dev-type.c:341:24: danger: infinite loop here
LVM2.2.03.41/lib/device/dev-type.c:341:24: branch_true: if it ever follows ‘true’ branch, it will always do so...
LVM2.2.03.41/lib/device/dev-type.c:341:51: branch_true: ...to here
#  339|   
#  340|   		/* Find the start of the device major name */
#  341|-> 		for (; line[i] && line[i] != ' '; i++)
#  342|   			; /* skip non-space */
#  343|   		for (; line[i] == ' '; i++)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def2]
LVM2.2.03.41/lib/label/hints.c:863:17: warning[-Wanalyzer-malloc-leak]: leak of ‘calloc(1, 4288)’
LVM2.2.03.41/lib/label/hints.c:695:12: enter_function: entry to ‘_read_hint_file’
LVM2.2.03.41/lib/label/hints.c:717:12: branch_false: following ‘false’ branch...
LVM2.2.03.41/lib/label/hints.c:720:9: branch_false: ...to here
LVM2.2.03.41/lib/label/hints.c:722:21: branch_true: following ‘true’ branch (when ‘i != 4’)...
LVM2.2.03.41/lib/label/hints.c:723:17: branch_true: ...to here
LVM2.2.03.41/lib/label/hints.c:725:16: branch_true: following ‘true’ branch...
LVM2.2.03.41/lib/label/hints.c:726:17: branch_true: ...to here
LVM2.2.03.41/lib/label/hints.c:730:20: branch_false: following ‘false’ branch (when ‘p’ is NULL)...
LVM2.2.03.41/lib/label/hints.c:744:22: branch_false: ...to here
LVM2.2.03.41/lib/label/hints.c:744:20: branch_false: following ‘false’ branch...
LVM2.2.03.41/lib/label/hints.c:761:22: branch_false: ...to here
LVM2.2.03.41/lib/label/hints.c:761:20: branch_false: following ‘false’ branch...
LVM2.2.03.41/lib/label/hints.c:774:22: branch_false: ...to here
LVM2.2.03.41/lib/label/hints.c:774:20: branch_false: following ‘false’ branch...
LVM2.2.03.41/lib/label/hints.c:787:22: branch_false: ...to here
LVM2.2.03.41/lib/label/hints.c:787:20: branch_false: following ‘false’ branch...
LVM2.2.03.41/lib/label/hints.c:799:22: branch_false: ...to here
LVM2.2.03.41/lib/label/hints.c:799:20: branch_false: following ‘false’ branch...
LVM2.2.03.41/lib/label/hints.c:818:22: branch_false: ...to here
LVM2.2.03.41/lib/label/hints.c:818:20: branch_false: following ‘false’ branch...
LVM2.2.03.41/lib/label/hints.c:831:21: branch_false: ...to here
LVM2.2.03.41/lib/label/hints.c:831:20: branch_false: following ‘false’ branch...
LVM2.2.03.41/lib/label/hints.c:834:21: branch_false: ...to here
LVM2.2.03.41/lib/label/hints.c:834:20: branch_false: following ‘false’ branch...
LVM2.2.03.41/lib/label/hints.c:837:17: branch_false: ...to here
LVM2.2.03.41/lib/label/hints.c:857:36: call_function: inlined call to ‘zalloc’ from ‘_read_hint_file’
LVM2.2.03.41/lib/label/hints.c:857:20: branch_false: following ‘false’ branch...
LVM2.2.03.41/lib/label/hints.c:861:17: branch_false: ...to here
LVM2.2.03.41/lib/label/hints.c:863:17: danger: ‘calloc(1, 4288)’ leaks here; was allocated at [(28)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/27)
#  861|   		memcpy(alloc_hint, &hint, sizeof(hint));
#  862|   
#  863|-> 		log_debug("add hint %s %s %d:%d %s", hint.name, hint.pvid, major, minor, vgname ?: "-");
#  864|   		dm_list_add(hints, &alloc_hint->list);
#  865|   		found++;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def3]
LVM2.2.03.41/test/unit/daemon_stray_t.c:82:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/null", 524288)’
LVM2.2.03.41/test/unit/daemon_stray_t.c:77:19: acquire_resource: opened here
LVM2.2.03.41/test/unit/daemon_stray_t.c:78:9: branch_false: following ‘false’ branch...
LVM2.2.03.41/test/unit/daemon_stray_t.c:81:20: branch_false: ...to here
LVM2.2.03.41/test/unit/daemon_stray_t.c:82:9: danger: ‘open("/dev/null", 524288)’ leaks here; was opened at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   80|   	/* fd without CLOEXEC - stray, should be closed */
#   81|   	fd_close = open("/dev/null", O_RDONLY);
#   82|-> 	T_ASSERT(fd_close >= 0);
#   83|   	T_ASSERT(fcntl(fd_close, F_SETFD, 0) == 0);
#   84|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def4]
LVM2.2.03.41/test/unit/daemon_stray_t.c:83:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/null", 524288)’
LVM2.2.03.41/test/unit/daemon_stray_t.c:77:19: acquire_resource: opened here
LVM2.2.03.41/test/unit/daemon_stray_t.c:78:9: branch_false: following ‘false’ branch...
LVM2.2.03.41/test/unit/daemon_stray_t.c:81:20: branch_false: ...to here
LVM2.2.03.41/test/unit/daemon_stray_t.c:82:9: branch_false: following ‘false’ branch...
LVM2.2.03.41/test/unit/daemon_stray_t.c:83:9: branch_false: ...to here
LVM2.2.03.41/test/unit/daemon_stray_t.c:83:9: danger: ‘open("/dev/null", 524288)’ leaks here; was opened at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#   81|   	fd_close = open("/dev/null", O_RDONLY);
#   82|   	T_ASSERT(fd_close >= 0);
#   83|-> 	T_ASSERT(fcntl(fd_close, F_SETFD, 0) == 0);
#   84|   
#   85|   	daemon_close_stray_fds("test", 1, STDERR_FILENO, &cfds);

Scan Properties

analyzer-version-clippy1.95.0
analyzer-version-cppcheck2.20.0
analyzer-version-gcc16.1.1
analyzer-version-gcc-analyzer16.1.1
analyzer-version-shellcheck0.11.0
analyzer-version-unicontrol0.0.2
diffbase-analyzer-version-clippy1.95.0
diffbase-analyzer-version-cppcheck2.20.0
diffbase-analyzer-version-gcc16.1.1
diffbase-analyzer-version-gcc-analyzer16.1.1
diffbase-analyzer-version-shellcheck0.11.0
diffbase-analyzer-version-unicontrol0.0.2
diffbase-enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
diffbase-exit-code0
diffbase-hostip-172-16-1-152.us-west-2.compute.internal
diffbase-known-false-positives/usr/share/csmock/known-false-positives.js
diffbase-known-false-positives-rpmknown-false-positives-0.0.0.20260524.213755.g3c6d0be.main-1.el9.noarch
diffbase-mock-configfedora-rawhide-x86_64
diffbase-project-namelvm2-2.03.38-2.fc44
diffbase-store-results-to/tmp/tmpt5tliicx/lvm2-2.03.38-2.fc44.tar.xz
diffbase-time-created2026-06-01 14:58:37
diffbase-time-finished2026-06-01 15:02:59
diffbase-toolcsmock
diffbase-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'
diffbase-tool-versioncsmock-3.8.5.20260529.133039.g6f3b5c6-1.el9
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-152.us-west-2.compute.internal
known-false-positives/usr/share/csmock/known-false-positives.js
known-false-positives-rpmknown-false-positives-0.0.0.20260524.213755.g3c6d0be.main-1.el9.noarch
mock-configfedora-rawhide-x86_64
project-namelvm2-2.03.41-1.fc45
store-results-to/tmp/tmpomrp04cw/lvm2-2.03.41-1.fc45.tar.xz
time-created2026-06-01 15:03:26
time-finished2026-06-01 15:07:17
titleNewly introduced findings
toolcsmock
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'
tool-versioncsmock-3.8.5.20260529.133039.g6f3b5c6-1.el9