libnvme-1.13-1.fc43
List of Findings
Error: CPPCHECK_WARNING (CWE-476): [#def1]
libnvme-1.13/examples/telemetry-listen.c:157: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: e
Error: CPPCHECK_WARNING (CWE-476): [#def2]
libnvme-1.13/examples/telemetry-listen.c:158: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: e
Error: GCC_ANALYZER_WARNING (CWE-476): [#def3]
libnvme-1.13/redhat-linux-build/../examples/telemetry-listen.c:157:33: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘e’
libnvme-1.13/redhat-linux-build/../examples/telemetry-listen.c:125:5: enter_function: entry to ‘main’
libnvme-1.13/redhat-linux-build/../examples/telemetry-listen.c:137:12: branch_false: following ‘false’ branch...
libnvme-1.13/redhat-linux-build/../examples/telemetry-listen.c:140:9: branch_false: ...to here
libnvme-1.13/redhat-linux-build/../examples/telemetry-listen.c:145:13: acquire_memory: this call could return NULL
libnvme-1.13/redhat-linux-build/../examples/telemetry-listen.c:146:9: branch_true: following ‘true’ branch (when ‘__i != 16’)...
libnvme-1.13/redhat-linux-build/../examples/telemetry-listen.c:146:9: branch_true: ...to here
libnvme-1.13/redhat-linux-build/../examples/telemetry-listen.c:149:9: branch_true: following ‘true’ branch (when ‘h’ is non-NULL)...
libnvme-1.13/redhat-linux-build/../examples/telemetry-listen.c:150:17: branch_true: ...to here
libnvme-1.13/redhat-linux-build/../examples/telemetry-listen.c:150:17: branch_true: following ‘true’ branch (when ‘s’ is non-NULL)...
libnvme-1.13/redhat-linux-build/../examples/telemetry-listen.c:151:25: branch_true: ...to here
libnvme-1.13/redhat-linux-build/../examples/telemetry-listen.c:151:25: branch_true: following ‘true’ branch (when ‘c’ is non-NULL)...
libnvme-1.13/redhat-linux-build/../examples/telemetry-listen.c:152:42: branch_true: ...to here
libnvme-1.13/redhat-linux-build/../examples/telemetry-listen.c:152:42: call_function: calling ‘open_uevent’ from ‘main’
libnvme-1.13/redhat-linux-build/../examples/telemetry-listen.c:152:42: return_function: returning to ‘main’ from ‘open_uevent’
libnvme-1.13/redhat-linux-build/../examples/telemetry-listen.c:154:36: branch_false: following ‘false’ branch...
libnvme-1.13/redhat-linux-build/../examples/telemetry-listen.c:156:33: branch_false: ...to here
libnvme-1.13/redhat-linux-build/../examples/telemetry-listen.c:157:33: danger: ‘e + (long unsigned int)i * 16’ could be NULL: unchecked value from [(4)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/3)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def4]
libnvme-1.13/redhat-linux-build/../src/nvme/fabrics.c:724:12: warning[-Wanalyzer-malloc-leak]: leak of ‘*((struct nvme_root *)r).options’
libnvme-1.13/redhat-linux-build/../src/nvme/fabrics.c:1004:13: enter_function: entry to ‘nvmf_connect_disc_entry’
libnvme-1.13/redhat-linux-build/../src/nvme/fabrics.c:1054:21: call_function: calling ‘nvmf_trtype_str’ from ‘nvmf_connect_disc_entry’
libnvme-1.13/redhat-linux-build/../src/nvme/fabrics.c:1054:21: return_function: returning to ‘nvmf_connect_disc_entry’ from ‘nvmf_trtype_str’
libnvme-1.13/redhat-linux-build/../src/nvme/fabrics.c:1061:12: branch_false: following ‘false’ branch...
libnvme-1.13/redhat-linux-build/../src/nvme/fabrics.c:1069:17: branch_false: ...to here
libnvme-1.13/redhat-linux-build/../src/nvme/fabrics.c:1092:12: branch_false: following ‘false’ branch...
libnvme-1.13/redhat-linux-build/../src/nvme/fabrics.c:1098:13: branch_false: ...to here
libnvme-1.13/redhat-linux-build/../src/nvme/fabrics.c:1098:12: branch_true: following ‘true’ branch...
libnvme-1.13/redhat-linux-build/../src/nvme/fabrics.c:1099:13: branch_true: ...to here
libnvme-1.13/redhat-linux-build/../src/nvme/fabrics.c:1099:13: call_function: calling ‘__nvmf_supported_options’ from ‘nvmf_connect_disc_entry’
Error: GCC_ANALYZER_WARNING (CWE-775): [#def5]
libnvme-1.13/redhat-linux-build/../src/nvme/fabrics.c:1335:21: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(&filename, 0)’
libnvme-1.13/redhat-linux-build/../src/nvme/fabrics.c:1326:12: branch_false: following ‘false’ branch...
branch_false: ...to here
libnvme-1.13/redhat-linux-build/../src/nvme/fabrics.c:1328:16: branch_true: following ‘true’ branch...
libnvme-1.13/redhat-linux-build/../src/nvme/fabrics.c:1332:21: branch_true: ...to here
libnvme-1.13/redhat-linux-build/../src/nvme/fabrics.c:1332:20: branch_false: following ‘false’ branch...
libnvme-1.13/redhat-linux-build/../src/nvme/fabrics.c:1334:62: branch_false: ...to here
libnvme-1.13/redhat-linux-build/../src/nvme/fabrics.c:1335:21: acquire_resource: opened here
libnvme-1.13/redhat-linux-build/../src/nvme/fabrics.c:1335:21: danger: ‘open(&filename, 0)’ leaks here; was opened at [(7)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/6)
Error: GCC_ANALYZER_WARNING (CWE-775): [#def6]
libnvme-1.13/redhat-linux-build/../src/nvme/fabrics.c:1338:23: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(&filename, 0)’
libnvme-1.13/redhat-linux-build/../src/nvme/fabrics.c:1326:12: branch_false: following ‘false’ branch...
branch_false: ...to here
libnvme-1.13/redhat-linux-build/../src/nvme/fabrics.c:1328:16: branch_true: following ‘true’ branch...
libnvme-1.13/redhat-linux-build/../src/nvme/fabrics.c:1332:21: branch_true: ...to here
libnvme-1.13/redhat-linux-build/../src/nvme/fabrics.c:1332:20: branch_false: following ‘false’ branch...
libnvme-1.13/redhat-linux-build/../src/nvme/fabrics.c:1334:62: branch_false: ...to here
libnvme-1.13/redhat-linux-build/../src/nvme/fabrics.c:1335:21: acquire_resource: opened here
libnvme-1.13/redhat-linux-build/../src/nvme/fabrics.c:1336:20: branch_false: following ‘false’ branch...
libnvme-1.13/redhat-linux-build/../src/nvme/fabrics.c:1338:23: branch_false: ...to here
libnvme-1.13/redhat-linux-build/../src/nvme/fabrics.c:1338:23: danger: ‘open(&filename, 0)’ leaks here; was opened at [(7)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/6)
Error: GCC_ANALYZER_WARNING (CWE-775): [#def7]
libnvme-1.13/redhat-linux-build/../src/nvme/fabrics.c:1347:21: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(&filename, 0)’
libnvme-1.13/redhat-linux-build/../src/nvme/fabrics.c:1326:12: branch_false: following ‘false’ branch...
branch_false: ...to here
libnvme-1.13/redhat-linux-build/../src/nvme/fabrics.c:1328:16: branch_true: following ‘true’ branch...
libnvme-1.13/redhat-linux-build/../src/nvme/fabrics.c:1332:21: branch_true: ...to here
libnvme-1.13/redhat-linux-build/../src/nvme/fabrics.c:1347:21: acquire_resource: opened here
libnvme-1.13/redhat-linux-build/../src/nvme/fabrics.c:1347:21: danger: ‘open(&filename, 0)’ leaks here; was opened at [(5)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/4)
Error: GCC_ANALYZER_WARNING (CWE-775): [#def8]
libnvme-1.13/redhat-linux-build/../src/nvme/fabrics.c:1350:23: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(&filename, 0)’
libnvme-1.13/redhat-linux-build/../src/nvme/fabrics.c:1326:12: branch_false: following ‘false’ branch...
branch_false: ...to here
libnvme-1.13/redhat-linux-build/../src/nvme/fabrics.c:1328:16: branch_true: following ‘true’ branch...
libnvme-1.13/redhat-linux-build/../src/nvme/fabrics.c:1332:21: branch_true: ...to here
libnvme-1.13/redhat-linux-build/../src/nvme/fabrics.c:1347:21: acquire_resource: opened here
libnvme-1.13/redhat-linux-build/../src/nvme/fabrics.c:1350:23: danger: ‘open(&filename, 0)’ leaks here; was opened at [(5)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/4)
Error: GCC_ANALYZER_WARNING (CWE-775): [#def9]
libnvme-1.13/redhat-linux-build/../src/nvme/fabrics.c:1391:18: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen("/sys/class/dmi/id/product_uuid", "re")’
libnvme-1.13/redhat-linux-build/../src/nvme/fabrics.c:1391:18: acquire_resource: opened here
libnvme-1.13/redhat-linux-build/../src/nvme/fabrics.c:1391:18: danger: ‘fopen("/sys/class/dmi/id/product_uuid", "re")’ leaks here; was opened at [(1)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/0)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def10]
libnvme-1.13/redhat-linux-build/../src/nvme/fabrics.c:1391:18: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen("/sys/class/dmi/id/product_uuid", "re")’
libnvme-1.13/redhat-linux-build/../src/nvme/fabrics.c:1391:18: acquire_memory: allocated here
libnvme-1.13/redhat-linux-build/../src/nvme/fabrics.c:1391:18: danger: ‘fopen("/sys/class/dmi/id/product_uuid", "re")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/0)
Error: GCC_ANALYZER_WARNING (CWE-688): [#def11]
libnvme-1.13/redhat-linux-build/../src/nvme/fabrics.c:1795:17: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘*c.dctype’ where non-null expected
libnvme-1.13/redhat-linux-build/../src/nvme/fabrics.c:1789:6: enter_function: entry to ‘nvmf_is_registration_supported’
libnvme-1.13/redhat-linux-build/../src/nvme/fabrics.c:1792:21: call_function: calling ‘nvme_fetch_cntrltype_dctype_from_id’ from ‘nvmf_is_registration_supported’
libnvme-1.13/redhat-linux-build/../src/nvme/fabrics.c:1792:21: return_function: returning to ‘nvmf_is_registration_supported’ from ‘nvme_fetch_cntrltype_dctype_from_id’
libnvme-1.13/redhat-linux-build/../src/nvme/fabrics.c:1792:20: branch_false: following ‘false’ branch...
libnvme-1.13/redhat-linux-build/../src/nvme/fabrics.c:1795:24: branch_false: ...to here
libnvme-1.13/redhat-linux-build/../src/nvme/fabrics.c:1795:17: danger: argument 1 (‘*c.dctype’) from [(12)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/11) could be NULL where non-null expected
Error: GCC_ANALYZER_WARNING (CWE-401): [#def12]
libnvme-1.13/redhat-linux-build/../src/nvme/fabrics.c:1827:22: warning[-Wanalyzer-malloc-leak]: leak of ‘unescape_uri(elem, 0)’
libnvme-1.13/redhat-linux-build/../src/nvme/fabrics.c:1841:26: enter_function: entry to ‘nvme_parse_uri’
libnvme-1.13/redhat-linux-build/../src/nvme/fabrics.c:1865:12: branch_false: following ‘false’ branch (when ‘uri’ is non-NULL)...
libnvme-1.13/redhat-linux-build/../src/nvme/fabrics.c:1868:13: branch_false: ...to here
libnvme-1.13/redhat-linux-build/../src/nvme/fabrics.c:1868:12: branch_false: following ‘false’ branch...
libnvme-1.13/redhat-linux-build/../src/nvme/fabrics.c:1875:13: branch_false: ...to here
libnvme-1.13/redhat-linux-build/../src/nvme/fabrics.c:1875:12: branch_false: following ‘false’ branch...
libnvme-1.13/redhat-linux-build/../src/nvme/fabrics.c:1883:16: branch_false: ...to here
libnvme-1.13/redhat-linux-build/../src/nvme/fabrics.c:1891:12: branch_false: following ‘false’ branch...
libnvme-1.13/redhat-linux-build/../src/nvme/fabrics.c:1904:13: branch_false: ...to here
libnvme-1.13/redhat-linux-build/../src/nvme/fabrics.c:1904:12: branch_true: following ‘true’ branch...
libnvme-1.13/redhat-linux-build/../src/nvme/fabrics.c:1908:21: branch_true: ...to here
libnvme-1.13/redhat-linux-build/../src/nvme/fabrics.c:1909:20: branch_false: following ‘false’ branch...
libnvme-1.13/redhat-linux-build/../src/nvme/fabrics.c:1914:21: branch_false: ...to here
libnvme-1.13/redhat-linux-build/../src/nvme/fabrics.c:1915:20: branch_false: following ‘false’ branch...
libnvme-1.13/redhat-linux-build/../src/nvme/fabrics.c:1921:29: branch_false: ...to here
libnvme-1.13/redhat-linux-build/../src/nvme/fabrics.c:1928:20: branch_true: following ‘true’ branch (when ‘elem’ is non-NULL)...
libnvme-1.13/redhat-linux-build/../src/nvme/fabrics.c:1929:25: branch_true: ...to here
libnvme-1.13/redhat-linux-build/../src/nvme/fabrics.c:1929:51: call_function: calling ‘unescape_uri’ from ‘nvme_parse_uri’
libnvme-1.13/redhat-linux-build/../src/nvme/fabrics.c:1929:51: return_function: returning to ‘nvme_parse_uri’ from ‘unescape_uri’
libnvme-1.13/redhat-linux-build/../src/nvme/fabrics.c:1827:22: danger: ‘unescape_uri(elem, 0)’ leaks here; was allocated at [(22)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/21)
Error: GCC_ANALYZER_WARNING (CWE-476): [#def13]
libnvme-1.13/redhat-linux-build/../src/nvme/fabrics.c:1831:25: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘dst’
libnvme-1.13/redhat-linux-build/../src/nvme/fabrics.c:1826:9: branch_false: following ‘false’ branch (when ‘len > 0’)...
libnvme-1.13/redhat-linux-build/../src/nvme/fabrics.c:1827:22: branch_false: ...to here
libnvme-1.13/redhat-linux-build/../src/nvme/fabrics.c:1827:15: acquire_memory: this call could return NULL
libnvme-1.13/redhat-linux-build/../src/nvme/fabrics.c:1828:28: branch_true: following ‘true’ branch (when ‘l > i’)...
libnvme-1.13/redhat-linux-build/../src/nvme/fabrics.c:1829:24: branch_true: ...to here
libnvme-1.13/redhat-linux-build/../src/nvme/fabrics.c:1829:20: branch_true: following ‘true’ branch...
libnvme-1.13/redhat-linux-build/../src/nvme/fabrics.c:1831:25: danger: ‘dst + (sizetype)j’ could be NULL: unchecked value from [(3)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/2)
Error: GCC_ANALYZER_WARNING (CWE-476): [#def14]
libnvme-1.13/redhat-linux-build/../src/nvme/fabrics.c:1835:25: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘dst’
libnvme-1.13/redhat-linux-build/../src/nvme/fabrics.c:1826:9: branch_false: following ‘false’ branch (when ‘len > 0’)...
libnvme-1.13/redhat-linux-build/../src/nvme/fabrics.c:1827:22: branch_false: ...to here
libnvme-1.13/redhat-linux-build/../src/nvme/fabrics.c:1827:15: acquire_memory: this call could return NULL
libnvme-1.13/redhat-linux-build/../src/nvme/fabrics.c:1828:28: branch_true: following ‘true’ branch (when ‘l > i’)...
libnvme-1.13/redhat-linux-build/../src/nvme/fabrics.c:1829:24: branch_true: ...to here
libnvme-1.13/redhat-linux-build/../src/nvme/fabrics.c:1835:25: danger: ‘dst + (sizetype)j’ could be NULL: unchecked value from [(3)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/2)
Error: GCC_ANALYZER_WARNING (CWE-476): [#def15]
libnvme-1.13/redhat-linux-build/../src/nvme/fabrics.c:1837:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘dst’
libnvme-1.13/redhat-linux-build/../src/nvme/fabrics.c:1826:9: branch_true: following ‘true’ branch (when ‘len <= 0’)...
libnvme-1.13/redhat-linux-build/../src/nvme/fabrics.c:1826:29: branch_true: ...to here
libnvme-1.13/redhat-linux-build/../src/nvme/fabrics.c:1827:15: acquire_memory: this call could return NULL
libnvme-1.13/redhat-linux-build/../src/nvme/fabrics.c:1828:28: branch_false: following ‘false’ branch (when ‘l <= i’)...
libnvme-1.13/redhat-linux-build/../src/nvme/fabrics.c:1837:12: branch_false: ...to here
libnvme-1.13/redhat-linux-build/../src/nvme/fabrics.c:1837:9: danger: ‘dst + (sizetype)j’ could be NULL: unchecked value from [(3)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/2)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def16]
libnvme-1.13/redhat-linux-build/../src/nvme/linux.c:1657:13: warning[-Wanalyzer-malloc-leak]: leak of ‘nvme_import_tls_key_versioned(key, & version, & hmac, & key_len)’
libnvme-1.13/redhat-linux-build/../src/nvme/linux.c:1375:13: enter_function: entry to ‘__nvme_insert_tls_key’
libnvme-1.13/redhat-linux-build/../src/nvme/linux.c:1384:20: call_function: calling ‘nvme_import_tls_key_versioned’ from ‘__nvme_insert_tls_key’
libnvme-1.13/redhat-linux-build/../src/nvme/linux.c:1384:20: return_function: returning to ‘__nvme_insert_tls_key’ from ‘nvme_import_tls_key_versioned’
libnvme-1.13/redhat-linux-build/../src/nvme/linux.c:1657:13: danger: ‘nvme_import_tls_key_versioned(key, & version, & hmac, & key_len)’ leaks here; was allocated at [(16)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/15)
Error: GCC_ANALYZER_WARNING (CWE-476): [#def17]
libnvme-1.13/redhat-linux-build/../src/nvme/nbft.c:478:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘d’
libnvme-1.13/redhat-linux-build/../src/nvme/nbft.c:689:5: enter_function: entry to ‘nvme_nbft_read’
libnvme-1.13/redhat-linux-build/../src/nvme/nbft.c:700:12: branch_false: following ‘false’ branch...
libnvme-1.13/redhat-linux-build/../src/nvme/nbft.c:707:13: branch_false: ...to here
libnvme-1.13/redhat-linux-build/../src/nvme/nbft.c:708:12: branch_false: following ‘false’ branch...
libnvme-1.13/redhat-linux-build/../src/nvme/nbft.c:716:25: branch_false: ...to here
libnvme-1.13/redhat-linux-build/../src/nvme/nbft.c:720:12: branch_false: following ‘false’ branch (when ‘raw_nbft’ is non-NULL)...
libnvme-1.13/redhat-linux-build/../src/nvme/nbft.c:727:13: branch_false: ...to here
libnvme-1.13/redhat-linux-build/../src/nvme/nbft.c:728:12: branch_false: following ‘false’ branch...
libnvme-1.13/redhat-linux-build/../src/nvme/nbft.c:736:9: branch_false: ...to here
libnvme-1.13/redhat-linux-build/../src/nvme/nbft.c:742:12: branch_false: following ‘false’ branch...
libnvme-1.13/redhat-linux-build/../src/nvme/nbft.c:749:29: branch_false: ...to here
libnvme-1.13/redhat-linux-build/../src/nvme/nbft.c:753:13: call_function: calling ‘parse_raw_nbft’ from ‘nvme_nbft_read’
Error: GCC_ANALYZER_WARNING (CWE-131): [#def18]
libnvme-1.13/redhat-linux-build/../src/nvme/nbft.c:511:9: warning[-Wanalyzer-allocation-size]: allocated buffer size is not a multiple of the pointee's size
libnvme-1.13/redhat-linux-build/../src/nvme/nbft.c:689:5: enter_function: entry to ‘nvme_nbft_read’
libnvme-1.13/redhat-linux-build/../src/nvme/nbft.c:700:12: branch_false: following ‘false’ branch...
libnvme-1.13/redhat-linux-build/../src/nvme/nbft.c:707:13: branch_false: ...to here
libnvme-1.13/redhat-linux-build/../src/nvme/nbft.c:708:12: branch_false: following ‘false’ branch...
libnvme-1.13/redhat-linux-build/../src/nvme/nbft.c:716:25: branch_false: ...to here
libnvme-1.13/redhat-linux-build/../src/nvme/nbft.c:720:12: branch_false: following ‘false’ branch (when ‘raw_nbft’ is non-NULL)...
libnvme-1.13/redhat-linux-build/../src/nvme/nbft.c:727:13: branch_false: ...to here
libnvme-1.13/redhat-linux-build/../src/nvme/nbft.c:728:12: branch_false: following ‘false’ branch...
libnvme-1.13/redhat-linux-build/../src/nvme/nbft.c:736:9: branch_false: ...to here
libnvme-1.13/redhat-linux-build/../src/nvme/nbft.c:742:12: branch_false: following ‘false’ branch...
libnvme-1.13/redhat-linux-build/../src/nvme/nbft.c:749:29: branch_false: ...to here
libnvme-1.13/redhat-linux-build/../src/nvme/nbft.c:753:13: call_function: calling ‘parse_raw_nbft’ from ‘nvme_nbft_read’
Error: GCC_ANALYZER_WARNING (CWE-688): [#def19]
libnvme-1.13/redhat-linux-build/../src/nvme/tree.c:794:22: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘*s.subsysnqn’ where non-null expected
libnvme-1.13/redhat-linux-build/../src/nvme/tree.c:2191:13: enter_function: entry to ‘nvme_scan_ctrl’
libnvme-1.13/redhat-linux-build/../src/nvme/tree.c:2203:12: branch_false: following ‘false’ branch (when ‘ret >= 0’)...
libnvme-1.13/redhat-linux-build/../src/nvme/tree.c:2208:19: branch_false: ...to here
libnvme-1.13/redhat-linux-build/../src/nvme/tree.c:2210:13: call_function: calling ‘nvme_lookup_host’ from ‘nvme_scan_ctrl’
libnvme-1.13/redhat-linux-build/../src/nvme/tree.c:2210:13: return_function: returning to ‘nvme_scan_ctrl’ from ‘nvme_lookup_host’
libnvme-1.13/redhat-linux-build/../src/nvme/tree.c:2211:12: branch_true: following ‘true’ branch...
libnvme-1.13/redhat-linux-build/../src/nvme/tree.c:2212:21: branch_true: ...to here
libnvme-1.13/redhat-linux-build/../src/nvme/tree.c:2229:12: branch_false: following ‘false’ branch...
libnvme-1.13/redhat-linux-build/../src/nvme/tree.c:2233:22: branch_false: ...to here
libnvme-1.13/redhat-linux-build/../src/nvme/tree.c:2233:22: call_function: calling ‘nvme_ctrl_lookup_subsystem_name’ from ‘nvme_scan_ctrl’
libnvme-1.13/redhat-linux-build/../src/nvme/tree.c:2233:22: return_function: returning to ‘nvme_scan_ctrl’ from ‘nvme_ctrl_lookup_subsystem_name’
libnvme-1.13/redhat-linux-build/../src/nvme/tree.c:2234:12: branch_false: following ‘false’ branch...
libnvme-1.13/redhat-linux-build/../src/nvme/tree.c:2241:13: branch_false: ...to here
libnvme-1.13/redhat-linux-build/../src/nvme/tree.c:2241:13: call_function: calling ‘nvme_lookup_subsystem’ from ‘nvme_scan_ctrl’
Error: GCC_ANALYZER_WARNING (CWE-476): [#def20]
libnvme-1.13/redhat-linux-build/../src/nvme/tree.c:1860:13: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘r’
libnvme-1.13/redhat-linux-build/../src/nvme/tree.c:2258:6: enter_function: entry to ‘nvme_rescan_ctrl’
libnvme-1.13/redhat-linux-build/../src/nvme/tree.c:2260:25: branch_true: following ‘true’ branch...
libnvme-1.13/redhat-linux-build/../src/nvme/tree.c:2260:33: branch_true: ...to here
libnvme-1.13/redhat-linux-build/../src/nvme/tree.c:2260:25: branch_false: following ‘false’ branch...
libnvme-1.13/redhat-linux-build/../src/nvme/tree.c:2261:12: branch_false: ...to here
libnvme-1.13/redhat-linux-build/../src/nvme/tree.c:2261:12: branch_false: following ‘false’ branch...
libnvme-1.13/redhat-linux-build/../src/nvme/tree.c:2263:9: branch_false: ...to here
libnvme-1.13/redhat-linux-build/../src/nvme/tree.c:2263:9: call_function: calling ‘nvme_ctrl_scan_namespaces’ from ‘nvme_rescan_ctrl’
Error: GCC_ANALYZER_WARNING (CWE-401): [#def21]
libnvme-1.13/redhat-linux-build/../src/nvme/tree.c:1882:25: warning[-Wanalyzer-malloc-leak]: leak of ‘nvme_ctrl_lookup_subsystem_name(r, name)’
libnvme-1.13/redhat-linux-build/../src/nvme/tree.c:2191:13: enter_function: entry to ‘nvme_scan_ctrl’
libnvme-1.13/redhat-linux-build/../src/nvme/tree.c:2203:12: branch_false: following ‘false’ branch (when ‘ret >= 0’)...
libnvme-1.13/redhat-linux-build/../src/nvme/tree.c:2208:19: branch_false: ...to here
libnvme-1.13/redhat-linux-build/../src/nvme/tree.c:2210:13: call_function: calling ‘nvme_lookup_host’ from ‘nvme_scan_ctrl’
libnvme-1.13/redhat-linux-build/../src/nvme/tree.c:2210:13: return_function: returning to ‘nvme_scan_ctrl’ from ‘nvme_lookup_host’
libnvme-1.13/redhat-linux-build/../src/nvme/tree.c:2211:12: branch_true: following ‘true’ branch...
libnvme-1.13/redhat-linux-build/../src/nvme/tree.c:2212:21: branch_true: ...to here
libnvme-1.13/redhat-linux-build/../src/nvme/tree.c:2229:12: branch_false: following ‘false’ branch...
libnvme-1.13/redhat-linux-build/../src/nvme/tree.c:2233:22: branch_false: ...to here
libnvme-1.13/redhat-linux-build/../src/nvme/tree.c:2233:22: call_function: calling ‘nvme_ctrl_lookup_subsystem_name’ from ‘nvme_scan_ctrl’
libnvme-1.13/redhat-linux-build/../src/nvme/tree.c:2233:22: return_function: returning to ‘nvme_scan_ctrl’ from ‘nvme_ctrl_lookup_subsystem_name’
libnvme-1.13/redhat-linux-build/../src/nvme/tree.c:1882:25: danger: ‘nvme_ctrl_lookup_subsystem_name(r, name)’ leaks here; was allocated at [(29)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/28)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def22]
libnvme-1.13/redhat-linux-build/../src/nvme/tree.c:2299:12: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
libnvme-1.13/redhat-linux-build/../src/nvme/tree.c:2258:6: enter_function: entry to ‘nvme_rescan_ctrl’
libnvme-1.13/redhat-linux-build/../src/nvme/tree.c:2260:25: branch_true: following ‘true’ branch...
libnvme-1.13/redhat-linux-build/../src/nvme/tree.c:2261:12: branch_false: following ‘false’ branch...
libnvme-1.13/redhat-linux-build/../src/nvme/tree.c:2263:9: branch_false: ...to here
libnvme-1.13/redhat-linux-build/../src/nvme/tree.c:2263:9: call_function: calling ‘nvme_ctrl_scan_namespaces’ from ‘nvme_rescan_ctrl’
libnvme-1.13/redhat-linux-build/../src/nvme/tree.c:2263:9: return_function: returning to ‘nvme_rescan_ctrl’ from ‘nvme_ctrl_scan_namespaces’
libnvme-1.13/redhat-linux-build/../src/nvme/tree.c:2264:9: call_function: calling ‘nvme_ctrl_scan_paths’ from ‘nvme_rescan_ctrl’
libnvme-1.13/redhat-linux-build/../src/nvme/tree.c:2264:9: return_function: returning to ‘nvme_rescan_ctrl’ from ‘nvme_ctrl_scan_paths’
libnvme-1.13/redhat-linux-build/../src/nvme/tree.c:2265:9: call_function: calling ‘nvme_subsystem_scan_namespaces’ from ‘nvme_rescan_ctrl’
Error: GCC_ANALYZER_WARNING (CWE-401): [#def23]
libnvme-1.13/redhat-linux-build/../src/nvme/tree.c:2656:50: warning[-Wanalyzer-malloc-leak]: leak of ‘nvme_ns_open(path, nvme_ns_generic_to_blkdev(name))’
libnvme-1.13/redhat-linux-build/../src/nvme/tree.c:2258:6: enter_function: entry to ‘nvme_rescan_ctrl’
libnvme-1.13/redhat-linux-build/../src/nvme/tree.c:2260:25: branch_true: following ‘true’ branch...
libnvme-1.13/redhat-linux-build/../src/nvme/tree.c:2261:12: branch_false: following ‘false’ branch...
libnvme-1.13/redhat-linux-build/../src/nvme/tree.c:2263:9: branch_false: ...to here
libnvme-1.13/redhat-linux-build/../src/nvme/tree.c:2263:9: call_function: calling ‘nvme_ctrl_scan_namespaces’ from ‘nvme_rescan_ctrl’
libnvme-1.13/redhat-linux-build/../src/nvme/tree.c:2263:9: return_function: returning to ‘nvme_rescan_ctrl’ from ‘nvme_ctrl_scan_namespaces’
libnvme-1.13/redhat-linux-build/../src/nvme/tree.c:2264:9: call_function: calling ‘nvme_ctrl_scan_paths’ from ‘nvme_rescan_ctrl’
libnvme-1.13/redhat-linux-build/../src/nvme/tree.c:2264:9: return_function: returning to ‘nvme_rescan_ctrl’ from ‘nvme_ctrl_scan_paths’
libnvme-1.13/redhat-linux-build/../src/nvme/tree.c:2265:9: call_function: calling ‘nvme_subsystem_scan_namespaces’ from ‘nvme_rescan_ctrl’
Error: GCC_ANALYZER_WARNING (CWE-476): [#def24]
libnvme-1.13/redhat-linux-build/../test/mock-ifaddrs.c:38:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘storage’
libnvme-1.13/redhat-linux-build/../test/mock-ifaddrs.c:107:45: acquire_memory: this call could return NULL
libnvme-1.13/redhat-linux-build/../test/mock-ifaddrs.c:110:9: call_function: inlined call to ‘init_entry’ from ‘getifaddrs’
Error: GCC_ANALYZER_WARNING (CWE-401): [#def25]
libnvme-1.13/redhat-linux-build/../test/mock-ifaddrs.c:117:16: warning[-Wanalyzer-malloc-leak]: leak of ‘storage’
/usr/include/ifaddrs.h:66:12: enter_function: entry to ‘getifaddrs’
libnvme-1.13/redhat-linux-build/../test/mock-ifaddrs.c:107:45: acquire_memory: allocated here
libnvme-1.13/redhat-linux-build/../test/mock-ifaddrs.c:110:9: call_function: inlined call to ‘init_entry’ from ‘getifaddrs’
libnvme-1.13/redhat-linux-build/../test/mock-ifaddrs.c:111:9: call_function: calling ‘init_entry’ from ‘getifaddrs’
libnvme-1.13/redhat-linux-build/../test/mock-ifaddrs.c:111:9: return_function: returning to ‘getifaddrs’ from ‘init_entry’
libnvme-1.13/redhat-linux-build/../test/mock-ifaddrs.c:115:9: call_function: calling ‘init_entry’ from ‘getifaddrs’
libnvme-1.13/redhat-linux-build/../test/mock-ifaddrs.c:115:9: return_function: returning to ‘getifaddrs’ from ‘init_entry’
libnvme-1.13/redhat-linux-build/../test/mock-ifaddrs.c:117:16: danger: ‘storage’ leaks here; was allocated at [(2)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/1)
Error: CPPCHECK_WARNING (CWE-457): [#def26]
libnvme-1.13/redhat-linux-build/libnvme/nvme_wrap.c:784: warning[uninitvar]: Uninitialized variable: buff
Error: CPPCHECK_WARNING (CWE-476): [#def27]
libnvme-1.13/redhat-linux-build/libnvme/nvme_wrap.c:1680: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: data
Error: CPPCHECK_WARNING (CWE-476): [#def28]
libnvme-1.13/redhat-linux-build/libnvme/nvme_wrap.c:1681: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: data
Error: CPPCHECK_WARNING (CWE-476): [#def29]
libnvme-1.13/src/nvme/fabrics.c:1837: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: dst
Error: CPPCHECK_WARNING (CWE-758): [#def30]
libnvme-1.13/src/nvme/ioctl.c:2028: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour
Error: CPPCHECK_WARNING (CWE-476): [#def31]
libnvme-1.13/src/nvme/json.c:34: error[nullPointer]: Null pointer dereference
Error: CPPCHECK_WARNING (CWE-476): [#def32]
libnvme-1.13/src/nvme/json.c:34: error[nullPointer]: Null pointer dereference: key_str
Error: CPPCHECK_WARNING (CWE-401): [#def33]
libnvme-1.13/src/nvme/linux.c:1318: error[memleak]: Memory leak: identity
Error: CPPCHECK_WARNING (CWE-758): [#def34]
libnvme-1.13/src/nvme/mi.c:1770: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour
Error: CPPCHECK_WARNING (CWE-758): [#def35]
libnvme-1.13/src/nvme/types.h:1735: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour
Error: CPPCHECK_WARNING (CWE-758): [#def36]
libnvme-1.13/src/nvme/types.h:9391: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour
Error: CPPCHECK_WARNING (CWE-758): [#def37]
libnvme-1.13/src/nvme/types.h:9980: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour
Error: CPPCHECK_WARNING (CWE-404): [#def38]
libnvme-1.13/src/nvme/util.c:792: error[resourceLeak]: Resource leak: file
Error: CPPCHECK_WARNING (CWE-404): [#def39]
libnvme-1.13/src/nvme/util.c:798: error[resourceLeak]: Resource leak: file
Error: CPPCHECK_WARNING (CWE-562): [#def40]
libnvme-1.13/test/mi-mctp.c:519: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
Error: CPPCHECK_WARNING (CWE-562): [#def41]
libnvme-1.13/test/mi-mctp.c:537: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
Error: CPPCHECK_WARNING (CWE-562): [#def42]
libnvme-1.13/test/mi-mctp.c:562: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
Error: CPPCHECK_WARNING (CWE-562): [#def43]
libnvme-1.13/test/mi-mctp.c:649: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
Error: CPPCHECK_WARNING (CWE-562): [#def44]
libnvme-1.13/test/mi-mctp.c:652: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
Error: CPPCHECK_WARNING (CWE-562): [#def45]
libnvme-1.13/test/mi-mctp.c:678: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
Error: CPPCHECK_WARNING (CWE-562): [#def46]
libnvme-1.13/test/mi-mctp.c:681: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
Error: CPPCHECK_WARNING (CWE-562): [#def47]
libnvme-1.13/test/mi-mctp.c:707: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
Error: CPPCHECK_WARNING (CWE-562): [#def48]
libnvme-1.13/test/mi-mctp.c:710: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
Error: CPPCHECK_WARNING (CWE-457): [#def49]
libnvme-1.13/test/mi.c:986: warning[uninitvar]: Uninitialized variable: exp
Error: CPPCHECK_WARNING (CWE-476): [#def50]
libnvme-1.13/test/mock-ifaddrs.c:38: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: storage
Error: CPPCHECK_WARNING (CWE-476): [#def51]
libnvme-1.13/test/mock-ifaddrs.c:39: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: storage
Scan Properties
analyzer-version-clippy | 1.86.0 |
analyzer-version-cppcheck | 2.17.1 |
analyzer-version-gcc | 15.0.1 |
analyzer-version-gcc-analyzer | 15.0.1 |
analyzer-version-shellcheck | 0.10.0 |
analyzer-version-unicontrol | 0.0.2 |
enabled-plugins | clippy, cppcheck, gcc, shellcheck, unicontrol |
exit-code | 0 |
host | ip-172-16-1-137.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.20250425.124705.g1c7c448.main-1.el9.noarch |
mock-config | fedora-rawhide-x86_64 |
project-name | libnvme-1.13-1.fc43 |
store-results-to | /tmp/tmp83s090j4/libnvme-1.13-1.fc43.tar.xz |
time-created | 2025-04-25 14:06:29 |
time-finished | 2025-04-25 14:09:25 |
tool | csmock |
tool-args | '/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'unicontrol,cppcheck,gcc,clippy,shellcheck' '-o' '/tmp/tmp83s090j4/libnvme-1.13-1.fc43.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmp83s090j4/libnvme-1.13-1.fc43.src.rpm' |
tool-version | csmock-3.8.1.20250422.172604.g26bc3d6-1.el9 |