Error: GCC_ANALYZER_WARNING (CWE-401): [#def1] rdma-core-57.0/libibmad/rpc.c:554:16: warning[-Wanalyzer-malloc-leak]: leak of ‘gsi’ rdma-core-57.0/libibmad/rpc.c:497:26: enter_function: entry to ‘mad_rpc_open_port2’ rdma-core-57.0/libibmad/rpc.c:505:12: branch_false: following ‘false’ branch (when ‘num_classes <= 255’)... rdma-core-57.0/libibmad/rpc.c:511:13: branch_false: ...to here rdma-core-57.0/libibmad/rpc.c:511:12: branch_false: following ‘false’ branch... rdma-core-57.0/libibmad/rpc.c:517:27: branch_false: ...to here rdma-core-57.0/libibmad/rpc.c:523:12: branch_false: following ‘false’ branch (when ‘smi’ is non-NULL)... rdma-core-57.0/libibmad/rpc.c:527:9: branch_false: ...to here rdma-core-57.0/libibmad/rpc.c:529:15: acquire_memory: allocated here rdma-core-57.0/libibmad/rpc.c:530:12: branch_false: following ‘false’ branch (when ‘gsi’ is non-NULL)... rdma-core-57.0/libibmad/rpc.c:534:9: branch_false: ...to here rdma-core-57.0/libibmad/rpc.c:537:12: branch_false: following ‘false’ branch (when ‘ports_pair’ is non-NULL)... rdma-core-57.0/libibmad/rpc.c:541:9: branch_false: ...to here rdma-core-57.0/libibmad/rpc.c:545:13: call_function: calling ‘get_smi_gsi_pair’ from ‘mad_rpc_open_port2’ rdma-core-57.0/libibmad/rpc.c:545:13: return_function: returning to ‘mad_rpc_open_port2’ from ‘get_smi_gsi_pair’ rdma-core-57.0/libibmad/rpc.c:545:12: branch_false: following ‘false’ branch... rdma-core-57.0/libibmad/rpc.c:552:16: branch_false: ...to here rdma-core-57.0/libibmad/rpc.c:554:16: danger: ‘gsi’ leaks here; was allocated at [(8)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/7) # 552| memset(ports_pair->smi.port->class_agents, 0xff, sizeof ports_pair->smi.port->class_agents); # 553| memset(ports_pair->gsi.port->class_agents, 0xff, sizeof ports_pair->gsi.port->class_agents); # 554|-> while (num_classes--) { # 555| uint8_t rmpp_version = 0; # 556| int mgmt = *mgmt_classes++; Error: GCC_ANALYZER_WARNING (CWE-401): [#def2] rdma-core-57.0/libibmad/rpc.c:554:16: warning[-Wanalyzer-malloc-leak]: leak of ‘smi’ rdma-core-57.0/libibmad/rpc.c:497:26: enter_function: entry to ‘mad_rpc_open_port2’ rdma-core-57.0/libibmad/rpc.c:505:12: branch_false: following ‘false’ branch (when ‘num_classes <= 255’)... rdma-core-57.0/libibmad/rpc.c:511:13: branch_false: ...to here rdma-core-57.0/libibmad/rpc.c:511:12: branch_false: following ‘false’ branch... rdma-core-57.0/libibmad/rpc.c:517:27: branch_false: ...to here rdma-core-57.0/libibmad/rpc.c:522:15: acquire_memory: allocated here rdma-core-57.0/libibmad/rpc.c:523:12: branch_false: following ‘false’ branch (when ‘smi’ is non-NULL)... rdma-core-57.0/libibmad/rpc.c:527:9: branch_false: ...to here rdma-core-57.0/libibmad/rpc.c:530:12: branch_false: following ‘false’ branch (when ‘gsi’ is non-NULL)... rdma-core-57.0/libibmad/rpc.c:534:9: branch_false: ...to here rdma-core-57.0/libibmad/rpc.c:537:12: branch_false: following ‘false’ branch (when ‘ports_pair’ is non-NULL)... rdma-core-57.0/libibmad/rpc.c:541:9: branch_false: ...to here rdma-core-57.0/libibmad/rpc.c:545:13: call_function: calling ‘get_smi_gsi_pair’ from ‘mad_rpc_open_port2’ rdma-core-57.0/libibmad/rpc.c:545:13: return_function: returning to ‘mad_rpc_open_port2’ from ‘get_smi_gsi_pair’ rdma-core-57.0/libibmad/rpc.c:545:12: branch_false: following ‘false’ branch... rdma-core-57.0/libibmad/rpc.c:552:16: branch_false: ...to here rdma-core-57.0/libibmad/rpc.c:554:16: danger: ‘smi’ leaks here; was allocated at [(6)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/5) # 552| memset(ports_pair->smi.port->class_agents, 0xff, sizeof ports_pair->smi.port->class_agents); # 553| memset(ports_pair->gsi.port->class_agents, 0xff, sizeof ports_pair->gsi.port->class_agents); # 554|-> while (num_classes--) { # 555| uint8_t rmpp_version = 0; # 556| int mgmt = *mgmt_classes++; Error: GCC_ANALYZER_WARNING (CWE-401): [#def3] rdma-core-57.0/providers/mlx5/dr_arg.c:71:27: warning[-Wanalyzer-malloc-leak]: leak of ‘arg_obj’ rdma-core-57.0/providers/mlx5/dr_arg.c:126:28: enter_function: entry to ‘dr_arg_pool_create’ rdma-core-57.0/providers/mlx5/dr_arg.c:132:12: branch_false: following ‘false’ branch (when ‘pool’ is non-NULL)... rdma-core-57.0/providers/mlx5/dr_arg.c:137:9: branch_false: ...to here rdma-core-57.0/providers/mlx5/dr_arg.c:143:13: call_function: calling ‘dr_arg_pool_alloc_objs’ from ‘dr_arg_pool_create’ # 69| # 70| for (i = 0; i < num_of_objects; i++) { # 71|-> arg_obj = calloc(1, sizeof(struct dr_arg_obj)); # 72| if (!arg_obj) { # 73| errno = ENOMEM;
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 |
diffbase-analyzer-version-clippy | 1.86.0 |
diffbase-analyzer-version-cppcheck | 2.17.1 |
diffbase-analyzer-version-gcc | 15.0.1 |
diffbase-analyzer-version-gcc-analyzer | 15.0.1 |
diffbase-analyzer-version-shellcheck | 0.10.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-30.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.20250425.124705.g1c7c448.main-1.el9.noarch |
diffbase-mock-config | fedora-rawhide-x86_64 |
diffbase-project-name | rdma-core-55.0-1.fc42 |
diffbase-store-results-to | /tmp/tmptsjunb13/rdma-core-55.0-1.fc42.tar.xz |
diffbase-time-created | 2025-04-25 15:32:30 |
diffbase-time-finished | 2025-04-25 15:37:44 |
diffbase-tool | csmock |
diffbase-tool-args | '/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'unicontrol,cppcheck,gcc,clippy,shellcheck' '-o' '/tmp/tmptsjunb13/rdma-core-55.0-1.fc42.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmptsjunb13/rdma-core-55.0-1.fc42.src.rpm' |
diffbase-tool-version | csmock-3.8.1.20250422.172604.g26bc3d6-1.el9 |
enabled-plugins | clippy, cppcheck, gcc, shellcheck, unicontrol |
exit-code | 0 |
host | ip-172-16-1-30.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 | rdma-core-57.0-2.fc43 |
store-results-to | /tmp/tmpqd434krh/rdma-core-57.0-2.fc43.tar.xz |
time-created | 2025-04-25 15:37:58 |
time-finished | 2025-04-25 15:42:49 |
title | Newly introduced findings |
tool | csmock |
tool-args | '/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'unicontrol,cppcheck,gcc,clippy,shellcheck' '-o' '/tmp/tmpqd434krh/rdma-core-57.0-2.fc43.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmpqd434krh/rdma-core-57.0-2.fc43.src.rpm' |
tool-version | csmock-3.8.1.20250422.172604.g26bc3d6-1.el9 |