Error: GCC_ANALYZER_WARNING (CWE-688): [#def1] libblockdev-3.4.0/src/plugins/crypto.c:3423:56: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected libblockdev-3.4.0/src/plugins/crypto.c:3368:10: enter_function: entry to 'bd_crypto_escrow_device' libblockdev-3.4.0/src/plugins/crypto.c:3397:8: branch_false: following 'false' branch... libblockdev-3.4.0/src/plugins/crypto.c:3403:10: branch_false: ...to here libblockdev-3.4.0/src/plugins/crypto.c:3413:8: branch_false: following 'false' branch... libblockdev-3.4.0/src/plugins/crypto.c:3422:22: call_function: inlined call to 'g_strdup_inline' from 'bd_crypto_escrow_device' libblockdev-3.4.0/src/plugins/crypto.c:3423:56: danger: argument 1 ('<unknown>') NULL where non-null expected # 3421| # 3422| cert_data_copy = g_strdup (cert_data); # 3423|-> cert = CERT_DecodeCertFromPackage (cert_data_copy, strlen (cert_data_copy)); # 3424| if (!cert) { # 3425| g_set_error (&l_error, BD_CRYPTO_ERROR, BD_CRYPTO_ERROR_CERT_DECODE, Error: GCC_ANALYZER_WARNING (CWE-775): [#def2] libblockdev-3.4.0/src/plugins/fs/mount.c:491:16: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'pipefd[0]' libblockdev-3.4.0/src/plugins/fs/mount.c:631:10: enter_function: entry to 'bd_fs_unmount' libblockdev-3.4.0/src/plugins/fs/mount.c:652:8: branch_true: following 'true' branch (when 'extra' is non-NULL)... libblockdev-3.4.0/src/plugins/fs/mount.c:652:8: branch_true: ...to here libblockdev-3.4.0/src/plugins/fs/mount.c:653:29: branch_true: following 'true' branch... libblockdev-3.4.0/src/plugins/fs/mount.c:654:17: branch_true: ...to here libblockdev-3.4.0/src/plugins/fs/mount.c:654:16: branch_true: following 'true' branch... libblockdev-3.4.0/src/plugins/fs/mount.c:680:8: branch_true: following 'true' branch... libblockdev-3.4.0/src/plugins/fs/mount.c:681:15: branch_true: ...to here libblockdev-3.4.0/src/plugins/fs/mount.c:681:15: call_function: calling 'run_as_user' from 'bd_fs_unmount' # 489| g_set_error (error, BD_FS_ERROR, BD_FS_ERROR_FAIL, # 490| "Not running as root, cannot change the UID/GID."); # 491|-> return FALSE; # 492| } # 493| Error: GCC_ANALYZER_WARNING (CWE-775): [#def3] libblockdev-3.4.0/src/plugins/fs/mount.c:491:16: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'pipefd[1]' libblockdev-3.4.0/src/plugins/fs/mount.c:631:10: enter_function: entry to 'bd_fs_unmount' libblockdev-3.4.0/src/plugins/fs/mount.c:652:8: branch_true: following 'true' branch (when 'extra' is non-NULL)... libblockdev-3.4.0/src/plugins/fs/mount.c:652:8: branch_true: ...to here libblockdev-3.4.0/src/plugins/fs/mount.c:653:29: branch_true: following 'true' branch... libblockdev-3.4.0/src/plugins/fs/mount.c:654:17: branch_true: ...to here libblockdev-3.4.0/src/plugins/fs/mount.c:654:16: branch_true: following 'true' branch... libblockdev-3.4.0/src/plugins/fs/mount.c:680:8: branch_true: following 'true' branch... libblockdev-3.4.0/src/plugins/fs/mount.c:681:15: branch_true: ...to here libblockdev-3.4.0/src/plugins/fs/mount.c:681:15: call_function: calling 'run_as_user' from 'bd_fs_unmount' # 489| g_set_error (error, BD_FS_ERROR, BD_FS_ERROR_FAIL, # 490| "Not running as root, cannot change the UID/GID."); # 491|-> return FALSE; # 492| } # 493| Error: GCC_ANALYZER_WARNING (CWE-787): [#def4] libblockdev-3.4.0/src/plugins/nvme/nvme-error.c:108:9: warning[-Wanalyzer-out-of-bounds]: buffer over-read libblockdev-3.4.0/src/plugins/nvme/nvme-error.c:100:8: branch_false: following 'false' branch (when 'error' is non-NULL)... libblockdev-3.4.0/src/plugins/nvme/nvme-error.c:102:8: branch_false: ...to here libblockdev-3.4.0/src/plugins/nvme/nvme-error.c:102:8: branch_false: following 'false' branch (when 'result != 0')... libblockdev-3.4.0/src/plugins/nvme/nvme-error.c:107:8: branch_false: ...to here libblockdev-3.4.0/src/plugins/nvme/nvme-error.c:107:8: branch_true: following 'true' branch (when '_errno > 999')... libblockdev-3.4.0/src/plugins/nvme/nvme-error.c:108:9: branch_true: ...to here libblockdev-3.4.0/src/plugins/nvme/nvme-error.c:108:9: branch_true: following 'true' branch... libblockdev-3.4.0/src/plugins/nvme/nvme-error.c:108:9: branch_true: ...to here libblockdev-3.4.0/src/plugins/nvme/nvme-error.c:108:9: danger: read of 4 bytes at offset '(unsigned int)_errno * 4 + 17179865180' exceeds 'CSWTCH' # 106| # 107| if (_errno >= ENVME_CONNECT_RESOLVE) { # 108|-> switch (_errno) { # 109| case ENVME_CONNECT_ADDRFAM: # 110| case ENVME_CONNECT_TRADDR: Error: GCC_ANALYZER_WARNING (CWE-775): [#def5] libblockdev-3.4.0/src/plugins/nvme/nvme-info.c:410:19: warning[-Wanalyzer-fd-leak]: leak of file descriptor '_open_dev(device, error)' libblockdev-3.4.0/src/plugins/nvme/nvme-info.c:470:24: enter_function: entry to 'bd_nvme_get_controller_info' libblockdev-3.4.0/src/plugins/nvme/nvme-info.c:477:10: call_function: calling '_open_dev' from 'bd_nvme_get_controller_info' libblockdev-3.4.0/src/plugins/nvme/nvme-info.c:477:10: return_function: returning to 'bd_nvme_get_controller_info' from '_open_dev' libblockdev-3.4.0/src/plugins/nvme/nvme-info.c:478:8: branch_false: following 'false' branch... libblockdev-3.4.0/src/plugins/nvme/nvme-info.c:481:15: branch_false: ...to here libblockdev-3.4.0/src/plugins/nvme/nvme-info.c:481:15: call_function: calling '_nvme_alloc' from 'bd_nvme_get_controller_info' libblockdev-3.4.0/src/plugins/nvme/nvme-info.c:481:15: return_function: returning to 'bd_nvme_get_controller_info' from '_nvme_alloc' libblockdev-3.4.0/src/plugins/nvme/nvme-info.c:410:19: danger: '_open_dev(device, error)' leaks here; was opened at [(4)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/3) # 408| void *_nvme_alloc (size_t len, GError **error) # 409| { # 410|-> size_t _len = ROUND_UP (len, 0x1000); # 411| void *p; # 412| Error: GCC_ANALYZER_WARNING (CWE-476): [#def6] libblockdev-3.4.0/src/plugins/part.c:1367:48: warning[-Wanalyzer-null-dereference]: dereference of NULL 'l_error' libblockdev-3.4.0/src/plugins/part.c:1352:10: enter_function: entry to 'bd_part_delete_part' libblockdev-3.4.0/src/plugins/part.c:1359:13: release_memory: 'l_error' is NULL libblockdev-3.4.0/src/plugins/part.c:1365:16: call_function: calling 'get_part_num' from 'bd_part_delete_part' libblockdev-3.4.0/src/plugins/part.c:1365:16: return_function: returning to 'bd_part_delete_part' from 'get_part_num' libblockdev-3.4.0/src/plugins/part.c:1366:8: branch_true: following 'true' branch... libblockdev-3.4.0/src/plugins/part.c:1367:55: branch_true: ...to here libblockdev-3.4.0/src/plugins/part.c:1367:55: release_memory: 'l_error' is NULL libblockdev-3.4.0/src/plugins/part.c:1367:48: danger: dereference of NULL 'l_error' # 1365| part_num = get_part_num (part, &l_error); # 1366| if (part_num == -1) { # 1367|-> bd_utils_report_finished (progress_id, l_error->message); # 1368| g_propagate_error (error, l_error); # 1369| return FALSE; Error: GCC_ANALYZER_WARNING (CWE-476): [#def7] libblockdev-3.4.0/src/plugins/part.c:1529:48: warning[-Wanalyzer-null-dereference]: dereference of NULL 'l_error' libblockdev-3.4.0/src/plugins/part.c:1506:10: enter_function: entry to 'bd_part_resize_part' libblockdev-3.4.0/src/plugins/part.c:1521:13: release_memory: 'l_error' is NULL libblockdev-3.4.0/src/plugins/part.c:1527:16: call_function: calling 'get_part_num' from 'bd_part_resize_part' libblockdev-3.4.0/src/plugins/part.c:1527:16: return_function: returning to 'bd_part_resize_part' from 'get_part_num' libblockdev-3.4.0/src/plugins/part.c:1528:8: branch_true: following 'true' branch... libblockdev-3.4.0/src/plugins/part.c:1529:55: branch_true: ...to here libblockdev-3.4.0/src/plugins/part.c:1529:55: release_memory: 'l_error' is NULL libblockdev-3.4.0/src/plugins/part.c:1529:48: danger: dereference of NULL 'l_error' # 1527| part_num = get_part_num (part, &l_error); # 1528| if (part_num == -1) { # 1529|-> bd_utils_report_finished (progress_id, l_error->message); # 1530| g_propagate_error (error, l_error); # 1531| return FALSE; Error: GCC_ANALYZER_WARNING (CWE-476): [#def8] libblockdev-3.4.0/src/plugins/part.c:1845:48: warning[-Wanalyzer-null-dereference]: dereference of NULL 'l_error' libblockdev-3.4.0/src/plugins/part.c:1800:10: enter_function: entry to 'bd_part_set_part_name' libblockdev-3.4.0/src/plugins/part.c:1809:13: release_memory: 'l_error' is NULL libblockdev-3.4.0/src/plugins/part.c:1815:11: call_function: calling 'get_device_context' from 'bd_part_set_part_name' libblockdev-3.4.0/src/plugins/part.c:1815:11: return_function: returning to 'bd_part_set_part_name' from 'get_device_context' libblockdev-3.4.0/src/plugins/part.c:1816:8: branch_false: following 'false' branch... libblockdev-3.4.0/src/plugins/part.c:1821:10: branch_false: ...to here libblockdev-3.4.0/src/plugins/part.c:1822:8: branch_false: following 'false' branch... libblockdev-3.4.0/src/plugins/part.c:1831:18: branch_false: ...to here libblockdev-3.4.0/src/plugins/part.c:1832:8: branch_false: following 'false' branch... libblockdev-3.4.0/src/plugins/part.c:1842:16: branch_false: ...to here libblockdev-3.4.0/src/plugins/part.c:1842:16: call_function: calling 'get_part_num' from 'bd_part_set_part_name' libblockdev-3.4.0/src/plugins/part.c:1842:16: return_function: returning to 'bd_part_set_part_name' from 'get_part_num' libblockdev-3.4.0/src/plugins/part.c:1843:8: branch_true: following 'true' branch... libblockdev-3.4.0/src/plugins/part.c:1844:9: branch_true: ...to here libblockdev-3.4.0/src/plugins/part.c:1845:55: release_memory: 'l_error' is NULL libblockdev-3.4.0/src/plugins/part.c:1845:48: danger: dereference of NULL 'l_error' # 1843| if (part_num == -1) { # 1844| close_context (cxt); # 1845|-> bd_utils_report_finished (progress_id, l_error->message); # 1846| g_propagate_error (error, l_error); # 1847| return FALSE; Error: GCC_ANALYZER_WARNING (CWE-476): [#def9] libblockdev-3.4.0/src/plugins/part.c:1926:48: warning[-Wanalyzer-null-dereference]: dereference of NULL 'l_error' libblockdev-3.4.0/src/plugins/part.c:1913:10: enter_function: entry to 'bd_part_set_part_type' libblockdev-3.4.0/src/plugins/part.c:1918:13: release_memory: 'l_error' is NULL libblockdev-3.4.0/src/plugins/part.c:1924:16: call_function: calling 'get_part_num' from 'bd_part_set_part_type' libblockdev-3.4.0/src/plugins/part.c:1924:16: return_function: returning to 'bd_part_set_part_type' from 'get_part_num' libblockdev-3.4.0/src/plugins/part.c:1925:8: branch_true: following 'true' branch... libblockdev-3.4.0/src/plugins/part.c:1926:55: branch_true: ...to here libblockdev-3.4.0/src/plugins/part.c:1926:55: release_memory: 'l_error' is NULL libblockdev-3.4.0/src/plugins/part.c:1926:48: danger: dereference of NULL 'l_error' # 1924| part_num = get_part_num (part, &l_error); # 1925| if (part_num == -1) { # 1926|-> bd_utils_report_finished (progress_id, l_error->message); # 1927| g_propagate_error (error, l_error); # 1928| return FALSE; Error: GCC_ANALYZER_WARNING (CWE-476): [#def10] libblockdev-3.4.0/src/plugins/part.c:1985:48: warning[-Wanalyzer-null-dereference]: dereference of NULL 'l_error' libblockdev-3.4.0/src/plugins/part.c:1972:10: enter_function: entry to 'bd_part_set_part_id' libblockdev-3.4.0/src/plugins/part.c:1977:13: release_memory: 'l_error' is NULL libblockdev-3.4.0/src/plugins/part.c:1983:16: call_function: calling 'get_part_num' from 'bd_part_set_part_id' libblockdev-3.4.0/src/plugins/part.c:1983:16: return_function: returning to 'bd_part_set_part_id' from 'get_part_num' libblockdev-3.4.0/src/plugins/part.c:1984:8: branch_true: following 'true' branch... libblockdev-3.4.0/src/plugins/part.c:1985:55: branch_true: ...to here libblockdev-3.4.0/src/plugins/part.c:1985:55: release_memory: 'l_error' is NULL libblockdev-3.4.0/src/plugins/part.c:1985:48: danger: dereference of NULL 'l_error' # 1983| part_num = get_part_num (part, &l_error); # 1984| if (part_num == -1) { # 1985|-> bd_utils_report_finished (progress_id, l_error->message); # 1986| g_propagate_error (error, l_error); # 1987| return FALSE; Error: GCC_ANALYZER_WARNING (CWE-476): [#def11] libblockdev-3.4.0/src/plugins/part.c:2076:48: warning[-Wanalyzer-null-dereference]: dereference of NULL 'l_error' libblockdev-3.4.0/src/plugins/part.c:2031:10: enter_function: entry to 'bd_part_set_part_uuid' libblockdev-3.4.0/src/plugins/part.c:2040:13: release_memory: 'l_error' is NULL libblockdev-3.4.0/src/plugins/part.c:2046:11: call_function: calling 'get_device_context' from 'bd_part_set_part_uuid' libblockdev-3.4.0/src/plugins/part.c:2046:11: return_function: returning to 'bd_part_set_part_uuid' from 'get_device_context' libblockdev-3.4.0/src/plugins/part.c:2047:8: branch_false: following 'false' branch... libblockdev-3.4.0/src/plugins/part.c:2052:10: branch_false: ...to here libblockdev-3.4.0/src/plugins/part.c:2053:8: branch_false: following 'false' branch... libblockdev-3.4.0/src/plugins/part.c:2062:18: branch_false: ...to here libblockdev-3.4.0/src/plugins/part.c:2063:8: branch_false: following 'false' branch... libblockdev-3.4.0/src/plugins/part.c:2073:16: branch_false: ...to here libblockdev-3.4.0/src/plugins/part.c:2073:16: call_function: calling 'get_part_num' from 'bd_part_set_part_uuid' libblockdev-3.4.0/src/plugins/part.c:2073:16: return_function: returning to 'bd_part_set_part_uuid' from 'get_part_num' libblockdev-3.4.0/src/plugins/part.c:2074:8: branch_true: following 'true' branch... libblockdev-3.4.0/src/plugins/part.c:2075:9: branch_true: ...to here libblockdev-3.4.0/src/plugins/part.c:2076:55: release_memory: 'l_error' is NULL libblockdev-3.4.0/src/plugins/part.c:2076:48: danger: dereference of NULL 'l_error' # 2074| if (part_num == -1) { # 2075| close_context (cxt); # 2076|-> bd_utils_report_finished (progress_id, l_error->message); # 2077| g_propagate_error (error, l_error); # 2078| return FALSE;
| analyzer-version-clippy | 1.97.1 |
| analyzer-version-cppcheck | 2.21.1 |
| 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 |
| enabled-plugins | clippy, cppcheck, gcc, shellcheck, unicontrol |
| exit-code | 0 |
| host | ip-172-16-1-224.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 | libblockdev-3.4.0-2.fc44 |
| store-results-to | /tmp/tmpjjnsmoht/libblockdev-3.4.0-2.fc44.tar.xz |
| time-created | 2026-08-03 16:56:09 |
| time-finished | 2026-08-03 16:59:32 |
| tool | csmock |
| tool-args | '/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'gcc,clippy,unicontrol,shellcheck,cppcheck' '-o' '/tmp/tmpjjnsmoht/libblockdev-3.4.0-2.fc44.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmpjjnsmoht/libblockdev-3.4.0-2.fc44.src.rpm' |
| tool-version | csmock-3.8.7.20260803.142340.gb75b18e-1.el9 |