Error: CPPCHECK_WARNING (CWE-457): [#def1] gdm-50.0/common/gdm-settings.c:106: warning[uninitvar]: Uninitialized variable: res # 104| break; # 105| } # 106|-> if (! res) { # 107| g_propagate_error (error, local_error); # 108| } Error: CPPCHECK_WARNING (CWE-457): [#def2] gdm-50.0/common/gdm-settings.c:148: warning[uninitvar]: Uninitialized variable: res # 146| } # 147| # 148|-> if (! res) { # 149| g_propagate_error (error, local_error); # 150| } Error: COMPILER_WARNING (CWE-457): [#def3] gdm-50.0/daemon/gdm-display.c: scope_hint: In function ‘handle_is_local’ gdm-50.0/daemon/gdm-display.c:734:9: warning[-Wmaybe-uninitialized]: ‘is_local’ may be used uninitialized # 734 | gdm_dbus_display_complete_is_local (skeleton, invocation, is_local); # | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ gdm-50.0/daemon/gdm-display.c:730:18: note: ‘is_local’ was declared here # 730 | gboolean is_local; # | ^~~~~~~~ # 732| gdm_display_is_local (self, &is_local, NULL); # 733| # 734|-> gdm_dbus_display_complete_is_local (skeleton, invocation, is_local); # 735| # 736| return TRUE; Error: COMPILER_WARNING (CWE-252): [#def4] gdm-50.0/daemon/gdm-session-linux-auditor.c: scope_hint: In function ‘log_user_message’ gdm-50.0/daemon/gdm-session-linux-auditor.c:77:17: warning[-Wunused-result]: ignoring return value of ‘audit_log_user_message’ declared with attribute ‘warn_unused_result’ # 77 | audit_log_user_message (linux_auditor->audit_fd, type, # | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # 78 | buf, hostname, NULL, display_device, # | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # 79 | result); # | ~~~~~~~ # 75| if (pw != NULL) { # 76| g_snprintf (buf, sizeof (buf), "uid=%d", pw->pw_uid); # 77|-> audit_log_user_message (linux_auditor->audit_fd, type, # 78| buf, hostname, NULL, display_device, # 79| result); Error: COMPILER_WARNING (CWE-252): [#def5] gdm-50.0/daemon/gdm-session-linux-auditor.c:82:17: warning[-Wunused-result]: ignoring return value of ‘audit_log_user_message’ declared with attribute ‘warn_unused_result’ # 82 | audit_log_user_message (linux_auditor->audit_fd, type, # | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # 83 | buf, hostname, NULL, display_device, # | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # 84 | result); # | ~~~~~~~ # 80| } else { # 81| g_snprintf (buf, sizeof (buf), "acct=%s", username); # 82|-> audit_log_user_message (linux_auditor->audit_fd, type, # 83| buf, hostname, NULL, display_device, # 84| result); Error: COMPILER_WARNING (CWE-457): [#def6] gdm-50.0/daemon/gdm-session-record.c: scope_hint: In function ‘gdm_session_record’ gdm-50.0/daemon/gdm-session-record.c:287:9: warning[-Wmaybe-uninitialized]: ‘write_record’ may be used uninitialized # 287 | write_record (&record); # | ^~~~~~~~~~~~~~~~~~~~~~ gdm-50.0/daemon/gdm-session-record.c:248:16: note: ‘write_record’ was declared here # 248 | void (*write_record)(UTMP *); # | ^~~~~~~~~~~~ # 285| record_set_line (&record, tty, seat_id); # 286| # 287|-> write_record (&record); # 288| } Error: CPPCHECK_WARNING (CWE-476): [#def7] gdm-50.0/daemon/gdm-session-worker.c:658: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: list_response # 656| g_debug ("GdmSessionWorker: received extended pam message '%s'", GDM_PAM_EXTENSION_CHOICE_LIST); # 657| # 658|-> GDM_PAM_EXTENSION_CHOICE_LIST_RESPONSE_INIT (list_response); # 659| # 660| res = gdm_session_worker_process_choice_list_request (worker, list_request, list_response); Error: GCC_ANALYZER_WARNING (CWE-476): [#def8] gdm-50.0/daemon/gdm-session-worker.c:658:17: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘list_response’ gdm-50.0/daemon/gdm-session-worker.c:865:1: enter_function: entry to ‘gdm_session_worker_pam_new_messages_handler’ gdm-50.0/daemon/gdm-session-worker.c:894:21: branch_true: following ‘true’ branch (when ‘number_of_messages > i’)... gdm-50.0/daemon/gdm-session-worker.c:898:17: branch_true: ...to here gdm-50.0/daemon/gdm-session-worker.c:899:32: call_function: calling ‘gdm_session_worker_process_pam_message’ from ‘gdm_session_worker_pam_new_messages_handler’ # 656| g_debug ("GdmSessionWorker: received extended pam message '%s'", GDM_PAM_EXTENSION_CHOICE_LIST); # 657| # 658|-> GDM_PAM_EXTENSION_CHOICE_LIST_RESPONSE_INIT (list_response); # 659| # 660| res = gdm_session_worker_process_choice_list_request (worker, list_request, list_response); Error: GCC_ANALYZER_WARNING (CWE-476): [#def9] gdm-50.0/daemon/gdm-session-worker.c:675:17: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘json_response’ gdm-50.0/daemon/gdm-session-worker.c:865:1: enter_function: entry to ‘gdm_session_worker_pam_new_messages_handler’ gdm-50.0/daemon/gdm-session-worker.c:894:21: branch_true: following ‘true’ branch (when ‘number_of_messages > i’)... gdm-50.0/daemon/gdm-session-worker.c:898:17: branch_true: ...to here gdm-50.0/daemon/gdm-session-worker.c:899:32: call_function: calling ‘gdm_session_worker_process_pam_message’ from ‘gdm_session_worker_pam_new_messages_handler’ # 673| g_debug ("GdmSessionWorker: received extended pam message '%s'", GDM_PAM_EXTENSION_CUSTOM_JSON); # 674| # 675|-> GDM_PAM_EXTENSION_CUSTOM_JSON_RESPONSE_INIT (json_response, # 676| json_request->protocol_name, # 677| json_request->version); Error: GCC_ANALYZER_WARNING (CWE-476): [#def10] gdm-50.0/daemon/gdm-session-worker.c:714:24: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘p’ gdm-50.0/daemon/gdm-session-worker.c:865:1: enter_function: entry to ‘gdm_session_worker_pam_new_messages_handler’ gdm-50.0/daemon/gdm-session-worker.c:894:21: branch_true: following ‘true’ branch (when ‘number_of_messages > i’)... gdm-50.0/daemon/gdm-session-worker.c:898:17: branch_true: ...to here gdm-50.0/daemon/gdm-session-worker.c:898:17: release_memory: ‘response’ is NULL gdm-50.0/daemon/gdm-session-worker.c:899:32: call_function: calling ‘gdm_session_worker_process_pam_message’ from ‘gdm_session_worker_pam_new_messages_handler’ # 712| # 713| p = utf8; # 714|-> while (*p != '\0' && !g_utf8_validate ((const char *)p, -1, (const char **)&q)) { # 715| *q = '?'; # 716| p = q + 1; Error: GCC_ANALYZER_WARNING (CWE-476): [#def11] gdm-50.0/daemon/gdm-session-worker.c:915:29: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘replies’ gdm-50.0/daemon/gdm-session-worker.c:865:1: enter_function: entry to ‘gdm_session_worker_pam_new_messages_handler’ gdm-50.0/daemon/gdm-session-worker.c:892:43: acquire_memory: this call could return NULL gdm-50.0/daemon/gdm-session-worker.c:894:21: branch_true: following ‘true’ branch (when ‘number_of_messages > i’)... gdm-50.0/daemon/gdm-session-worker.c:898:17: branch_true: ...to here gdm-50.0/daemon/gdm-session-worker.c:899:32: call_function: calling ‘gdm_session_worker_process_pam_message’ from ‘gdm_session_worker_pam_new_messages_handler’ gdm-50.0/daemon/gdm-session-worker.c:899:32: return_function: returning to ‘gdm_session_worker_pam_new_messages_handler’ from ‘gdm_session_worker_process_pam_message’ gdm-50.0/daemon/gdm-session-worker.c:902:20: branch_true: following ‘true’ branch... gdm-50.0/daemon/gdm-session-worker.c:903:25: branch_true: ...to here gdm-50.0/daemon/gdm-session-worker.c:913:12: branch_true: following ‘true’ branch... gdm-50.0/daemon/gdm-session-worker.c:913:12: branch_true: ...to here gdm-50.0/daemon/gdm-session-worker.c:914:29: branch_true: following ‘true’ branch (when ‘number_of_messages > i’)... gdm-50.0/daemon/gdm-session-worker.c:915:36: branch_true: ...to here gdm-50.0/daemon/gdm-session-worker.c:915:29: danger: ‘replies + (long unsigned int)i * 16’ could be NULL: unchecked value from [(2)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/1) # 913| if (return_value != PAM_SUCCESS || responses == NULL) { # 914| for (i = 0; i < number_of_messages; i++) { # 915|-> if (replies[i].resp != NULL) { # 916| memset (replies[i].resp, 0, strlen (replies[i].resp)); # 917| free (replies[i].resp); Error: COMPILER_WARNING (CWE-252): [#def12] gdm-50.0/daemon/gdm-session-worker.c: scope_hint: In function ‘jump_to_vt’ gdm-50.0/daemon/gdm-session-worker.c:1069:17: warning[-Wunused-result]: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’ # 1069 | write (worker->session_tty_fd, # | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # 1070 | clear_screen_escape_sequence, # | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # 1071 | sizeof (clear_screen_escape_sequence)); # | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # 1067| # 1068| /* let's make sure the new VT is clear */ # 1069|-> write (worker->session_tty_fd, # 1070| clear_screen_escape_sequence, # 1071| sizeof (clear_screen_escape_sequence)); Error: GCC_ANALYZER_WARNING: [#def13] gdm-50.0/daemon/gdm-session-worker.c:2010:25: warning[-Wanalyzer-fd-use-without-check]: ‘dup2’ on possibly invalid file descriptor ‘open("/dev/null", 2)’ gdm-50.0/daemon/gdm-session-worker.c:2631:1: enter_function: entry to ‘do_start_session’ gdm-50.0/daemon/gdm-session-worker.c:2636:15: call_function: calling ‘gdm_session_worker_start_session’ from ‘do_start_session’ # 2008| } else { # 2009| stdin_fd = open ("/dev/null", O_RDWR); # 2010|-> dup2 (stdin_fd, STDIN_FILENO); # 2011| close (stdin_fd); # 2012| } Error: GCC_ANALYZER_WARNING: [#def14] gdm-50.0/daemon/gdm-session-worker.c:2095:45: warning[-Wanalyzer-fd-use-without-check]: ‘dup’ on possibly invalid file descriptor ‘open("/dev/null", 2)’ gdm-50.0/daemon/gdm-session-worker.c:2631:1: enter_function: entry to ‘do_start_session’ gdm-50.0/daemon/gdm-session-worker.c:2636:15: call_function: calling ‘gdm_session_worker_start_session’ from ‘do_start_session’ # 2093| } else { # 2094| stdout_fd = open ("/dev/null", O_RDWR); # 2095|-> stderr_fd = dup (stdout_fd); # 2096| } # 2097| }
| 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-24.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 | gdm-51~alpha-2.fc45 |
| diffbase-store-results-to | /tmp/tmprz1jaj4p/gdm-51~alpha-2.fc45.tar.xz |
| diffbase-time-created | 2026-08-03 14:25:42 |
| diffbase-time-finished | 2026-08-03 14:27:37 |
| diffbase-tool | csmock |
| diffbase-tool-args | '/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'gcc,clippy,unicontrol,shellcheck,cppcheck' '-o' '/tmp/tmprz1jaj4p/gdm-51~alpha-2.fc45.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmprz1jaj4p/gdm-51~alpha-2.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-24.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 | gdm-50.0-1.fc44 |
| store-results-to | /tmp/tmprrpmfpbr/gdm-50.0-1.fc44.tar.xz |
| time-created | 2026-08-03 14:22:38 |
| time-finished | 2026-08-03 14:25:32 |
| title | Fixed findings |
| tool | csmock |
| tool-args | '/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'gcc,clippy,unicontrol,shellcheck,cppcheck' '-o' '/tmp/tmprrpmfpbr/gdm-50.0-1.fc44.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmprrpmfpbr/gdm-50.0-1.fc44.src.rpm' |
| tool-version | csmock-3.8.7.HEAD-1.el9 |