libssh2-1.11.1-5.fc44

List of Findings

Error: GCC_ANALYZER_WARNING (CWE-775): [#def1]
libssh2-1.11.1/src/agent.c:195:8: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'socket(1, 1, 0)'
libssh2-1.11.1/src/agent.c:186:17: acquire_resource: stream socket created here
libssh2-1.11.1/src/agent.c:187:7: branch_false: following 'false' branch...
libssh2-1.11.1/src/agent.c:191:5: branch_false: ...to here
libssh2-1.11.1/src/agent.c:195:8: danger: 'socket(1, 1, 0)' leaks here
#  193|       s_un.sun_path[sizeof(s_un.sun_path)-1] = 0; /* make sure there's a trailing
#  194|                                                      zero */
#  195|->     if(connect(agent->fd, (struct sockaddr*)(&s_un), sizeof(s_un)) != 0) {
#  196|           close(agent->fd);
#  197|           return _libssh2_error(agent->session, LIBSSH2_ERROR_AGENT_PROTOCOL,

Error: CPPCHECK_WARNING (CWE-562): [#def2]
libssh2-1.11.1/src/kex.c:2091: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
# 2089|           switch(type) {
# 2090|               case LIBSSH2_EC_CURVE_NISTP256:
# 2091|->                 LIBSSH2_KEX_METHOD_EC_SHA_HASH_CREATE_VERIFY(256);
# 2092|                   break;
# 2093|               case LIBSSH2_EC_CURVE_NISTP384:

Error: CPPCHECK_WARNING (CWE-562): [#def3]
libssh2-1.11.1/src/kex.c:2094: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
# 2092|                   break;
# 2093|               case LIBSSH2_EC_CURVE_NISTP384:
# 2094|->                 LIBSSH2_KEX_METHOD_EC_SHA_HASH_CREATE_VERIFY(384);
# 2095|                   break;
# 2096|               case LIBSSH2_EC_CURVE_NISTP521:

Error: CPPCHECK_WARNING (CWE-562): [#def4]
libssh2-1.11.1/src/kex.c:2097: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
# 2095|                   break;
# 2096|               case LIBSSH2_EC_CURVE_NISTP521:
# 2097|->                 LIBSSH2_KEX_METHOD_EC_SHA_HASH_CREATE_VERIFY(512);
# 2098|                   break;
# 2099|           }

Error: GCC_ANALYZER_WARNING (CWE-457): [#def5]
libssh2-1.11.1/src/misc.c:371:20: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value 'dlen'
libssh2-1.11.1/src/misc.c:361:1: enter_function: entry to 'libssh2_base64_decode'
libssh2-1.11.1/src/misc.c:368:10: call_function: calling '_libssh2_base64_decode' from 'libssh2_base64_decode'
libssh2-1.11.1/src/misc.c:368:10: return_function: returning to 'libssh2_base64_decode' from '_libssh2_base64_decode'
libssh2-1.11.1/src/misc.c:370:7: branch_true: following 'true' branch (when 'datalen' is non-NULL)...
libssh2-1.11.1/src/misc.c:371:20: branch_true: ...to here
libssh2-1.11.1/src/misc.c:371:20: danger: use of uninitialized value 'dlen' here
#  369|   
#  370|       if(datalen)
#  371|->         *datalen = (unsigned int)dlen;
#  372|   
#  373|       return rc;

Error: GCC_ANALYZER_WARNING (CWE-835): [#def6]
libssh2-1.11.1/src/scp.c:407:15: warning[-Wanalyzer-infinite-loop]: infinite loop
#  405|       if((session->scpRecv_state == libssh2_NB_state_sent2)
#  406|           || (session->scpRecv_state == libssh2_NB_state_sent3)) {
#  407|->         while(sb && (session->scpRecv_response_len <
#  408|                        LIBSSH2_SCP_RESPONSE_BUFLEN)) {
#  409|               unsigned char *s, *p;

Error: CPPCHECK_WARNING (CWE-562): [#def7]
libssh2-1.11.1/src/session.c:482: error[returnDanglingLifetime]: Returning pointer to local variable 'abstract' that will be invalid when returning.
#  480|           _libssh2_init_if_needed();
#  481|       }
#  482|->     return session;
#  483|   }
#  484|   

Error: GCC_ANALYZER_WARNING (CWE-457): [#def8]
libssh2-1.11.1/src/transport.c:583:21: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value '&block'
libssh2-1.11.1/src/transport.c:366:5: enter_function: entry to '_libssh2_transport_read'
libssh2-1.11.1/src/transport.c:419:7: branch_false: following 'false' branch...
libssh2-1.11.1/src/transport.c:419:7: branch_false: ...to here
libssh2-1.11.1/src/transport.c:427:11: branch_false: following 'false' branch...
libssh2-1.11.1/src/transport.c:431:12: branch_false: ...to here
libssh2-1.11.1/src/transport.c:431:11: branch_true: following 'true' branch...
libssh2-1.11.1/src/transport.c:432:25: branch_true: ...to here
libssh2-1.11.1/src/transport.c:440:11: branch_true: following 'true' branch (when 'encrypted != 0')...
libssh2-1.11.1/src/transport.c:441:16: branch_true: ...to here
libssh2-1.11.1/src/transport.c:441:16: branch_false: following 'false' branch...
libssh2-1.11.1/src/transport.c:445:17: branch_false: ...to here
libssh2-1.11.1/src/transport.c:462:9: branch_true: following 'true' branch (when 'remainbuf >= 0')...
libssh2-1.11.1/src/transport.c:464:12: branch_true: ...to here
libssh2-1.11.1/src/transport.c:464:11: branch_true: following 'true' branch...
libssh2-1.11.1/src/transport.c:473:15: branch_true: ...to here
libssh2-1.11.1/src/transport.c:473:15: branch_false: following 'false' branch (when 'remainbuf == 0')...
libssh2-1.11.1/src/transport.c:480:30: branch_false: ...to here
libssh2-1.11.1/src/transport.c:484:21: branch_true: following 'true' branch...
libssh2-1.11.1/src/transport.c:484:21: branch_true: ...to here
libssh2-1.11.1/src/transport.c:487:15: branch_false: following 'false' branch...
libssh2-1.11.1/src/transport.c:509:13: branch_false: ...to here
libssh2-1.11.1/src/transport.c:518:11: branch_true: following 'true' branch...
libssh2-1.11.1/src/transport.c:525:37: branch_true: ...to here
libssh2-1.11.1/src/transport.c:525:37: branch_true: following 'true' branch (when 'etm == 0')...
libssh2-1.11.1/src/transport.c:525:37: branch_true: ...to here
libssh2-1.11.1/src/transport.c:531:15: branch_false: following 'false' branch (when 'remainbuf >= required_size')...
libssh2-1.11.1/src/transport.c:541:15: branch_false: ...to here
libssh2-1.11.1/src/transport.c:541:15: branch_false: following 'false' branch (when 'etm == 0')...
libssh2-1.11.1/src/transport.c:546:20: branch_false: ...to here
libssh2-1.11.1/src/transport.c:546:20: branch_true: following 'true' branch (when 'encrypted != 0')...
libssh2-1.11.1/src/transport.c:546:34: branch_true: ...to here
libssh2-1.11.1/src/transport.c:546:21: branch_false: following 'false' branch...
libssh2-1.11.1/src/transport.c:575:51: branch_false: ...to here
libssh2-1.11.1/src/transport.c:575:26: call_function: calling 'decrypt' from '_libssh2_transport_read'
libssh2-1.11.1/src/transport.c:575:26: return_function: returning to '_libssh2_transport_read' from 'decrypt'
libssh2-1.11.1/src/transport.c:577:23: branch_false: following 'false' branch...
libssh2-1.11.1/src/transport.c:583:28: branch_false: ...to here
libssh2-1.11.1/src/transport.c:583:21: danger: use of uninitialized value '&block' here
#  581|                          used in the hash calculation later down.
#  582|                          This is ignored in the INTEGRATED_MAC case. */
#  583|->                     memcpy(p->init, block, 5);
#  584|                   }
#  585|                   else {

Error: GCC_ANALYZER_WARNING (CWE-476): [#def9]
libssh2-1.11.1/src/transport.c:628:34: warning[-Wanalyzer-null-dereference]: dereference of NULL 'remote_mac'
libssh2-1.11.1/src/transport.c:419:7: branch_false: following 'false' branch...
libssh2-1.11.1/src/transport.c:419:7: branch_false: ...to here
libssh2-1.11.1/src/transport.c:427:11: branch_false: following 'false' branch...
libssh2-1.11.1/src/transport.c:431:12: branch_false: ...to here
libssh2-1.11.1/src/transport.c:431:11: branch_true: following 'true' branch...
libssh2-1.11.1/src/transport.c:432:25: branch_true: ...to here
libssh2-1.11.1/src/transport.c:440:11: branch_true: following 'true' branch (when 'encrypted != 0')...
libssh2-1.11.1/src/transport.c:441:16: branch_true: ...to here
libssh2-1.11.1/src/transport.c:441:16: branch_true: following 'true' branch...
libssh2-1.11.1/src/transport.c:442:28: branch_true: ...to here
libssh2-1.11.1/src/transport.c:449:15: branch_false: following 'false' branch...
libssh2-1.11.1/src/transport.c:459:21: branch_false: ...to here
libssh2-1.11.1/src/transport.c:462:9: branch_true: following 'true' branch (when 'remainbuf >= 0')...
libssh2-1.11.1/src/transport.c:464:12: branch_true: ...to here
libssh2-1.11.1/src/transport.c:464:11: branch_true: following 'true' branch...
libssh2-1.11.1/src/transport.c:473:15: branch_true: ...to here
libssh2-1.11.1/src/transport.c:473:15: branch_true: following 'true' branch (when 'remainbuf != 0')...
libssh2-1.11.1/src/transport.c:474:33: branch_true: ...to here
libssh2-1.11.1/src/transport.c:484:21: branch_true: following 'true' branch...
libssh2-1.11.1/src/transport.c:484:21: branch_true: ...to here
libssh2-1.11.1/src/transport.c:487:15: branch_false: following 'false' branch...
libssh2-1.11.1/src/transport.c:509:13: branch_false: ...to here
libssh2-1.11.1/src/transport.c:518:11: branch_true: following 'true' branch...
libssh2-1.11.1/src/transport.c:525:37: branch_true: ...to here
libssh2-1.11.1/src/transport.c:525:37: branch_true: following 'true' branch (when 'etm == 0')...
libssh2-1.11.1/src/transport.c:525:37: branch_true: ...to here
libssh2-1.11.1/src/transport.c:531:15: branch_false: following 'false' branch (when 'remainbuf >= required_size')...
libssh2-1.11.1/src/transport.c:541:15: branch_false: ...to here
libssh2-1.11.1/src/transport.c:541:15: branch_false: following 'false' branch (when 'etm == 0')...
libssh2-1.11.1/src/transport.c:546:20: branch_false: ...to here
libssh2-1.11.1/src/transport.c:546:20: branch_true: following 'true' branch...
libssh2-1.11.1/src/transport.c:557:19: branch_false: following 'false' branch...
libssh2-1.11.1/src/transport.c:566:17: branch_false: ...to here
libssh2-1.11.1/src/transport.c:600:15: branch_false: following 'false' branch (when 'encrypted != 0')...
libssh2-1.11.1/src/transport.c:600:31: branch_false: ...to here
libssh2-1.11.1/src/transport.c:601:19: branch_false: following 'false' branch...
libssh2-1.11.1/src/transport.c:604:24: branch_false: ...to here
libssh2-1.11.1/src/transport.c:604:24: branch_false: following 'false' branch...
libssh2-1.11.1/src/transport.c:608:19: branch_false: ...to here
libssh2-1.11.1/src/transport.c:608:19: branch_false: following 'false' branch (when 'etm == 0')...
libssh2-1.11.1/src/transport.c:620:41: branch_false: ...to here
libssh2-1.11.1/src/transport.c:621:23: branch_false: following 'false' branch...
libssh2-1.11.1/src/transport.c:628:21: branch_false: ...to here
libssh2-1.11.1/src/transport.c:628:21: branch_true: following 'true' branch (when 'encrypted != 0')...
libssh2-1.11.1/src/transport.c:628:34: branch_true: ...to here
libssh2-1.11.1/src/transport.c:628:34: danger: dereference of NULL 'remote_mac'
#  626|                        (5 bytes) packet length and padding length fields */
#  627|                       total_num = p->packet_length - 1 +
#  628|->                     (encrypted ? remote_mac->mac_len : 0);
#  629|                   }
#  630|               }

Scan Properties

analyzer-version-clippy1.97.1
analyzer-version-cppcheck2.21.1
analyzer-version-gcc16.1.1
analyzer-version-gcc-analyzer16.1.1
analyzer-version-shellcheck0.11.0
analyzer-version-unicontrol0.0.2
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-61.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-namelibssh2-1.11.1-5.fc44
store-results-to/tmp/tmpjcahotx9/libssh2-1.11.1-5.fc44.tar.xz
time-created2026-08-03 17:58:11
time-finished2026-08-03 18:00:18
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'gcc,clippy,unicontrol,shellcheck,cppcheck' '-o' '/tmp/tmpjcahotx9/libssh2-1.11.1-5.fc44.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmpjcahotx9/libssh2-1.11.1-5.fc44.src.rpm'
tool-versioncsmock-3.8.7.20260803.142340.gb75b18e-1.el9