Error: SHELLCHECK_WARNING (CWE-398): [#def1] /usr/bin/augenrules:87:16: warning[SC2010]: Don't use ls | grep. Use a glob or a for loop with a condition to allow non-alphanumeric filenames. # 85| umask 0137 # 86| echo "## This file is automatically generated from $SourceRulesDir" >> "${TmpRules}" # 87|-> for rules in $(ls -1v ${SourceRulesDir} | grep "\.rules$") ; do # 88| cat ${SourceRulesDir}/"${rules}" # 89| done | awk ' Error: GCC_ANALYZER_WARNING (CWE-401): [#def2] audit-userspace-4.1.4/audisp/audispd-pconfig.c:344:17: warning[-Wanalyzer-malloc-leak]: leak of 'nv.values' audit-userspace-4.1.4/audisp/audispd-pconfig.c:130:5: enter_function: entry to 'load_pconfig' audit-userspace-4.1.4/audisp/audispd-pconfig.c:143:12: branch_false: following 'false' branch... audit-userspace-4.1.4/audisp/audispd-pconfig.c:158:13: branch_false: ...to here audit-userspace-4.1.4/audisp/audispd-pconfig.c:158:12: branch_false: following 'false' branch... audit-userspace-4.1.4/audisp/audispd-pconfig.c:164:13: branch_false: ...to here audit-userspace-4.1.4/audisp/audispd-pconfig.c:164:12: branch_false: following 'false' branch... audit-userspace-4.1.4/audisp/audispd-pconfig.c:170:14: branch_false: ...to here audit-userspace-4.1.4/audisp/audispd-pconfig.c:170:12: branch_false: following 'false' branch... audit-userspace-4.1.4/audisp/audispd-pconfig.c:177:14: branch_false: ...to here audit-userspace-4.1.4/audisp/audispd-pconfig.c:177:12: branch_false: following 'false' branch... audit-userspace-4.1.4/audisp/audispd-pconfig.c:186:9: branch_false: ...to here audit-userspace-4.1.4/audisp/audispd-pconfig.c:190:12: branch_false: following 'false' branch... audit-userspace-4.1.4/audisp/audispd-pconfig.c:197:9: branch_false: ...to here audit-userspace-4.1.4/audisp/audispd-pconfig.c:202:12: branch_false: following 'false' branch (when 'f' is non-NULL)... audit-userspace-4.1.4/audisp/audispd-pconfig.c:202:12: branch_false: ...to here audit-userspace-4.1.4/audisp/audispd-pconfig.c:209:16: call_function: calling 'get_line' from 'load_pconfig' audit-userspace-4.1.4/audisp/audispd-pconfig.c:209:16: return_function: returning to 'load_pconfig' from 'get_line' audit-userspace-4.1.4/audisp/audispd-pconfig.c:209:16: branch_true: following 'true' branch... audit-userspace-4.1.4/audisp/audispd-pconfig.c:213:22: branch_true: ...to here audit-userspace-4.1.4/audisp/audispd-pconfig.c:213:22: call_function: calling 'nv_split' from 'load_pconfig' # 342| /* get the value part */ # 343| while ((ptr = strtok_r(NULL, " ", &saved)) != NULL) { # 344|-> nv->values = realloc(nv->values, (nv->nvalues + 1) * sizeof(char *)); # 345| if (nv->values == NULL) { # 346| return 1; Error: GCC_ANALYZER_WARNING (CWE-476): [#def3] audit-userspace-4.1.4/audisp/audispd-pconfig.c:458:17: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL '*config.args' audit-userspace-4.1.4/audisp/audispd-pconfig.c:454:24: acquire_memory: this call could return NULL audit-userspace-4.1.4/audisp/audispd-pconfig.c:457:25: branch_true: following 'true' branch... audit-userspace-4.1.4/audisp/audispd-pconfig.c:458:42: branch_true: ...to here audit-userspace-4.1.4/audisp/audispd-pconfig.c:458:17: danger: '*config.args + (long unsigned int)i * 8' could be NULL: unchecked value from [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0) # 456| # 457| for (int i = 0; i < nv->nvalues; i++) { # 458|-> config->args[i] = strdup(nv->values[nv->nvalues - i - 1]); # 459| } # 460| Error: GCC_ANALYZER_WARNING (CWE-476): [#def4] audit-userspace-4.1.4/audisp/plugins/remote/audisp-remote.c:1391:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘utok.value’ audit-userspace-4.1.4/audisp/plugins/remote/audisp-remote.c:1740:12: enter_function: entry to ‘relay_event’ audit-userspace-4.1.4/audisp/plugins/remote/audisp-remote.c:1748:30: call_function: calling ‘relay_sock’ from ‘relay_event’ # 1389| utok.value = malloc (utok.length); # 1390| # 1391|-> memcpy (utok.value, header, AUDIT_RMW_HEADER_SIZE); # 1392| # 1393| if (msg != NULL && mlen > 0) Error: CPPCHECK_WARNING (CWE-476): [#def5] audit-userspace-4.1.4/auparse/auparse.c:509: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: tmp # 507| tmp = malloc((n+1)*sizeof(char *)); # 508| for (i=0; i<n; i++) # 509|-> tmp[i] = strdup(bb[i]); # 510| tmp[n] = NULL; # 511| au->source_list = tmp; Error: CPPCHECK_WARNING (CWE-476): [#def6] audit-userspace-4.1.4/auparse/auparse.c:510: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: tmp # 508| for (i=0; i<n; i++) # 509| tmp[i] = strdup(bb[i]); # 510|-> tmp[n] = NULL; # 511| au->source_list = tmp; # 512| break; Error: CPPCHECK_WARNING (CWE-682): [#def7] audit-userspace-4.1.4/auparse/ellist.c:77: error[nullPointerArithmeticOutOfMemory]: If memory allocation fails: pointer addition with NULL pointer. # 75| # 76| for (i=0; i<size; i++) { # 77|-> *ptr++ = hex[(buf[i] & 0xF0)>>4]; /* Upper nibble */ # 78| *ptr++ = hex[buf[i] & 0x0F]; /* Lower nibble */ # 79| } Error: CPPCHECK_WARNING (CWE-476): [#def8] audit-userspace-4.1.4/auparse/ellist.c:77: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: ptr++ # 75| # 76| for (i=0; i<size; i++) { # 77|-> *ptr++ = hex[(buf[i] & 0xF0)>>4]; /* Upper nibble */ # 78| *ptr++ = hex[buf[i] & 0x0F]; /* Lower nibble */ # 79| } Error: GCC_ANALYZER_WARNING (CWE-476): [#def9] audit-userspace-4.1.4/auparse/ellist.c:77:17: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL 'ptr' audit-userspace-4.1.4/auparse/ellist.c:357:5: enter_function: entry to 'aup_list_append' audit-userspace-4.1.4/auparse/ellist.c:363:12: branch_false: following 'false' branch (when 'record' is non-NULL)... audit-userspace-4.1.4/auparse/ellist.c:367:13: branch_false: ...to here audit-userspace-4.1.4/auparse/ellist.c:368:12: branch_false: following 'false' branch (when 'r' is non-NULL)... audit-userspace-4.1.4/auparse/ellist.c:371:9: branch_false: ...to here audit-userspace-4.1.4/auparse/ellist.c:398:14: call_function: calling 'parse_up_record' from 'aup_list_append' # 75| # 76| for (i=0; i<size; i++) { # 77|-> *ptr++ = hex[(buf[i] & 0xF0)>>4]; /* Upper nibble */ # 78| *ptr++ = hex[buf[i] & 0x0F]; /* Lower nibble */ # 79| } Error: GCC_ANALYZER_WARNING (CWE-476): [#def10] audit-userspace-4.1.4/auparse/ellist.c:80:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL 'ptr' audit-userspace-4.1.4/auparse/ellist.c:357:5: enter_function: entry to 'aup_list_append' audit-userspace-4.1.4/auparse/ellist.c:363:12: branch_false: following 'false' branch (when 'record' is non-NULL)... audit-userspace-4.1.4/auparse/ellist.c:367:13: branch_false: ...to here audit-userspace-4.1.4/auparse/ellist.c:368:12: branch_false: following 'false' branch (when 'r' is non-NULL)... audit-userspace-4.1.4/auparse/ellist.c:371:9: branch_false: ...to here audit-userspace-4.1.4/auparse/ellist.c:398:14: call_function: calling 'parse_up_record' from 'aup_list_append' # 78| *ptr++ = hex[buf[i] & 0x0F]; /* Lower nibble */ # 79| } # 80|-> *ptr = 0; # 81| return final; # 82| } Error: GCC_ANALYZER_WARNING (CWE-688): [#def11] audit-userspace-4.1.4/auparse/interpret.c:1077:32: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL 'ptr' where non-null expected audit-userspace-4.1.4/auparse/interpret.c:3417:7: enter_function: entry to 'auparse_do_interpretation' audit-userspace-4.1.4/auparse/interpret.c:3543:31: call_function: calling 'print_proctitle' from 'auparse_do_interpretation' # 1075| // We need to write over the NUL bytes with a space # 1076| // so that we can see the arguments # 1077|-> while ((ptr = STRCHR(ptr, '\0'))) { # 1078| if (ptr >= end) # 1079| break; Error: GCC_ANALYZER_WARNING (CWE-688): [#def12] audit-userspace-4.1.4/src/auditd-config.c:369:14: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘config_file’ where non-null expected audit-userspace-4.1.4/src/auditd-config.c:362:12: branch_true: following ‘true’ branch... audit-userspace-4.1.4/src/auditd-config.c:363:31: branch_true: ...to here audit-userspace-4.1.4/src/auditd-config.c:363:31: acquire_memory: this call could return NULL audit-userspace-4.1.4/src/auditd-config.c:369:14: danger: argument 1 (‘config_file’) from [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2) could be NULL where non-null expected # 367| if (allow_links == 0) # 368| mode |= O_NOFOLLOW; # 369|-> rc = open(config_file, mode); # 370| if (rc < 0) { # 371| if (errno != ENOENT) { Error: GCC_ANALYZER_WARNING (CWE-476): [#def13] audit-userspace-4.1.4/src/auditd-listen.c:521:17: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘utok.value’ audit-userspace-4.1.4/src/auditd-listen.c:519:30: acquire_memory: this call could return NULL audit-userspace-4.1.4/src/auditd-listen.c:521:17: danger: ‘malloc((long unsigned int)(mlen + 16) + 1)’ could be NULL: unchecked value from [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0) # 519| utok.value = malloc(utok.length + 1); # 520| # 521|-> memcpy(utok.value, header, AUDIT_RMW_HEADER_SIZE); # 522| memcpy(utok.value+AUDIT_RMW_HEADER_SIZE, msg, mlen); # 523| Error: GCC_ANALYZER_WARNING (CWE-688): [#def14] audit-userspace-4.1.4/src/aureport.c:193:15: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘config.log_file’ where non-null expected audit-userspace-4.1.4/src/aureport.c:179:12: branch_true: following ‘true’ branch... audit-userspace-4.1.4/src/aureport.c:189:33: acquire_memory: this call could return NULL audit-userspace-4.1.4/src/aureport.c:193:15: danger: argument 1 (‘config.log_file’) from [(4)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/3) could be NULL where non-null expected # 191| } # 192| # 193|-> len = strlen(config.log_file) + 16; # 194| filename = malloc(len); # 195| if (!filename) { Error: GCC_ANALYZER_WARNING (CWE-688): [#def15] audit-userspace-4.1.4/src/ausearch.c:256:15: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘config.log_file’ where non-null expected audit-userspace-4.1.4/src/ausearch.c:242:12: branch_true: following ‘true’ branch... audit-userspace-4.1.4/src/ausearch.c:252:33: acquire_memory: this call could return NULL audit-userspace-4.1.4/src/ausearch.c:256:15: danger: argument 1 (‘config.log_file’) from [(4)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/3) could be NULL where non-null expected # 254| } # 255| # 256|-> len = strlen(config.log_file) + 16; # 257| filename = malloc(len); # 258| if (!filename) {
| analyzer-version-clippy | 1.97.1 |
| analyzer-version-cppcheck | 2.21.1 |
| analyzer-version-gcc | 16.1.1 |
| analyzer-version-gcc-analyzer | 16.1.1 |
| analyzer-version-shellcheck | 0.11.0 |
| analyzer-version-unicontrol | 0.0.2 |
| diffbase-analyzer-version-clippy | 1.97.1 |
| diffbase-analyzer-version-cppcheck | 2.21.1 |
| diffbase-analyzer-version-gcc | 16.1.1 |
| diffbase-analyzer-version-gcc-analyzer | 16.1.1 |
| diffbase-analyzer-version-shellcheck | 0.11.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-150.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.20260524.213755.g3c6d0be.main-1.el9.noarch |
| diffbase-mock-config | fedora-rawhide-x86_64 |
| diffbase-project-name | audit-4.2.1-1.fc45 |
| diffbase-store-results-to | /tmp/tmphwq2bpar/audit-4.2.1-1.fc45.tar.xz |
| diffbase-time-created | 2026-08-03 13:25:12 |
| diffbase-time-finished | 2026-08-03 13:27:58 |
| diffbase-tool | csmock |
| diffbase-tool-args | '/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'gcc,clippy,unicontrol,shellcheck,cppcheck' '-o' '/tmp/tmphwq2bpar/audit-4.2.1-1.fc45.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmphwq2bpar/audit-4.2.1-1.fc45.src.rpm' |
| diffbase-tool-version | csmock-3.8.7.HEAD-1.el9 |
| enabled-plugins | clippy, cppcheck, gcc, shellcheck, unicontrol |
| exit-code | 0 |
| host | ip-172-16-1-150.us-west-2.compute.internal |
| known-false-positives | /usr/share/csmock/known-false-positives.js |
| known-false-positives-rpm | known-false-positives-0.0.0.20260524.213755.g3c6d0be.main-1.el9.noarch |
| mock-config | fedora-rawhide-x86_64 |
| project-name | audit-4.1.4-1.fc44 |
| store-results-to | /tmp/tmpj68xplob/audit-4.1.4-1.fc44.tar.xz |
| time-created | 2026-08-03 13:21:26 |
| time-finished | 2026-08-03 13:24:58 |
| title | Fixed findings |
| tool | csmock |
| tool-args | '/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'gcc,clippy,unicontrol,shellcheck,cppcheck' '-o' '/tmp/tmpj68xplob/audit-4.1.4-1.fc44.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmpj68xplob/audit-4.1.4-1.fc44.src.rpm' |
| tool-version | csmock-3.8.7.HEAD-1.el9 |