Error: GCC_ANALYZER_WARNING (CWE-476): [#def1] kbd-2.10.0/src/libkbdfile/kbdfile.c:488:13: warning[-Wanalyzer-null-dereference]: dereference of NULL 'fnam' kbd-2.10.0/src/libkbdfile/kbdfile.c:468:1: enter_function: entry to 'kbdfile_find' kbd-2.10.0/src/libkbdfile/kbdfile.c:472:12: branch_false: following 'false' branch... kbd-2.10.0/src/libkbdfile/kbdfile.c:477:9: branch_false: ...to here kbd-2.10.0/src/libkbdfile/kbdfile.c:481:9: call_function: calling 'kbdfile_set_pathname' from 'kbdfile_find' kbd-2.10.0/src/libkbdfile/kbdfile.c:481:9: return_function: returning to 'kbdfile_find' from 'kbdfile_set_pathname' kbd-2.10.0/src/libkbdfile/kbdfile.c:483:14: call_function: calling 'maybe_pipe_open' from 'kbdfile_find' kbd-2.10.0/src/libkbdfile/kbdfile.c:483:14: return_function: returning to 'kbdfile_find' from 'maybe_pipe_open' kbd-2.10.0/src/libkbdfile/kbdfile.c:483:12: branch_false: following 'false' branch... kbd-2.10.0/src/libkbdfile/kbdfile.c:488:13: branch_false: ...to here kbd-2.10.0/src/libkbdfile/kbdfile.c:488:13: danger: dereference of NULL 'fnam' # 486| /* Test for full pathname - opening it failed, so need suffix */ # 487| /* (This is just nonsense, for backwards compatibility.) */ # 488|-> if (*fnam == '/' && # 489| !findfile_by_fullname(fnam, suffixes, fp)) # 490| return 0; Error: GCC_ANALYZER_WARNING (CWE-401): [#def2] kbd-2.10.0/src/libkfont/psffontop.c:213:32: warning[-Wanalyzer-malloc-leak]: leak of ‘inputbuf’ kbd-2.10.0/src/libkfont/psffontop.c:195:1: enter_function: entry to ‘kfont_read_psffont’ kbd-2.10.0/src/libkfont/psffontop.c:211:12: branch_true: following ‘true’ branch (when ‘fontf’ is non-NULL)... kbd-2.10.0/src/libkfont/psffontop.c:212:28: branch_true: ...to here kbd-2.10.0/src/libkfont/psffontop.c:212:28: call_function: calling ‘read_fontfile’ from ‘kfont_read_psffont’ kbd-2.10.0/src/libkfont/psffontop.c:212:28: return_function: returning to ‘kfont_read_psffont’ from ‘read_fontfile’ kbd-2.10.0/src/libkfont/psffontop.c:212:20: branch_false: following ‘false’ branch... kbd-2.10.0/src/libkfont/psffontop.c:215:20: branch_false: ...to here kbd-2.10.0/src/libkfont/psffontop.c:215:20: branch_false: following ‘false’ branch (when ‘allbufp’ is NULL)... kbd-2.10.0/src/libkfont/psffontop.c:217:20: branch_false: ...to here kbd-2.10.0/src/libkfont/psffontop.c:213:32: danger: ‘inputbuf’ leaks here; was allocated at [(10)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/9) # 211| if (fontf) { # 212| if ((ret = read_fontfile(ctx, fontf, &inputbuf, &inputlth)) < 0) # 213|-> return ret; # 214| # 215| if (allbufp) Error: COMPILER_WARNING (CWE-563): [#def3] kbd-2.10.0/src/openvt.c: scope_hint: In function ‘proc_pid_stat’ kbd-2.10.0/src/openvt.c:65:15: warning[-Wunused-variable]: unused variable ‘lp’ # 65 | char *lp, *rp; # | ^~ # 63| char filename[NAME_MAX + 12]; # 64| char line[BUFSIZ]; # 65|-> char *lp, *rp; # 66| FILE *fp; # 67| struct stat st; Error: GCC_ANALYZER_WARNING (CWE-401): [#def4] kbd-2.10.0/src/openvt.c:150:20: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir("/proc")’ kbd-2.10.0/src/openvt.c:141:20: acquire_memory: allocated here kbd-2.10.0/src/openvt.c:141:12: branch_false: following ‘false’ branch... kbd-2.10.0/src/openvt.c:146:9: branch_false: ...to here kbd-2.10.0/src/openvt.c:147:12: branch_true: following ‘true’ branch... kbd-2.10.0/src/openvt.c:148:29: branch_true: ...to here kbd-2.10.0/src/openvt.c:150:20: danger: ‘opendir("/proc")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0) # 148| int errsv = errno; # 149| snprintf(filename, sizeof(filename), VTNAME2, curvt); # 150|-> if (stat(filename, &buf)) { # 151| /* give error message for first attempt */ # 152| snprintf(filename, sizeof(filename), VTNAME, curvt); Error: GCC_ANALYZER_WARNING (CWE-401): [#def5] kbd-2.10.0/src/openvt.c:159:12: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir("/proc")’ kbd-2.10.0/src/openvt.c:141:20: acquire_memory: allocated here kbd-2.10.0/src/openvt.c:141:12: branch_false: following ‘false’ branch... kbd-2.10.0/src/openvt.c:146:9: branch_false: ...to here kbd-2.10.0/src/openvt.c:159:12: danger: ‘opendir("/proc")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0) # 157| console_uid = buf.st_uid; # 158| # 159|-> if (console_uid == 0) # 160| kbd_error(EXIT_FAILURE, 0, _("Refusing to pre-authenticate root on current tty.")); # 161| Error: GCC_ANALYZER_WARNING (CWE-401): [#def6] kbd-2.10.0/src/openvt.c:163:12: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir("/proc")’ kbd-2.10.0/src/openvt.c:141:20: acquire_memory: allocated here kbd-2.10.0/src/openvt.c:141:12: branch_false: following ‘false’ branch... kbd-2.10.0/src/openvt.c:146:9: branch_false: ...to here kbd-2.10.0/src/openvt.c:159:12: branch_false: following ‘false’ branch (when ‘console_uid != 0’)... kbd-2.10.0/src/openvt.c:163:23: branch_false: ...to here kbd-2.10.0/src/openvt.c:163:12: danger: ‘opendir("/proc")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0) # 161| # 162| /* get the owner of current tty */ # 163|-> if (!(pwnam = getpwuid(console_uid))) # 164| kbd_error(EXIT_FAILURE, errno, "getpwuid"); # 165| Error: GCC_ANALYZER_WARNING (CWE-121): [#def7] kbd-2.10.0/src/xkbsupport.c:1151:17: warning[-Wanalyzer-out-of-bounds]: stack-based buffer overflow kbd-2.10.0/tests/libkeymap/libkeymap-test55.c:32:1: enter_function: entry to ‘test_sequence_dedup_keeps_best_candidate’ kbd-2.10.0/tests/libkeymap/libkeymap-test55.c:56:20: call_function: calling ‘xkeymap_select_compose_candidates’ from ‘test_sequence_dedup_keeps_best_candidate’ # 1149| continue; # 1150| # 1151|-> candidates[out++] = candidates[i]; # 1152| } # 1153| Error: GCC_ANALYZER_WARNING (CWE-401): [#def8] kbd-2.10.0/src/xkbsupport.c:1267:24: warning[-Wanalyzer-malloc-leak]: leak of ‘rule’ kbd-2.10.0/tests/libkeymap/libkeymap-test55.c:68:1: enter_function: entry to ‘test_kernel_rule_dedup_happens_after_selection’ kbd-2.10.0/tests/libkeymap/libkeymap-test55.c:94:9: call_function: calling ‘init_test_keymap’ from ‘test_kernel_rule_dedup_happens_after_selection’ kbd-2.10.0/tests/libkeymap/libkeymap-test55.c:94:9: return_function: returning to ‘test_kernel_rule_dedup_happens_after_selection’ from ‘init_test_keymap’ kbd-2.10.0/tests/libkeymap/libkeymap-test55.c:97:13: call_function: calling ‘xkeymap_append_compose_candidates’ from ‘test_kernel_rule_dedup_happens_after_selection’ # 1265| struct lk_kbdiacr diacr; # 1266| # 1267|-> rule = malloc(sizeof(*rule)); # 1268| if (!rule) { # 1269| ret = -1; Error: GCC_ANALYZER_WARNING (CWE-401): [#def9] kbd-2.10.0/src/xkbsupport.c:1281:20: warning[-Wanalyzer-malloc-leak]: leak of ‘rule’ kbd-2.10.0/tests/libkeymap/libkeymap-test55.c:68:1: enter_function: entry to ‘test_kernel_rule_dedup_happens_after_selection’ kbd-2.10.0/tests/libkeymap/libkeymap-test55.c:94:9: call_function: calling ‘init_test_keymap’ from ‘test_kernel_rule_dedup_happens_after_selection’ kbd-2.10.0/tests/libkeymap/libkeymap-test55.c:94:9: return_function: returning to ‘test_kernel_rule_dedup_happens_after_selection’ from ‘init_test_keymap’ kbd-2.10.0/tests/libkeymap/libkeymap-test55.c:97:13: call_function: calling ‘xkeymap_append_compose_candidates’ from ‘test_kernel_rule_dedup_happens_after_selection’ # 1279| } # 1280| # 1281|-> if (*val != rule) { # 1282| free(rule); # 1283| continue; Error: GCC_ANALYZER_WARNING (CWE-401): [#def10] kbd-2.10.0/tests/libkeymap/libkeymap-test.h:37:1: warning[-Wanalyzer-malloc-leak]: leak of ‘rule’ kbd-2.10.0/tests/libkeymap/libkeymap-test55.c:113:1: enter_function: entry to ‘test_compose_append_uses_kbd_conversion_rules’ kbd-2.10.0/tests/libkeymap/libkeymap-test55.c:129:9: call_function: calling ‘init_test_keymap’ from ‘test_compose_append_uses_kbd_conversion_rules’ kbd-2.10.0/tests/libkeymap/libkeymap-test55.c:129:9: return_function: returning to ‘test_compose_append_uses_kbd_conversion_rules’ from ‘init_test_keymap’ kbd-2.10.0/tests/libkeymap/libkeymap-test55.c:132:13: call_function: calling ‘xkeymap_append_compose_candidates’ from ‘test_compose_append_uses_kbd_conversion_rules’ # 35| # 36| kbdfile_set_pathname(keymap->kbdfile, pathname); # 37|-> } # 38| # 39| static inline int Error: GCC_ANALYZER_WARNING (CWE-775): [#def11] kbd-2.10.0/tests/libkeymap/libkeymap-test52.c:19:12: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(path, "w")’ kbd-2.10.0/tests/libkeymap/libkeymap-test52.c:14:20: acquire_resource: opened here kbd-2.10.0/tests/libkeymap/libkeymap-test52.c:16:12: branch_false: following ‘false’ branch... kbd-2.10.0/tests/libkeymap/libkeymap-test52.c:19:13: branch_false: ...to here kbd-2.10.0/tests/libkeymap/libkeymap-test52.c:19:12: danger: ‘fopen(path, "w")’ leaks here; was opened at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0) # 17| kbd_error(EXIT_FAILURE, errno, "Unable to open %s", path); # 18| # 19|-> if (fputs(content, fp) == EOF) # 20| kbd_error(EXIT_FAILURE, errno, "Unable to write %s", path); # 21| Error: GCC_ANALYZER_WARNING (CWE-401): [#def12] kbd-2.10.0/tests/libkeymap/libkeymap-test52.c:19:12: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(path, "w")’ kbd-2.10.0/tests/libkeymap/libkeymap-test52.c:14:20: acquire_memory: allocated here kbd-2.10.0/tests/libkeymap/libkeymap-test52.c:16:12: branch_false: following ‘false’ branch... kbd-2.10.0/tests/libkeymap/libkeymap-test52.c:19:13: branch_false: ...to here kbd-2.10.0/tests/libkeymap/libkeymap-test52.c:19:12: danger: ‘fopen(path, "w")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0) # 17| kbd_error(EXIT_FAILURE, errno, "Unable to open %s", path); # 18| # 19|-> if (fputs(content, fp) == EOF) # 20| kbd_error(EXIT_FAILURE, errno, "Unable to write %s", path); # 21| Error: COMPILER_WARNING: [#def13] kbd-2.10.0/tests/libkeymap/libkeymap-test55.c:1:9: warning: ‘_GNU_SOURCE’ redefined # 1 | #define _GNU_SOURCE # | ^~~~~~~~~~~ <command-line>: note: this is the location of the previous definition # 1|-> #define _GNU_SOURCE # 2| #include <stdlib.h> # 3| Error: COMPILER_WARNING: [#def14] kbd-2.10.0/tests/libkeymap/libkeymap-test55.c:1:9: warning[warning]: ‘_GNU_SOURCE’ redefined # 1|-> #define _GNU_SOURCE # 2| #include <stdlib.h> # 3| Error: GCC_ANALYZER_WARNING (CWE-401): [#def15] kbd-2.10.0/tests/libkfont/libkfont-test15.c:120:12: warning[-Wanalyzer-malloc-leak]: leak of ‘tmpfile()’ kbd-2.10.0/tests/libkfont/libkfont-test15.c:69:12: branch_false: following ‘false’ branch... kbd-2.10.0/tests/libkfont/libkfont-test15.c:72:9: branch_false: ...to here kbd-2.10.0/tests/libkfont/libkfont-test15.c:116:14: acquire_memory: allocated here kbd-2.10.0/tests/libkfont/libkfont-test15.c:117:12: branch_false: following ‘false’ branch... kbd-2.10.0/tests/libkfont/libkfont-test15.c:120:13: branch_false: ...to here kbd-2.10.0/tests/libkfont/libkfont-test15.c:120:12: danger: ‘tmpfile()’ leaks here; was allocated at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2) # 118| kbd_error(EXIT_FAILURE, errno, "tmpfile failed"); # 119| # 120|-> if (fwrite(psf, sizeof(psf), 1, fp) != 1) # 121| kbd_error(EXIT_FAILURE, errno, "unable to write psf2 test image"); # 122| Error: GCC_ANALYZER_WARNING (CWE-775): [#def16] kbd-2.10.0/tests/libkfont/libkfont-test19.c:82:12: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(path, "rb")’ kbd-2.10.0/tests/libkfont/libkfont-test19.c:77:20: acquire_resource: opened here kbd-2.10.0/tests/libkfont/libkfont-test19.c:79:12: branch_false: following ‘false’ branch... kbd-2.10.0/tests/libkfont/libkfont-test19.c:82:13: branch_false: ...to here kbd-2.10.0/tests/libkfont/libkfont-test19.c:82:12: danger: ‘fopen(path, "rb")’ leaks here; was opened at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0) # 80| kbd_error(EXIT_FAILURE, errno, "fopen failed for %s", path); # 81| # 82|-> if (fread(buf, size, 1, fp) != 1) # 83| kbd_error(EXIT_FAILURE, errno, "fread failed for %s", path); # 84| Error: GCC_ANALYZER_WARNING (CWE-401): [#def17] kbd-2.10.0/tests/libkfont/libkfont-test19.c:82:12: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(path, "rb")’ kbd-2.10.0/tests/libkfont/libkfont-test19.c:77:20: acquire_memory: allocated here kbd-2.10.0/tests/libkfont/libkfont-test19.c:79:12: branch_false: following ‘false’ branch... kbd-2.10.0/tests/libkfont/libkfont-test19.c:82:13: branch_false: ...to here kbd-2.10.0/tests/libkfont/libkfont-test19.c:82:12: danger: ‘fopen(path, "rb")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0) # 80| kbd_error(EXIT_FAILURE, errno, "fopen failed for %s", path); # 81| # 82|-> if (fread(buf, size, 1, fp) != 1) # 83| kbd_error(EXIT_FAILURE, errno, "fread failed for %s", path); # 84| Error: COMPILER_WARNING: [#def18] kbd-2.10.0/tests/libkfont/libkfont-test24.c: scope_hint: In function ‘capture_logger’ kbd-2.10.0/tests/libkfont/libkfont-test24.c:25:9: warning[-Wsuggest-attribute=format]: function ‘capture_logger’ might be a candidate for ‘gnu_printf’ format attribute # 25 | vsnprintf(last_message, sizeof(last_message), format, args); # | ^~~~~~~~~ # 23| log_calls++; # 24| last_priority = priority; # 25|-> vsnprintf(last_message, sizeof(last_message), format, args); # 26| } # 27|
| 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-89.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 | kbd-2.9.0-3.fc44 |
| diffbase-store-results-to | /tmp/tmpjc38o6yq/kbd-2.9.0-3.fc44.tar.xz |
| diffbase-time-created | 2026-08-03 15:33:29 |
| diffbase-time-finished | 2026-08-03 15:36:43 |
| diffbase-tool | csmock |
| diffbase-tool-args | '/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'gcc,clippy,unicontrol,shellcheck,cppcheck' '-o' '/tmp/tmpjc38o6yq/kbd-2.9.0-3.fc44.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmpjc38o6yq/kbd-2.9.0-3.fc44.src.rpm' |
| diffbase-tool-version | csmock-3.8.7.20260803.142340.gb75b18e-1.el9 |
| enabled-plugins | clippy, cppcheck, gcc, shellcheck, unicontrol |
| exit-code | 0 |
| host | ip-172-16-1-89.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 | kbd-2.10.0-2.fc45 |
| store-results-to | /tmp/tmpe0n99w9t/kbd-2.10.0-2.fc45.tar.xz |
| time-created | 2026-08-03 15:36:54 |
| time-finished | 2026-08-03 15:39:36 |
| title | Newly introduced findings |
| tool | csmock |
| tool-args | '/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'gcc,clippy,unicontrol,shellcheck,cppcheck' '-o' '/tmp/tmpe0n99w9t/kbd-2.10.0-2.fc45.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmpe0n99w9t/kbd-2.10.0-2.fc45.src.rpm' |
| tool-version | csmock-3.8.7.20260803.142340.gb75b18e-1.el9 |