Error: SHELLCHECK_WARNING (CWE-477): [#def1] /usr/libexec/setup-named-chroot.sh:13:19: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined. # 11| } # 12| # 13|-> if ! [ "$#" -ge 2 -a "$#" -le 3 ]; then # 14| echo 'Wrong number of arguments' # 15| usage Error: SHELLCHECK_WARNING (CWE-88): [#def2] /usr/libexec/setup-named-chroot.sh:37:35: error[SC2068]: Double quote array expansions to avoid re-splitting elements. # 35| shift # 36| if ! [ -e "$DEVNAME" ]; then # 37|-> /bin/mknod -m 0664 "$DEVNAME" $@ # 38| /bin/chgrp named "$DEVNAME" # 39| if [ -x /usr/sbin/selinuxenabled -a -x /sbin/restorecon ]; then Error: SHELLCHECK_WARNING (CWE-477): [#def3] /usr/libexec/setup-named-chroot.sh:39:38: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined. # 37| /bin/mknod -m 0664 "$DEVNAME" $@ # 38| /bin/chgrp named "$DEVNAME" # 39|-> if [ -x /usr/sbin/selinuxenabled -a -x /sbin/restorecon ]; then # 40| /usr/sbin/selinuxenabled && /sbin/restorecon "$DEVNAME" > /dev/null || : # 41| fi Error: SHELLCHECK_WARNING (CWE-156): [#def4] /usr/libexec/setup-named-chroot.sh:74:41: warning[SC2046]: Quote this to prevent word splitting. # 72| if ! [ -d "$all" ]; then # 73| # mount it only if it is not present in chroot or it is empty # 74|-> if ! [ -e "$ROOTDIR$all" ] || [ `stat -c'%s' "$ROOTDIR$all"` -eq 0 ]; then # 75| touch "$ROOTDIR$all" # 76| mount --bind "$all" "$ROOTDIR$all" Error: SHELLCHECK_WARNING (CWE-156): [#def5] /usr/libexec/setup-named-chroot.sh:81:31: warning[SC2046]: Quote this to prevent word splitting. # 79| # Mount source is a directory. Mount it only if directory in chroot is # 80| # empty. # 81|-> if [ -e "$all" ] && [ `ls -1A $ROOTDIR$all | wc -l` -eq 0 ]; then # 82| mount --bind --make-private "$all" "$ROOTDIR$all" # 83| fi Error: SHELLCHECK_WARNING (CWE-88): [#def6] /usr/libexec/setup-named-softhsm.sh:26:11: error[SC2068]: Double quote array expansions to avoid re-splitting elements. # 24| echo_i() # 25| { # 26|-> echo "#" $@ # 27| } # 28| Error: SHELLCHECK_WARNING (CWE-477): [#def7] /usr/libexec/setup-named-softhsm.sh:44:30: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined. # 42| } # 43| # 44|-> if [ "$SOFTHSM2_CONF" = "-A" -a -z "$TOKENPATH" ]; then # 45| TOKENPATH=$(mktemp -d /var/tmp/softhsm-XXXXXX) # 46| fi Error: SHELLCHECK_WARNING (CWE-477): [#def8] /usr/libexec/setup-named-softhsm.sh:48:26: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined. # 46| fi # 47| # 48|-> if [ -z "$SOFTHSM2_CONF" -o -z "$TOKENPATH" ]; then # 49| usage >&2 # 50| exit 1 Error: SHELLCHECK_WARNING (CWE-563): [#def9] /usr/libexec/setup-named-softhsm.sh:61:2: warning[SC2034]: MODE appears unused. Verify use (or export if used externally). # 59| TOKENPATH="$TOKENPATH/tokens" # 60| else # 61|-> MODE=legacy # 62| fi # 63| Error: SHELLCHECK_WARNING: [#def10] /usr/libexec/setup-named-softhsm.sh:106:8: warning[SC3037]: In POSIX sh, echo flags are undefined. # 104| SO_PIN=$(random 18) # 105| if [ -n "$PIN_SOURCE" ]; then # 106|-> echo -n "$PIN" > "$PIN_SOURCE" # 107| echo -n "$SO_PIN" > "$SOPIN_SOURCE" # 108| fi Error: SHELLCHECK_WARNING: [#def11] /usr/libexec/setup-named-softhsm.sh:107:8: warning[SC3037]: In POSIX sh, echo flags are undefined. # 105| if [ -n "$PIN_SOURCE" ]; then # 106| echo -n "$PIN" > "$PIN_SOURCE" # 107|-> echo -n "$SO_PIN" > "$SOPIN_SOURCE" # 108| fi # 109| Error: CPPCHECK_WARNING (CWE-476): [#def12] bind-9.18.35/bin/dig/readline.h:48: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: buf # 46| fprintf(stdout, "%s", prompt); # 47| fflush(stdout); # 48|-> line = fgets(buf, RL_MAXCMD, stdin); # 49| if (line == NULL) { # 50| free(buf); Error: GCC_ANALYZER_WARNING (CWE-465): [#def13] bind-9.18.35/build/bin/named/../../../bin/named/controlconf.c:888:12: warning[-Wanalyzer-deref-before-check]: check of ‘isc__mem_get(mctx, 48, 0)’ for NULL after already dereferencing it bind-9.18.35/build/bin/named/../../../bin/named/controlconf.c:1210:1: enter_function: entry to ‘named_controls_configure’ bind-9.18.35/build/bin/named/../../../bin/named/controlconf.c:1233:12: branch_false: following ‘false’ branch... branch_false: ...to here bind-9.18.35/build/bin/named/../../../bin/named/controlconf.c:1393:29: branch_true: following ‘true’ branch (when ‘i != 2’)... bind-9.18.35/build/bin/named/../../../bin/named/controlconf.c:1396:28: branch_true: ...to here bind-9.18.35/build/bin/named/../../../bin/named/controlconf.c:1396:28: branch_true: following ‘true’ branch (when ‘i == 0’)... bind-9.18.35/build/bin/named/../../../bin/named/controlconf.c:1399:37: branch_true: ...to here bind-9.18.35/build/bin/named/../../../bin/named/controlconf.c:1399:36: branch_false: following ‘false’ branch... bind-9.18.35/build/bin/named/../../../bin/named/controlconf.c:1402:33: branch_false: ...to here bind-9.18.35/build/bin/named/../../../bin/named/controlconf.c:1415:25: call_function: calling ‘update_listener’ from ‘named_controls_configure’ # 886| # 887| cleanup: # 888|-> if (keyid != NULL) { # 889| free_controlkey(keyid, mctx); # 890| } Error: GCC_ANALYZER_WARNING: [#def14] bind-9.18.35/build/bin/named/../../../bin/named/os.c:332:31: warning[-Wanalyzer-fd-use-without-check]: ‘dup2’ on possibly invalid file descriptor ‘0’ bind-9.18.35/build/bin/named/../../../bin/named/os.c:281:12: branch_false: following ‘false’ branch... bind-9.18.35/build/bin/named/../../../bin/named/os.c:286:15: branch_false: ...to here bind-9.18.35/build/bin/named/../../../bin/named/os.c:287:12: branch_false: following ‘false’ branch (when ‘pid != -1’)... bind-9.18.35/build/bin/named/../../../bin/named/os.c:291:12: branch_false: ...to here bind-9.18.35/build/bin/named/../../../bin/named/os.c:291:12: branch_false: following ‘false’ branch (when ‘pid == 0’)... bind-9.18.35/build/bin/named/../../../bin/named/os.c:308:15: branch_false: ...to here bind-9.18.35/build/bin/named/../../../bin/named/os.c:314:12: branch_false: following ‘false’ branch... bind-9.18.35/build/bin/named/../../../bin/named/os.c:329:13: branch_false: ...to here bind-9.18.35/build/bin/named/../../../bin/named/os.c:329:12: branch_true: following ‘true’ branch... bind-9.18.35/build/bin/named/../../../bin/named/os.c:330:20: branch_true: ...to here bind-9.18.35/build/bin/named/../../../bin/named/os.c:330:20: branch_true: following ‘true’ branch... bind-9.18.35/build/bin/named/../../../bin/named/os.c:331:31: branch_true: ...to here bind-9.18.35/build/bin/named/../../../bin/named/os.c:331:31: release_resource: closed here bind-9.18.35/build/bin/named/../../../bin/named/os.c:332:31: danger: ‘0’ could be invalid # 330| if (devnullfd != STDIN_FILENO) { # 331| (void)close(STDIN_FILENO); # 332|-> (void)dup2(devnullfd, STDIN_FILENO); # 333| } # 334| if (devnullfd != STDOUT_FILENO) { Error: GCC_ANALYZER_WARNING: [#def15] bind-9.18.35/build/bin/named/../../../bin/named/os.c:336:31: warning[-Wanalyzer-fd-use-without-check]: ‘dup2’ on possibly invalid file descriptor ‘1’ bind-9.18.35/build/bin/named/../../../bin/named/os.c:281:12: branch_false: following ‘false’ branch... bind-9.18.35/build/bin/named/../../../bin/named/os.c:286:15: branch_false: ...to here bind-9.18.35/build/bin/named/../../../bin/named/os.c:287:12: branch_false: following ‘false’ branch (when ‘pid != -1’)... bind-9.18.35/build/bin/named/../../../bin/named/os.c:291:12: branch_false: ...to here bind-9.18.35/build/bin/named/../../../bin/named/os.c:291:12: branch_false: following ‘false’ branch (when ‘pid == 0’)... bind-9.18.35/build/bin/named/../../../bin/named/os.c:308:15: branch_false: ...to here bind-9.18.35/build/bin/named/../../../bin/named/os.c:314:12: branch_false: following ‘false’ branch... bind-9.18.35/build/bin/named/../../../bin/named/os.c:329:13: branch_false: ...to here bind-9.18.35/build/bin/named/../../../bin/named/os.c:329:12: branch_true: following ‘true’ branch... bind-9.18.35/build/bin/named/../../../bin/named/os.c:330:20: branch_true: ...to here bind-9.18.35/build/bin/named/../../../bin/named/os.c:330:20: branch_false: following ‘false’ branch... bind-9.18.35/build/bin/named/../../../bin/named/os.c:334:21: branch_false: ...to here bind-9.18.35/build/bin/named/../../../bin/named/os.c:334:20: branch_true: following ‘true’ branch... bind-9.18.35/build/bin/named/../../../bin/named/os.c:335:31: branch_true: ...to here bind-9.18.35/build/bin/named/../../../bin/named/os.c:335:31: release_resource: closed here bind-9.18.35/build/bin/named/../../../bin/named/os.c:336:31: danger: ‘1’ could be invalid # 334| if (devnullfd != STDOUT_FILENO) { # 335| (void)close(STDOUT_FILENO); # 336|-> (void)dup2(devnullfd, STDOUT_FILENO); # 337| } # 338| if (devnullfd != STDERR_FILENO && !named_g_keepstderr) { Error: GCC_ANALYZER_WARNING: [#def16] bind-9.18.35/build/bin/named/../../../bin/named/os.c:340:31: warning[-Wanalyzer-fd-use-without-check]: ‘dup2’ on possibly invalid file descriptor ‘2’ bind-9.18.35/build/bin/named/../../../bin/named/os.c:281:12: branch_false: following ‘false’ branch... bind-9.18.35/build/bin/named/../../../bin/named/os.c:286:15: branch_false: ...to here bind-9.18.35/build/bin/named/../../../bin/named/os.c:287:12: branch_false: following ‘false’ branch (when ‘pid != -1’)... bind-9.18.35/build/bin/named/../../../bin/named/os.c:291:12: branch_false: ...to here bind-9.18.35/build/bin/named/../../../bin/named/os.c:291:12: branch_false: following ‘false’ branch (when ‘pid == 0’)... bind-9.18.35/build/bin/named/../../../bin/named/os.c:308:15: branch_false: ...to here bind-9.18.35/build/bin/named/../../../bin/named/os.c:314:12: branch_false: following ‘false’ branch... bind-9.18.35/build/bin/named/../../../bin/named/os.c:329:13: branch_false: ...to here bind-9.18.35/build/bin/named/../../../bin/named/os.c:329:12: branch_true: following ‘true’ branch... bind-9.18.35/build/bin/named/../../../bin/named/os.c:330:20: branch_true: ...to here bind-9.18.35/build/bin/named/../../../bin/named/os.c:330:20: branch_false: following ‘false’ branch... bind-9.18.35/build/bin/named/../../../bin/named/os.c:334:21: branch_false: ...to here bind-9.18.35/build/bin/named/../../../bin/named/os.c:334:20: branch_true: following ‘true’ branch... bind-9.18.35/build/bin/named/../../../bin/named/os.c:335:31: branch_true: ...to here bind-9.18.35/build/bin/named/../../../bin/named/os.c:338:20: branch_true: following ‘true’ branch... bind-9.18.35/build/bin/named/../../../bin/named/os.c:338:51: branch_true: ...to here bind-9.18.35/build/bin/named/../../../bin/named/os.c:338:21: branch_false: following ‘false’ branch... bind-9.18.35/build/bin/named/../../../bin/named/os.c:339:31: branch_false: ...to here bind-9.18.35/build/bin/named/../../../bin/named/os.c:339:31: release_resource: closed here bind-9.18.35/build/bin/named/../../../bin/named/os.c:340:31: danger: ‘2’ could be invalid # 338| if (devnullfd != STDERR_FILENO && !named_g_keepstderr) { # 339| (void)close(STDERR_FILENO); # 340|-> (void)dup2(devnullfd, STDERR_FILENO); # 341| } # 342| } Error: GCC_ANALYZER_WARNING (CWE-401): [#def17] bind-9.18.35/build/bin/tests/system/dlzexternal/driver/../../../../../../bin/tests/system/dlzexternal/driver/driver.c:325:9: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>' bind-9.18.35/build/bin/tests/system/dlzexternal/driver/../../../../../../bin/tests/system/dlzexternal/driver/driver.c:255:1: enter_function: entry to 'dlz_create' bind-9.18.35/build/bin/tests/system/dlzexternal/driver/../../../../../../bin/tests/system/dlzexternal/driver/driver.c:267:12: branch_false: following 'false' branch (when 'state' is non-NULL)... bind-9.18.35/build/bin/tests/system/dlzexternal/driver/../../../../../../bin/tests/system/dlzexternal/driver/driver.c:272:9: branch_false: ...to here bind-9.18.35/build/bin/tests/system/dlzexternal/driver/../../../../../../bin/tests/system/dlzexternal/driver/driver.c:278:12: branch_false: following 'false' branch... bind-9.18.35/build/bin/tests/system/dlzexternal/driver/../../../../../../bin/tests/system/dlzexternal/driver/driver.c:285:28: acquire_memory: allocated here bind-9.18.35/build/bin/tests/system/dlzexternal/driver/../../../../../../bin/tests/system/dlzexternal/driver/driver.c:286:12: branch_false: following 'false' branch... bind-9.18.35/build/bin/tests/system/dlzexternal/driver/../../../../../../bin/tests/system/dlzexternal/driver/driver.c:290:21: branch_false: ...to here bind-9.18.35/build/bin/tests/system/dlzexternal/driver/../../../../../../bin/tests/system/dlzexternal/driver/driver.c:290:12: branch_true: following 'true' branch... bind-9.18.35/build/bin/tests/system/dlzexternal/driver/../../../../../../bin/tests/system/dlzexternal/driver/driver.c:291:17: call_function: inlined call to 'strcpy' from 'dlz_create' bind-9.18.35/build/bin/tests/system/dlzexternal/driver/../../../../../../bin/tests/system/dlzexternal/driver/driver.c:308:12: branch_true: following 'true' branch (when 'n > 40')... bind-9.18.35/build/bin/tests/system/dlzexternal/driver/../../../../../../bin/tests/system/dlzexternal/driver/driver.c:309:17: branch_true: ...to here bind-9.18.35/build/bin/tests/system/dlzexternal/driver/../../../../../../bin/tests/system/dlzexternal/driver/driver.c:325:9: danger: '<unknown>' leaks here; was allocated at [(6)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/5) # 323| # 324| failure: # 325|-> free(state); # 326| return result; # 327| } Error: GCC_ANALYZER_WARNING (CWE-476): [#def18] bind-9.18.35/build/bin/tests/system/hooks/driver/../../../../../../bin/tests/system/hooks/driver/test-async.c:319:13: warning[-Wanalyzer-null-dereference]: dereference of NULL '0' bind-9.18.35/build/bin/tests/system/hooks/driver/../../../../../../bin/tests/system/hooks/driver/test-async.c:309:1: enter_function: entry to 'async_query_done_begin' bind-9.18.35/build/bin/tests/system/hooks/driver/../../../../../../bin/tests/system/hooks/driver/test-async.c:312:26: call_function: calling 'client_state_get' from 'async_query_done_begin' bind-9.18.35/build/bin/tests/system/hooks/driver/../../../../../../bin/tests/system/hooks/driver/test-async.c:312:26: return_function: returning to 'async_query_done_begin' from 'client_state_get' bind-9.18.35/build/bin/tests/system/hooks/driver/../../../../../../bin/tests/system/hooks/driver/test-async.c:319:13: danger: dereference of NULL 'client_state_get(arg, cbdata)' # 317| # 318| logmsg("done begin hook"); # 319|-> if (state->async) { # 320| /* resuming */ # 321| state->async = false; Error: GCC_ANALYZER_WARNING (CWE-476): [#def19] bind-9.18.35/build/lib/dns/../../../lib/dns/validator.c:2102:21: warning[-Wanalyzer-null-dereference]: dereference of NULL 'rdataset' bind-9.18.35/build/lib/dns/../../../lib/dns/validator.c:2544:1: enter_function: entry to 'validate_nx' bind-9.18.35/build/lib/dns/../../../lib/dns/validator.c:2602:12: branch_true: following 'true' branch... bind-9.18.35/build/lib/dns/../../../lib/dns/validator.c:2603:26: call_function: calling 'findnsec3proofs' from 'validate_nx' # 2100| result = val_rdataset_next(val, &name, &rdataset)) # 2101| { # 2102|-> if (rdataset->type != type || # 2103| rdataset->trust != dns_trust_secure) # 2104| { Error: GCC_ANALYZER_WARNING (CWE-457): [#def20] bind-9.18.35/build/lib/isc/../../../lib/isc/base32.c:209:30: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value '*ctx.val[1]' bind-9.18.35/build/lib/isc/../../../lib/isc/base32.c:401:1: enter_function: entry to 'isc_base32_decoderegion' bind-9.18.35/build/lib/isc/../../../lib/isc/base32.c:402:16: call_function: calling 'base32_decoderegion' from 'isc_base32_decoderegion' # 207| return ISC_R_BADBASE32; # 208| case 2: # 209|-> if ((ctx->val[1] & 0x03) != 0) { # 210| return ISC_R_BADBASE32; # 211| } Error: GCC_ANALYZER_WARNING (CWE-457): [#def21] bind-9.18.35/build/lib/isc/../../../lib/isc/base32.c:217:30: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value '*ctx.val[3]' bind-9.18.35/build/lib/isc/../../../lib/isc/base32.c:401:1: enter_function: entry to 'isc_base32_decoderegion' bind-9.18.35/build/lib/isc/../../../lib/isc/base32.c:402:16: call_function: calling 'base32_decoderegion' from 'isc_base32_decoderegion' # 215| return ISC_R_BADBASE32; # 216| case 4: # 217|-> if ((ctx->val[3] & 0x0f) != 0) { # 218| return ISC_R_BADBASE32; # 219| } Error: GCC_ANALYZER_WARNING (CWE-457): [#def22] bind-9.18.35/build/lib/isc/../../../lib/isc/base32.c:223:30: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value '*ctx.val[4]' bind-9.18.35/build/lib/isc/../../../lib/isc/base32.c:401:1: enter_function: entry to 'isc_base32_decoderegion' bind-9.18.35/build/lib/isc/../../../lib/isc/base32.c:402:16: call_function: calling 'base32_decoderegion' from 'isc_base32_decoderegion' # 221| break; # 222| case 5: # 223|-> if ((ctx->val[4] & 0x01) != 0) { # 224| return ISC_R_BADBASE32; # 225| } Error: GCC_ANALYZER_WARNING (CWE-457): [#def23] bind-9.18.35/build/lib/isc/../../../lib/isc/base32.c:231:30: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value '*ctx.val[6]' bind-9.18.35/build/lib/isc/../../../lib/isc/base32.c:406:1: enter_function: entry to 'isc_base32hex_decoderegion' bind-9.18.35/build/lib/isc/../../../lib/isc/base32.c:407:16: call_function: calling 'base32_decoderegion' from 'isc_base32hex_decoderegion' # 229| return ISC_R_BADBASE32; # 230| case 7: # 231|-> if ((ctx->val[6] & 0x07) != 0) { # 232| return ISC_R_BADBASE32; # 233| } Error: GCC_ANALYZER_WARNING (CWE-401): [#def24] bind-9.18.35/build/lib/isc/../../../lib/isc/mem.c:1365:9: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>' bind-9.18.35/build/lib/isc/../../../lib/isc/mem.c:1334:1: enter_function: entry to 'isc__mempool_get' bind-9.18.35/build/lib/isc/../../../lib/isc/mem.c:1337:9: branch_true: following 'true' branch... bind-9.18.35/build/lib/isc/../../../lib/isc/mem.c:1341:12: branch_true: following 'true' branch... bind-9.18.35/build/lib/isc/../../../lib/isc/mem.c:1342:28: branch_true: ...to here bind-9.18.35/build/lib/isc/../../../lib/isc/mem.c:1351:36: branch_true: following 'true' branch (when 'i < fillcount')... bind-9.18.35/build/lib/isc/../../../lib/isc/mem.c:1352:32: branch_true: ...to here bind-9.18.35/build/lib/isc/../../../lib/isc/mem.c:1352:32: call_function: calling 'mem_get' from 'isc__mempool_get' bind-9.18.35/build/lib/isc/../../../lib/isc/mem.c:1352:32: return_function: returning to 'isc__mempool_get' from 'mem_get' bind-9.18.35/build/lib/isc/../../../lib/isc/mem.c:1353:25: call_function: calling 'mem_getstats' from 'isc__mempool_get' bind-9.18.35/build/lib/isc/../../../lib/isc/mem.c:1353:25: return_function: returning to 'isc__mempool_get' from 'mem_getstats' bind-9.18.35/build/lib/isc/../../../lib/isc/mem.c:1351:36: branch_true: following 'true' branch (when 'i < fillcount')... bind-9.18.35/build/lib/isc/../../../lib/isc/mem.c:1352:32: branch_true: ...to here bind-9.18.35/build/lib/isc/../../../lib/isc/mem.c:1352:32: call_function: calling 'mem_get' from 'isc__mempool_get' bind-9.18.35/build/lib/isc/../../../lib/isc/mem.c:1352:32: return_function: returning to 'isc__mempool_get' from 'mem_get' bind-9.18.35/build/lib/isc/../../../lib/isc/mem.c:1353:25: call_function: calling 'mem_getstats' from 'isc__mempool_get' bind-9.18.35/build/lib/isc/../../../lib/isc/mem.c:1353:25: return_function: returning to 'isc__mempool_get' from 'mem_getstats' bind-9.18.35/build/lib/isc/../../../lib/isc/mem.c:1351:36: branch_false: following 'false' branch (when 'i >= fillcount')... bind-9.18.35/build/lib/isc/../../../lib/isc/mem.c:1360:9: branch_false: ...to here bind-9.18.35/build/lib/isc/../../../lib/isc/mem.c:1361:9: branch_true: following 'true' branch (when 'item' is non-NULL)... bind-9.18.35/build/lib/isc/../../../lib/isc/mem.c:1363:24: branch_true: ...to here bind-9.18.35/build/lib/isc/../../../lib/isc/mem.c:1365:9: danger: '<unknown>' leaks here; was allocated at [(30)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/29) # 1363| mpctx->items = item->next; # 1364| # 1365|-> INSIST(mpctx->freecount > 0); # 1366| mpctx->freecount--; # 1367| mpctx->gets++; Error: GCC_ANALYZER_WARNING (CWE-775): [#def25] bind-9.18.35/build/lib/isc/../../../lib/isc/netmgr/udp.c:134:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'dup(fd)' bind-9.18.35/build/lib/isc/../../../lib/isc/netmgr/udp.c:128:12: branch_false: following 'false' branch... bind-9.18.35/build/lib/isc/../../../lib/isc/netmgr/udp.c:133:17: branch_false: ...to here bind-9.18.35/build/lib/isc/../../../lib/isc/netmgr/udp.c:133:17: branch_true: following 'true' branch (when 'fd >= 0')... bind-9.18.35/build/lib/isc/../../../lib/isc/netmgr/udp.c:134:29: branch_true: ...to here bind-9.18.35/build/lib/isc/../../../lib/isc/netmgr/udp.c:134:29: acquire_resource: opened here bind-9.18.35/build/lib/isc/../../../lib/isc/netmgr/udp.c:134:17: danger: 'dup(fd)' leaks here; was opened at [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4) # 132| } else { # 133| INSIST(fd >= 0); # 134|-> csock->fd = dup(fd); # 135| } # 136| INSIST(csock->fd >= 0); Error: GCC_ANALYZER_WARNING (CWE-476): [#def26] bind-9.18.35/build/lib/isc/../../../lib/isc/siphash.c:125:33: warning[-Wanalyzer-null-dereference]: dereference of NULL 'in' bind-9.18.35/build/lib/isc/../../../lib/isc/siphash.c:92:9: branch_true: following 'true' branch (when 'k' is non-NULL)... bind-9.18.35/build/lib/isc/../../../lib/isc/siphash.c:93:9: branch_true: ...to here bind-9.18.35/build/lib/isc/../../../lib/isc/siphash.c:93:9: branch_true: following 'true' branch (when 'out' is non-NULL)... bind-9.18.35/build/lib/isc/../../../lib/isc/siphash.c:94:9: branch_true: ...to here bind-9.18.35/build/lib/isc/../../../lib/isc/siphash.c:94:9: branch_true: following 'true' branch... bind-9.18.35/build/lib/isc/../../../lib/isc/siphash.c:96:23: branch_true: ...to here bind-9.18.35/build/lib/isc/../../../lib/isc/siphash.c:106:30: branch_false: following 'false' branch (when 'in' is NULL)... bind-9.18.35/build/lib/isc/../../../lib/isc/siphash.c:109:22: branch_false: ...to here bind-9.18.35/build/lib/isc/../../../lib/isc/siphash.c:111:16: branch_false: following 'false' branch (when 'in == end')... bind-9.18.35/build/lib/isc/../../../lib/isc/siphash.c:123:9: branch_false: ...to here bind-9.18.35/build/lib/isc/../../../lib/isc/siphash.c:125:33: danger: dereference of NULL 'in' # 123| switch (left) { # 124| case 7: # 125|-> b |= ((uint64_t)in[6]) << 48; # 126| FALLTHROUGH; # 127| case 6: Error: GCC_ANALYZER_WARNING (CWE-476): [#def27] bind-9.18.35/build/lib/isc/../../../lib/isc/siphash.c:128:33: warning[-Wanalyzer-null-dereference]: dereference of NULL 'in' bind-9.18.35/build/lib/isc/../../../lib/isc/siphash.c:92:9: branch_true: following 'true' branch (when 'k' is non-NULL)... bind-9.18.35/build/lib/isc/../../../lib/isc/siphash.c:93:9: branch_true: ...to here bind-9.18.35/build/lib/isc/../../../lib/isc/siphash.c:93:9: branch_true: following 'true' branch (when 'out' is non-NULL)... bind-9.18.35/build/lib/isc/../../../lib/isc/siphash.c:94:9: branch_true: ...to here bind-9.18.35/build/lib/isc/../../../lib/isc/siphash.c:94:9: branch_true: following 'true' branch... bind-9.18.35/build/lib/isc/../../../lib/isc/siphash.c:96:23: branch_true: ...to here bind-9.18.35/build/lib/isc/../../../lib/isc/siphash.c:106:30: branch_false: following 'false' branch (when 'in' is NULL)... bind-9.18.35/build/lib/isc/../../../lib/isc/siphash.c:109:22: branch_false: ...to here bind-9.18.35/build/lib/isc/../../../lib/isc/siphash.c:111:16: branch_false: following 'false' branch (when 'in == end')... bind-9.18.35/build/lib/isc/../../../lib/isc/siphash.c:123:9: branch_false: ...to here bind-9.18.35/build/lib/isc/../../../lib/isc/siphash.c:128:33: danger: dereference of NULL 'in' # 126| FALLTHROUGH; # 127| case 6: # 128|-> b |= ((uint64_t)in[5]) << 40; # 129| FALLTHROUGH; # 130| case 5: Error: GCC_ANALYZER_WARNING (CWE-476): [#def28] bind-9.18.35/build/lib/isc/../../../lib/isc/siphash.c:131:33: warning[-Wanalyzer-null-dereference]: dereference of NULL 'in' bind-9.18.35/build/lib/isc/../../../lib/isc/siphash.c:92:9: branch_true: following 'true' branch (when 'k' is non-NULL)... bind-9.18.35/build/lib/isc/../../../lib/isc/siphash.c:93:9: branch_true: ...to here bind-9.18.35/build/lib/isc/../../../lib/isc/siphash.c:93:9: branch_true: following 'true' branch (when 'out' is non-NULL)... bind-9.18.35/build/lib/isc/../../../lib/isc/siphash.c:94:9: branch_true: ...to here bind-9.18.35/build/lib/isc/../../../lib/isc/siphash.c:94:9: branch_true: following 'true' branch... bind-9.18.35/build/lib/isc/../../../lib/isc/siphash.c:96:23: branch_true: ...to here bind-9.18.35/build/lib/isc/../../../lib/isc/siphash.c:106:30: branch_false: following 'false' branch (when 'in' is NULL)... bind-9.18.35/build/lib/isc/../../../lib/isc/siphash.c:109:22: branch_false: ...to here bind-9.18.35/build/lib/isc/../../../lib/isc/siphash.c:111:16: branch_false: following 'false' branch (when 'in == end')... bind-9.18.35/build/lib/isc/../../../lib/isc/siphash.c:123:9: branch_false: ...to here bind-9.18.35/build/lib/isc/../../../lib/isc/siphash.c:131:33: danger: dereference of NULL 'in' # 129| FALLTHROUGH; # 130| case 5: # 131|-> b |= ((uint64_t)in[4]) << 32; # 132| FALLTHROUGH; # 133| case 4: Error: GCC_ANALYZER_WARNING (CWE-476): [#def29] bind-9.18.35/build/lib/isc/../../../lib/isc/siphash.c:134:33: warning[-Wanalyzer-null-dereference]: dereference of NULL 'in' bind-9.18.35/build/lib/isc/../../../lib/isc/siphash.c:92:9: branch_true: following 'true' branch (when 'k' is non-NULL)... bind-9.18.35/build/lib/isc/../../../lib/isc/siphash.c:93:9: branch_true: ...to here bind-9.18.35/build/lib/isc/../../../lib/isc/siphash.c:93:9: branch_true: following 'true' branch (when 'out' is non-NULL)... bind-9.18.35/build/lib/isc/../../../lib/isc/siphash.c:94:9: branch_true: ...to here bind-9.18.35/build/lib/isc/../../../lib/isc/siphash.c:94:9: branch_true: following 'true' branch... bind-9.18.35/build/lib/isc/../../../lib/isc/siphash.c:96:23: branch_true: ...to here bind-9.18.35/build/lib/isc/../../../lib/isc/siphash.c:106:30: branch_false: following 'false' branch (when 'in' is NULL)... bind-9.18.35/build/lib/isc/../../../lib/isc/siphash.c:109:22: branch_false: ...to here bind-9.18.35/build/lib/isc/../../../lib/isc/siphash.c:111:16: branch_false: following 'false' branch (when 'in == end')... bind-9.18.35/build/lib/isc/../../../lib/isc/siphash.c:123:9: branch_false: ...to here bind-9.18.35/build/lib/isc/../../../lib/isc/siphash.c:134:33: danger: dereference of NULL 'in' # 132| FALLTHROUGH; # 133| case 4: # 134|-> b |= ((uint64_t)in[3]) << 24; # 135| FALLTHROUGH; # 136| case 3: Error: GCC_ANALYZER_WARNING (CWE-476): [#def30] bind-9.18.35/build/lib/isc/../../../lib/isc/siphash.c:137:33: warning[-Wanalyzer-null-dereference]: dereference of NULL 'in' bind-9.18.35/build/lib/isc/../../../lib/isc/siphash.c:92:9: branch_true: following 'true' branch (when 'k' is non-NULL)... bind-9.18.35/build/lib/isc/../../../lib/isc/siphash.c:93:9: branch_true: ...to here bind-9.18.35/build/lib/isc/../../../lib/isc/siphash.c:93:9: branch_true: following 'true' branch (when 'out' is non-NULL)... bind-9.18.35/build/lib/isc/../../../lib/isc/siphash.c:94:9: branch_true: ...to here bind-9.18.35/build/lib/isc/../../../lib/isc/siphash.c:94:9: branch_true: following 'true' branch... bind-9.18.35/build/lib/isc/../../../lib/isc/siphash.c:96:23: branch_true: ...to here bind-9.18.35/build/lib/isc/../../../lib/isc/siphash.c:106:30: branch_false: following 'false' branch (when 'in' is NULL)... bind-9.18.35/build/lib/isc/../../../lib/isc/siphash.c:109:22: branch_false: ...to here bind-9.18.35/build/lib/isc/../../../lib/isc/siphash.c:111:16: branch_false: following 'false' branch (when 'in == end')... bind-9.18.35/build/lib/isc/../../../lib/isc/siphash.c:123:9: branch_false: ...to here bind-9.18.35/build/lib/isc/../../../lib/isc/siphash.c:137:33: danger: dereference of NULL 'in' # 135| FALLTHROUGH; # 136| case 3: # 137|-> b |= ((uint64_t)in[2]) << 16; # 138| FALLTHROUGH; # 139| case 2: Error: GCC_ANALYZER_WARNING (CWE-476): [#def31] bind-9.18.35/build/lib/isc/../../../lib/isc/siphash.c:140:33: warning[-Wanalyzer-null-dereference]: dereference of NULL 'in' bind-9.18.35/build/lib/isc/../../../lib/isc/siphash.c:92:9: branch_true: following 'true' branch (when 'k' is non-NULL)... bind-9.18.35/build/lib/isc/../../../lib/isc/siphash.c:93:9: branch_true: ...to here bind-9.18.35/build/lib/isc/../../../lib/isc/siphash.c:93:9: branch_true: following 'true' branch (when 'out' is non-NULL)... bind-9.18.35/build/lib/isc/../../../lib/isc/siphash.c:94:9: branch_true: ...to here bind-9.18.35/build/lib/isc/../../../lib/isc/siphash.c:94:9: branch_true: following 'true' branch... bind-9.18.35/build/lib/isc/../../../lib/isc/siphash.c:96:23: branch_true: ...to here bind-9.18.35/build/lib/isc/../../../lib/isc/siphash.c:106:30: branch_false: following 'false' branch (when 'in' is NULL)... bind-9.18.35/build/lib/isc/../../../lib/isc/siphash.c:109:22: branch_false: ...to here bind-9.18.35/build/lib/isc/../../../lib/isc/siphash.c:111:16: branch_false: following 'false' branch (when 'in == end')... bind-9.18.35/build/lib/isc/../../../lib/isc/siphash.c:123:9: branch_false: ...to here bind-9.18.35/build/lib/isc/../../../lib/isc/siphash.c:140:33: danger: dereference of NULL 'in' # 138| FALLTHROUGH; # 139| case 2: # 140|-> b |= ((uint64_t)in[1]) << 8; # 141| FALLTHROUGH; # 142| case 1: Error: GCC_ANALYZER_WARNING (CWE-476): [#def32] bind-9.18.35/build/lib/isc/../../../lib/isc/siphash.c:143:33: warning[-Wanalyzer-null-dereference]: dereference of NULL 'in' bind-9.18.35/build/lib/isc/../../../lib/isc/siphash.c:92:9: branch_true: following 'true' branch (when 'k' is non-NULL)... bind-9.18.35/build/lib/isc/../../../lib/isc/siphash.c:93:9: branch_true: ...to here bind-9.18.35/build/lib/isc/../../../lib/isc/siphash.c:93:9: branch_true: following 'true' branch (when 'out' is non-NULL)... bind-9.18.35/build/lib/isc/../../../lib/isc/siphash.c:94:9: branch_true: ...to here bind-9.18.35/build/lib/isc/../../../lib/isc/siphash.c:94:9: branch_true: following 'true' branch... bind-9.18.35/build/lib/isc/../../../lib/isc/siphash.c:96:23: branch_true: ...to here bind-9.18.35/build/lib/isc/../../../lib/isc/siphash.c:106:30: branch_false: following 'false' branch (when 'in' is NULL)... bind-9.18.35/build/lib/isc/../../../lib/isc/siphash.c:109:22: branch_false: ...to here bind-9.18.35/build/lib/isc/../../../lib/isc/siphash.c:111:16: branch_false: following 'false' branch (when 'in == end')... bind-9.18.35/build/lib/isc/../../../lib/isc/siphash.c:123:9: branch_false: ...to here bind-9.18.35/build/lib/isc/../../../lib/isc/siphash.c:143:33: danger: dereference of NULL 'in' # 141| FALLTHROUGH; # 142| case 1: # 143|-> b |= ((uint64_t)in[0]); # 144| FALLTHROUGH; # 145| case 0: Error: GCC_ANALYZER_WARNING (CWE-476): [#def33] bind-9.18.35/build/lib/isc/../../../lib/isc/siphash.c:205:33: warning[-Wanalyzer-null-dereference]: dereference of NULL 'in' bind-9.18.35/build/lib/isc/../../../lib/isc/siphash.c:173:9: branch_true: following 'true' branch (when 'k' is non-NULL)... bind-9.18.35/build/lib/isc/../../../lib/isc/siphash.c:174:9: branch_true: ...to here bind-9.18.35/build/lib/isc/../../../lib/isc/siphash.c:174:9: branch_true: following 'true' branch (when 'out' is non-NULL)... bind-9.18.35/build/lib/isc/../../../lib/isc/siphash.c:175:9: branch_true: ...to here bind-9.18.35/build/lib/isc/../../../lib/isc/siphash.c:175:9: branch_true: following 'true' branch... bind-9.18.35/build/lib/isc/../../../lib/isc/siphash.c:177:23: branch_true: ...to here bind-9.18.35/build/lib/isc/../../../lib/isc/siphash.c:187:30: branch_false: following 'false' branch (when 'in' is NULL)... bind-9.18.35/build/lib/isc/../../../lib/isc/siphash.c:190:26: branch_false: ...to here bind-9.18.35/build/lib/isc/../../../lib/isc/siphash.c:192:16: branch_false: following 'false' branch (when 'in == end')... bind-9.18.35/build/lib/isc/../../../lib/isc/siphash.c:203:9: branch_false: ...to here bind-9.18.35/build/lib/isc/../../../lib/isc/siphash.c:205:33: danger: dereference of NULL 'in' # 203| switch (left) { # 204| case 3: # 205|-> b |= ((uint32_t)in[2]) << 16; # 206| FALLTHROUGH; # 207| case 2: Error: GCC_ANALYZER_WARNING (CWE-476): [#def34] bind-9.18.35/build/lib/isc/../../../lib/isc/siphash.c:208:33: warning[-Wanalyzer-null-dereference]: dereference of NULL 'in' bind-9.18.35/build/lib/isc/../../../lib/isc/siphash.c:173:9: branch_true: following 'true' branch (when 'k' is non-NULL)... bind-9.18.35/build/lib/isc/../../../lib/isc/siphash.c:174:9: branch_true: ...to here bind-9.18.35/build/lib/isc/../../../lib/isc/siphash.c:174:9: branch_true: following 'true' branch (when 'out' is non-NULL)... bind-9.18.35/build/lib/isc/../../../lib/isc/siphash.c:175:9: branch_true: ...to here bind-9.18.35/build/lib/isc/../../../lib/isc/siphash.c:175:9: branch_true: following 'true' branch... bind-9.18.35/build/lib/isc/../../../lib/isc/siphash.c:177:23: branch_true: ...to here bind-9.18.35/build/lib/isc/../../../lib/isc/siphash.c:187:30: branch_false: following 'false' branch (when 'in' is NULL)... bind-9.18.35/build/lib/isc/../../../lib/isc/siphash.c:190:26: branch_false: ...to here bind-9.18.35/build/lib/isc/../../../lib/isc/siphash.c:192:16: branch_false: following 'false' branch (when 'in == end')... bind-9.18.35/build/lib/isc/../../../lib/isc/siphash.c:203:9: branch_false: ...to here bind-9.18.35/build/lib/isc/../../../lib/isc/siphash.c:208:33: danger: dereference of NULL 'in' # 206| FALLTHROUGH; # 207| case 2: # 208|-> b |= ((uint32_t)in[1]) << 8; # 209| FALLTHROUGH; # 210| case 1: Error: GCC_ANALYZER_WARNING (CWE-476): [#def35] bind-9.18.35/build/lib/isc/../../../lib/isc/siphash.c:211:33: warning[-Wanalyzer-null-dereference]: dereference of NULL 'in' bind-9.18.35/build/lib/isc/../../../lib/isc/siphash.c:173:9: branch_true: following 'true' branch (when 'k' is non-NULL)... bind-9.18.35/build/lib/isc/../../../lib/isc/siphash.c:174:9: branch_true: ...to here bind-9.18.35/build/lib/isc/../../../lib/isc/siphash.c:174:9: branch_true: following 'true' branch (when 'out' is non-NULL)... bind-9.18.35/build/lib/isc/../../../lib/isc/siphash.c:175:9: branch_true: ...to here bind-9.18.35/build/lib/isc/../../../lib/isc/siphash.c:175:9: branch_true: following 'true' branch... bind-9.18.35/build/lib/isc/../../../lib/isc/siphash.c:177:23: branch_true: ...to here bind-9.18.35/build/lib/isc/../../../lib/isc/siphash.c:187:30: branch_false: following 'false' branch (when 'in' is NULL)... bind-9.18.35/build/lib/isc/../../../lib/isc/siphash.c:190:26: branch_false: ...to here bind-9.18.35/build/lib/isc/../../../lib/isc/siphash.c:192:16: branch_false: following 'false' branch (when 'in == end')... bind-9.18.35/build/lib/isc/../../../lib/isc/siphash.c:203:9: branch_false: ...to here bind-9.18.35/build/lib/isc/../../../lib/isc/siphash.c:211:33: danger: dereference of NULL 'in' # 209| FALLTHROUGH; # 210| case 1: # 211|-> b |= ((uint32_t)in[0]); # 212| FALLTHROUGH; # 213| case 0: Error: GCC_ANALYZER_WARNING (CWE-457): [#def36] bind-9.18.35/build/lib/isccfg/../../../lib/isccfg/parser.c:3117:17: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value 'netaddr.family' bind-9.18.35/build/lib/isccfg/../../../lib/isccfg/parser.c:1674:1: enter_function: entry to 'parse_addrmatchelt' bind-9.18.35/build/lib/isccfg/../../../lib/isccfg/parser.c:1681:12: branch_true: following 'true' branch... bind-9.18.35/build/lib/isccfg/../../../lib/isccfg/parser.c:1684:20: branch_true: ...to here bind-9.18.35/build/lib/isccfg/../../../lib/isccfg/parser.c:1684:21: branch_false: following 'false' branch... bind-9.18.35/build/lib/isccfg/../../../lib/isccfg/parser.c:1688:27: branch_false: ...to here bind-9.18.35/build/lib/isccfg/../../../lib/isccfg/parser.c:1688:28: branch_false: following 'false' branch... bind-9.18.35/build/lib/isccfg/../../../lib/isccfg/parser.c:1701:29: branch_false: ...to here bind-9.18.35/build/lib/isccfg/../../../lib/isccfg/parser.c:1701:29: call_function: calling 'cfg_lookingat_netaddr' from 'parse_addrmatchelt' bind-9.18.35/build/lib/isccfg/../../../lib/isccfg/parser.c:1701:29: return_function: returning to 'parse_addrmatchelt' from 'cfg_lookingat_netaddr' bind-9.18.35/build/lib/isccfg/../../../lib/isccfg/parser.c:1701:28: branch_true: following 'true' branch... bind-9.18.35/build/lib/isccfg/../../../lib/isccfg/parser.c:1705:33: branch_true: ...to here bind-9.18.35/build/lib/isccfg/../../../lib/isccfg/parser.c:1705:33: call_function: calling 'cfg_parse_netprefix' from 'parse_addrmatchelt' # 3115| CHECK(result); # 3116| } # 3117|-> switch (netaddr.family) { # 3118| case AF_INET: # 3119| addrlen = 32; Error: CPPCHECK_WARNING (CWE-758): [#def37] bind-9.18.35/lib/dns/adb.c:386: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour # 384| */ # 385| enum { # 386|-> FIND_EVENT_SENT = 1 << 31, # 387| FIND_EVENT_FREED = 1 << 30, # 388| }; Error: CPPCHECK_WARNING (CWE-758): [#def38] bind-9.18.35/lib/dns/adb.c:396: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour # 394| */ # 395| enum { # 396|-> NAME_IS_DEAD = 1 << 31, # 397| NAME_NEEDS_POKE = 1 << 30, # 398| }; Error: CPPCHECK_WARNING (CWE-758): [#def39] bind-9.18.35/lib/dns/adb.c:414: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour # 412| */ # 413| enum { # 414|-> ENTRY_IS_DEAD = 1 << 31, # 415| }; # 416| Error: CPPCHECK_WARNING (CWE-457): [#def40] bind-9.18.35/lib/dns/adb.c:958: error[uninitvar]: Uninitialized variable: &in6a # 956| INSIST(rdata.length == 16); # 957| memmove(in6a.s6_addr, rdata.data, 16); # 958|-> isc_sockaddr_fromin6(&sockaddr, &in6a, 0); # 959| hookhead = &adbname->v6; # 960| } Error: CPPCHECK_WARNING (CWE-457): [#def41] bind-9.18.35/lib/dns/dns64.c:465: error[uninitvar]: Uninitialized variable: &ina6 # 463| memset(ina6.s6_addr, 0, sizeof(ina6.s6_addr)); # 464| memmove(ina6.s6_addr, rd1.data, oplen / 8); # 465|-> isc_netaddr_fromin6(&prefix[count].addr, &ina6); # 466| prefix[count].prefixlen = oplen; # 467| count++; Error: CPPCHECK_WARNING (CWE-758): [#def42] bind-9.18.35/lib/dns/hmac_link.c:386: error[missingReturn]: Found an exit path from function with non-void return type that has missing return statement # 384| return TAG_HMACSHA512_KEY; # 385| } else { # 386|-> UNREACHABLE(); # 387| } # 388| } Error: CPPCHECK_WARNING (CWE-758): [#def43] bind-9.18.35/lib/dns/hmac_link.c:405: error[missingReturn]: Found an exit path from function with non-void return type that has missing return statement # 403| return TAG_HMACSHA512_BITS; # 404| } else { # 405|-> UNREACHABLE(); # 406| } # 407| } Error: CPPCHECK_WARNING (CWE-758): [#def44] bind-9.18.35/lib/dns/hmac_link.c:457: error[missingReturn]: Found an exit path from function with non-void return type that has missing return statement # 455| return DST_ALG_HMACSHA512; # 456| } else { # 457|-> UNREACHABLE(); # 458| } # 459| } Error: COMPILER_WARNING (CWE-563): [#def45] bind-9.18.35/lib/dns/openssl_link.c: scope_hint: In function 'dst__openssl_fromlabel_provider' bind-9.18.35/lib/dns/openssl_link.c:274:81: warning[-Wunused-parameter]: unused parameter 'pin' # 274 | dst__openssl_fromlabel_provider(int key_base_id, const char *label, const char *pin, # | ~~~~~~~~~~~~^~~ # 272| # 273| static isc_result_t # 274|-> dst__openssl_fromlabel_provider(int key_base_id, const char *label, const char *pin, # 275| EVP_PKEY **ppub, EVP_PKEY **ppriv) { # 276| #if OPENSSL_VERSION_NUMBER >= 0x30000000L Error: CPPCHECK_WARNING (CWE-476): [#def46] bind-9.18.35/lib/dns/rbtdb.c:3754: warning[nullPointer]: Possible null pointer dereference: firstp # 3752| # 3753| for (;;) { # 3754|-> if (*firstp) { # 3755| /* # 3756| * Construct the name of the second node to check. Error: CPPCHECK_WARNING (CWE-457): [#def47] bind-9.18.35/lib/dns/rdata.c:557: error[uninitvar]: Uninitialized variable: len # 555| unsigned int i; # 556| # 557|-> for (i = 0; i < sr->length; i += len) { # 558| /* # 559| * Check for overflow. Error: CPPCHECK_WARNING (CWE-457): [#def48] bind-9.18.35/lib/dns/resolver.c:7368: error[uninitvar]: Uninitialized variable: &in6a # 7366| INSIST(rdata.length == sizeof(in6a.s6_addr)); # 7367| memmove(in6a.s6_addr, rdata.data, sizeof(in6a.s6_addr)); # 7368|-> isc_netaddr_fromin6(&netaddr, &in6a); # 7369| } # 7370| Error: CPPCHECK_WARNING (CWE-190): [#def49] bind-9.18.35/lib/dns/resolver.c:10645: error[integerOverflow]: Signed integer overflow for expression '-2-1'. #10643| */ #10644| result = isc_task_create_bound( #10645|-> taskmgr, 0, &res->buckets[i].task, ISC_NM_TASK_SLOW(i)); #10646| if (result != ISC_R_SUCCESS) { #10647| ntasks = i; Error: CPPCHECK_WARNING (CWE-457): [#def50] bind-9.18.35/lib/isc/hash.c:121: warning[uninitvar]: Uninitialized variable: input # 119| input[i] = maptolower[((const uint8_t *)data)[i]]; # 120| } # 121|-> isc_siphash24(isc_hash_key, input, length, (uint8_t *)&hval); # 122| } # 123| Error: CPPCHECK_WARNING (CWE-457): [#def51] bind-9.18.35/lib/isc/hash.c:144: warning[uninitvar]: Uninitialized variable: input # 142| input[i] = maptolower[((const uint8_t *)data)[i]]; # 143| } # 144|-> isc_halfsiphash24(isc_hash_key, input, length, # 145| (uint8_t *)&hval); # 146| } Error: CPPCHECK_WARNING (CWE-476): [#def52] bind-9.18.35/lib/isc/jemalloc_shim.h:46: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: si # 44| INSIST(si != NULL); # 45| # 46|-> si->size = size; # 47| ptr = &si[1]; # 48| Error: CPPCHECK_WARNING (CWE-590): [#def53] bind-9.18.35/lib/isc/jemalloc_shim.h:56: error[autovarInvalidDeallocation]: Deallocation of an auto-variable ([) results in undefined behaviour. # 54| size_info *si = &(((size_info *)ptr)[-1]); # 55| # 56|-> free(si); # 57| } # 58| Error: CPPCHECK_WARNING (CWE-401): [#def54] bind-9.18.35/lib/isc/jemalloc_shim.h:72: error[memleakOnRealloc]: Common realloc mistake: 'si' nulled but not freed upon failure # 70| UNUSED(flags); # 71| # 72|-> si = realloc(si, size + sizeof(*si)); # 73| INSIST(si != NULL); # 74| Error: CPPCHECK_WARNING (CWE-476): [#def55] bind-9.18.35/lib/isc/trampoline.c:64: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: trampoline # 62| RUNTIME_CHECK(trampoline != NULL); # 63| # 64|-> *trampoline = (isc__trampoline_t){ # 65| .tid = tid, # 66| .start = start, Error: CPPCHECK_WARNING (CWE-476): [#def56] bind-9.18.35/lib/isc/trampoline.c:122: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: tmp # 120| RUNTIME_CHECK(tmp != NULL); # 121| for (size_t i = 0; i < isc__trampoline_max; i++) { # 122|-> tmp[i] = trampolines[i]; # 123| } # 124| for (size_t i = isc__trampoline_max; i < 2 * isc__trampoline_max; i++) { Error: CPPCHECK_WARNING (CWE-476): [#def57] bind-9.18.35/lib/isc/trampoline.c:125: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: tmp # 123| } # 124| for (size_t i = isc__trampoline_max; i < 2 * isc__trampoline_max; i++) { # 125|-> tmp[i] = NULL; # 126| } # 127| free(trampolines); Error: CPPCHECK_WARNING (CWE-457): [#def58] bind-9.18.35/lib/ns/query.c:3773: error[uninitvar]: Uninitialized variable: &in6a # 3771| INSIST(rdata.length == 16); # 3772| memmove(in6a.s6_addr, rdata.data, 16); # 3773|-> isc_netaddr_fromin6(&netaddr, &in6a); # 3774| break; # 3775| default: Error: CPPCHECK_WARNING (CWE-457): [#def59] bind-9.18.35/lib/ns/query.c:4599: error[uninitvar]: Uninitialized variable: &in6a # 4597| INSIST(rdata->length == 16); # 4598| memmove(in6a.s6_addr, rdata->data, 16); # 4599|-> isc_netaddr_fromin6(netaddr, &in6a); # 4600| return ISC_R_SUCCESS; # 4601| default:
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-128.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 | bind-9.18.35-2.fc43 |
store-results-to | /tmp/tmp8sz0das6/bind-9.18.35-2.fc43.tar.xz |
time-created | 2025-04-25 12:09:15 |
time-finished | 2025-04-25 12:16:05 |
tool | csmock |
tool-args | '/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'unicontrol,cppcheck,gcc,clippy,shellcheck' '-o' '/tmp/tmp8sz0das6/bind-9.18.35-2.fc43.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmp8sz0das6/bind-9.18.35-2.fc43.src.rpm' |
tool-version | csmock-3.8.1.20250422.172604.g26bc3d6-1.el9 |