Error: SHELLCHECK_WARNING (CWE-477): [#def1] /etc/gdm/Init/Default:86:29: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined. # 84| if [ -n "$XKBKEYMAP" ]; then # 85| $SETXKBMAP -keymap "$XKBKEYMAP" # 86|-> elif [ -n "$XKBTYPES" -a -n "$XKBCOMPAT" -a -n "$XKBSYMBOLS" -a -n "$XKBGEOMETRY" ]; then # 87| $SETXKBMAP -types "$XKBTYPES" -compat "$XKBCOMPAT" -symbols "$XKBSYMBOLS" -geometry "$XKBGEOMETRY" # 88| elif [ -n "$XKBTYPES" -a -n "$XKBCOMPAT" -a -n "$XKBSYMBOLS" ]; then Error: SHELLCHECK_WARNING (CWE-477): [#def2] /etc/gdm/Init/Default:86:48: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined. # 84| if [ -n "$XKBKEYMAP" ]; then # 85| $SETXKBMAP -keymap "$XKBKEYMAP" # 86|-> elif [ -n "$XKBTYPES" -a -n "$XKBCOMPAT" -a -n "$XKBSYMBOLS" -a -n "$XKBGEOMETRY" ]; then # 87| $SETXKBMAP -types "$XKBTYPES" -compat "$XKBCOMPAT" -symbols "$XKBSYMBOLS" -geometry "$XKBGEOMETRY" # 88| elif [ -n "$XKBTYPES" -a -n "$XKBCOMPAT" -a -n "$XKBSYMBOLS" ]; then Error: SHELLCHECK_WARNING (CWE-477): [#def3] /etc/gdm/Init/Default:86:68: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined. # 84| if [ -n "$XKBKEYMAP" ]; then # 85| $SETXKBMAP -keymap "$XKBKEYMAP" # 86|-> elif [ -n "$XKBTYPES" -a -n "$XKBCOMPAT" -a -n "$XKBSYMBOLS" -a -n "$XKBGEOMETRY" ]; then # 87| $SETXKBMAP -types "$XKBTYPES" -compat "$XKBCOMPAT" -symbols "$XKBSYMBOLS" -geometry "$XKBGEOMETRY" # 88| elif [ -n "$XKBTYPES" -a -n "$XKBCOMPAT" -a -n "$XKBSYMBOLS" ]; then Error: SHELLCHECK_WARNING (CWE-477): [#def4] /etc/gdm/Init/Default:88:29: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined. # 86| elif [ -n "$XKBTYPES" -a -n "$XKBCOMPAT" -a -n "$XKBSYMBOLS" -a -n "$XKBGEOMETRY" ]; then # 87| $SETXKBMAP -types "$XKBTYPES" -compat "$XKBCOMPAT" -symbols "$XKBSYMBOLS" -geometry "$XKBGEOMETRY" # 88|-> elif [ -n "$XKBTYPES" -a -n "$XKBCOMPAT" -a -n "$XKBSYMBOLS" ]; then # 89| $SETXKBMAP -types "$XKBTYPES" -compat "$XKBCOMPAT" -symbols "$XKBSYMBOLS" # 90| elif [ -n "$XKBSYMBOLS" ]; then Error: SHELLCHECK_WARNING (CWE-477): [#def5] /etc/gdm/Init/Default:88:48: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined. # 86| elif [ -n "$XKBTYPES" -a -n "$XKBCOMPAT" -a -n "$XKBSYMBOLS" -a -n "$XKBGEOMETRY" ]; then # 87| $SETXKBMAP -types "$XKBTYPES" -compat "$XKBCOMPAT" -symbols "$XKBSYMBOLS" -geometry "$XKBGEOMETRY" # 88|-> elif [ -n "$XKBTYPES" -a -n "$XKBCOMPAT" -a -n "$XKBSYMBOLS" ]; then # 89| $SETXKBMAP -types "$XKBTYPES" -compat "$XKBCOMPAT" -symbols "$XKBSYMBOLS" # 90| elif [ -n "$XKBSYMBOLS" ]; then Error: CPPCHECK_WARNING (CWE-457): [#def6] gdm-48.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): [#def7] gdm-48.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): [#def8] gdm-48.0/daemon/gdm-display.c: scope_hint: In function ‘handle_is_local’ gdm-48.0/daemon/gdm-display.c:1158:9: warning[-Wmaybe-uninitialized]: ‘is_local’ may be used uninitialized # 1158 | gdm_dbus_display_complete_is_local (skeleton, invocation, is_local); # | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ gdm-48.0/daemon/gdm-display.c:1154:18: note: ‘is_local’ was declared here # 1154 | gboolean is_local; # | ^~~~~~~~ # 1156| gdm_display_is_local (self, &is_local, NULL); # 1157| # 1158|-> gdm_dbus_display_complete_is_local (skeleton, invocation, is_local); # 1159| # 1160| return TRUE; Error: COMPILER_WARNING (CWE-563): [#def9] gdm-48.0/daemon/gdm-local-display-factory.c:279:29: warning[-Wunused-variable]: unused variable ‘key’ # 279 | const char *key = display_server_configuration[i].key; # | ^~~ # 277| # 278| for (i = 0; display_server_configuration[i].display_server != NULL; i++) { # 279|-> const char *key = display_server_configuration[i].key; # 280| const char *binary = display_server_configuration[i].binary; # 281| gboolean enabled = FALSE; Error: COMPILER_WARNING (CWE-563): [#def10] gdm-48.0/daemon/gdm-local-display-factory.c:280:29: warning[-Wunused-variable]: unused variable ‘binary’ # 280 | const char *binary = display_server_configuration[i].binary; # | ^~~~~~ # 278| for (i = 0; display_server_configuration[i].display_server != NULL; i++) { # 279| const char *key = display_server_configuration[i].key; # 280|-> const char *binary = display_server_configuration[i].binary; # 281| gboolean enabled = FALSE; # 282| Error: COMPILER_WARNING (CWE-563): [#def11] gdm-48.0/daemon/gdm-local-display-factory.c: scope_hint: In function ‘display_server_enabled’ gdm-48.0/daemon/gdm-local-display-factory.c:281:26: warning[-Wunused-variable]: unused variable ‘enabled’ # 281 | gboolean enabled = FALSE; # | ^~~~~~~ # 279| const char *key = display_server_configuration[i].key; # 280| const char *binary = display_server_configuration[i].binary; # 281|-> gboolean enabled = FALSE; # 282| # 283| if (!g_str_equal (display_server_configuration[i].display_server, Error: COMPILER_WARNING (CWE-563): [#def12] gdm-48.0/daemon/gdm-local-display-factory.c:326:18: warning[-Wunused-but-set-variable]: variable ‘wayland_preferred’ set but not used # 326 | gboolean wayland_preferred = FALSE; # | ^~~~~~~~~~~~~~~~~ # 324| g_autofree gchar *preferred_display_server = NULL; # 325| const char *fallback_display_server = NULL; # 326|-> gboolean wayland_preferred = FALSE; # 327| gboolean xorg_preferred = FALSE; # 328| g_autoptr (GPtrArray) session_types_array = NULL; Error: COMPILER_WARNING (CWE-563): [#def13] gdm-48.0/daemon/gdm-local-display-factory.c: scope_hint: In function ‘gdm_local_display_factory_get_session_types’ gdm-48.0/daemon/gdm-local-display-factory.c:327:18: warning[-Wunused-but-set-variable]: variable ‘xorg_preferred’ set but not used # 327 | gboolean xorg_preferred = FALSE; # | ^~~~~~~~~~~~~~ # 325| const char *fallback_display_server = NULL; # 326| gboolean wayland_preferred = FALSE; # 327|-> gboolean xorg_preferred = FALSE; # 328| g_autoptr (GPtrArray) session_types_array = NULL; # 329| char **session_types; Error: COMPILER_WARNING (CWE-1164): [#def14] gdm-48.0/daemon/gdm-manager.c:1412:1: warning[-Wunused-function]: ‘set_up_chooser_session’ defined but not used # 1412 | set_up_chooser_session (GdmManager *manager, # | ^~~~~~~~~~~~~~~~~~~~~~ # 1410| # 1411| static void # 1412|-> set_up_chooser_session (GdmManager *manager, # 1413| GdmDisplay *display) # 1414| { Error: COMPILER_WARNING: [#def15] gdm-48.0/daemon/gdm-server.c:617:22: warning[-Warray-bounds=]: array subscript [2, 2147483647] is outside array bounds of ‘gchar *[1]’ # 617 | *argv[len++] = g_strdup (args[i]); # | ~~~~^~~~~~~ gdm-48.0/daemon/gdm-server.c: scope_hint: In function ‘gdm_server_start’ gdm-48.0/daemon/gdm-server.c:668:26: note: at offset [16, 17179869176] into object ‘argv’ of size 8 # 668 | gchar **argv = NULL; # | ^~~~ # 615| # 616| for (i=0; i < count;i++) { # 617|-> *argv[len++] = g_strdup (args[i]); # 618| } # 619| Error: COMPILER_WARNING: [#def16] gdm-48.0/daemon/gdm-server.c:622:19: warning[-Warray-bounds=]: array subscript [2, 2147483647] is outside array bounds of ‘gchar *[1]’ # 622 | argv[len] = NULL; # | ^ gdm-48.0/daemon/gdm-server.c: scope_hint: In function ‘gdm_server_start’ gdm-48.0/daemon/gdm-server.c:668:26: note: at offset [16, 17179869176] into object ‘argv’ of size 8 # 668 | gchar **argv = NULL; # | ^~~~ # 620| *argc += count; # 621| # 622|-> argv[len] = NULL; # 623| g_strfreev (args); # 624| } Error: COMPILER_WARNING (CWE-252): [#def17] gdm-48.0/daemon/gdm-session-linux-auditor.c: scope_hint: In function ‘log_user_message’ gdm-48.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): [#def18] gdm-48.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: CPPCHECK_WARNING (CWE-476): [#def19] gdm-48.0/daemon/gdm-session-worker.c:664: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: list_response # 662| g_debug ("GdmSessionWorker: received extended pam message '%s'", GDM_PAM_EXTENSION_CHOICE_LIST); # 663| # 664|-> GDM_PAM_EXTENSION_CHOICE_LIST_RESPONSE_INIT (list_response); # 665| # 666| res = gdm_session_worker_process_choice_list_request (worker, list_request, list_response); Error: COMPILER_WARNING (CWE-252): [#def20] gdm-48.0/daemon/gdm-session-worker.c: scope_hint: In function ‘jump_to_vt’ gdm-48.0/daemon/gdm-session-worker.c:1075:17: warning[-Wunused-result]: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’ # 1075 | write (worker->session_tty_fd, # | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # 1076 | clear_screen_escape_sequence, # | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # 1077 | sizeof (clear_screen_escape_sequence)); # | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # 1073| # 1074| /* let's make sure the new VT is clear */ # 1075|-> write (worker->session_tty_fd, # 1076| clear_screen_escape_sequence, # 1077| sizeof (clear_screen_escape_sequence)); Error: COMPILER_WARNING (CWE-563): [#def21] gdm-48.0/daemon/gdm-session-worker.c: scope_hint: In function ‘set_up_for_current_vt’ gdm-48.0/daemon/gdm-session-worker.c:2352:32: warning[-Wunused-variable]: unused variable ‘pam_xauth’ # 2352 | struct pam_xauth_data *pam_xauth; # | ^~~~~~~~~ # 2350| { # 2351| #ifdef PAM_XAUTHDATA # 2352|-> struct pam_xauth_data *pam_xauth; # 2353| #endif # 2354| g_autofree char *pam_tty = NULL; Error: GCC_ANALYZER_WARNING (CWE-401): [#def22] gdm-48.0/redhat-linux-build/../daemon/gdm-display-access-file.c:218:16: warning[-Wanalyzer-malloc-leak]: leak of ‘_create_xauth_file_for_user(*file.username, &*file.path, & create_error)’ gdm-48.0/redhat-linux-build/../daemon/gdm-display-access-file.c:391:1: enter_function: entry to ‘gdm_display_access_file_open’ gdm-48.0/redhat-linux-build/../daemon/gdm-display-access-file.c:396:9: branch_true: following ‘true’ branch... gdm-48.0/redhat-linux-build/../daemon/gdm-display-access-file.c:397:9: branch_true: ...to here gdm-48.0/redhat-linux-build/../daemon/gdm-display-access-file.c:397:9: branch_true: following ‘true’ branch... gdm-48.0/redhat-linux-build/../daemon/gdm-display-access-file.c:398:9: branch_true: ...to here gdm-48.0/redhat-linux-build/../daemon/gdm-display-access-file.c:398:9: branch_true: following ‘true’ branch... gdm-48.0/redhat-linux-build/../daemon/gdm-display-access-file.c:400:20: branch_true: ...to here gdm-48.0/redhat-linux-build/../daemon/gdm-display-access-file.c:400:20: call_function: calling ‘_create_xauth_file_for_user’ from ‘gdm_display_access_file_open’ gdm-48.0/redhat-linux-build/../daemon/gdm-display-access-file.c:400:20: return_function: returning to ‘gdm_display_access_file_open’ from ‘_create_xauth_file_for_user’ gdm-48.0/redhat-linux-build/../daemon/gdm-display-access-file.c:218:16: danger: ‘_create_xauth_file_for_user(*file.username, &*file.path, & create_error)’ leaks here; was allocated at [(31)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/30) # 216| } # 217| # 218|-> *uid = passwd_entry->pw_uid; # 219| *gid = passwd_entry->pw_gid; # 220| Error: GCC_ANALYZER_WARNING (CWE-476): [#def23] gdm-48.0/redhat-linux-build/../daemon/gdm-session-worker.c:664:17: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘list_response’ gdm-48.0/redhat-linux-build/../daemon/gdm-session-worker.c:871:1: enter_function: entry to ‘gdm_session_worker_pam_new_messages_handler’ gdm-48.0/redhat-linux-build/../daemon/gdm-session-worker.c:900:21: branch_true: following ‘true’ branch (when ‘number_of_messages > i’)... gdm-48.0/redhat-linux-build/../daemon/gdm-session-worker.c:904:17: branch_true: ...to here gdm-48.0/redhat-linux-build/../daemon/gdm-session-worker.c:905:32: call_function: calling ‘gdm_session_worker_process_pam_message’ from ‘gdm_session_worker_pam_new_messages_handler’ # 662| g_debug ("GdmSessionWorker: received extended pam message '%s'", GDM_PAM_EXTENSION_CHOICE_LIST); # 663| # 664|-> GDM_PAM_EXTENSION_CHOICE_LIST_RESPONSE_INIT (list_response); # 665| # 666| res = gdm_session_worker_process_choice_list_request (worker, list_request, list_response); Error: GCC_ANALYZER_WARNING (CWE-476): [#def24] gdm-48.0/redhat-linux-build/../daemon/gdm-session-worker.c:681:17: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘malloc(88)’ gdm-48.0/redhat-linux-build/../daemon/gdm-session-worker.c:871:1: enter_function: entry to ‘gdm_session_worker_pam_new_messages_handler’ gdm-48.0/redhat-linux-build/../daemon/gdm-session-worker.c:900:21: branch_true: following ‘true’ branch (when ‘number_of_messages > i’)... gdm-48.0/redhat-linux-build/../daemon/gdm-session-worker.c:904:17: branch_true: ...to here gdm-48.0/redhat-linux-build/../daemon/gdm-session-worker.c:905:32: call_function: calling ‘gdm_session_worker_process_pam_message’ from ‘gdm_session_worker_pam_new_messages_handler’ # 679| g_debug ("GdmSessionWorker: received extended pam message '%s'", GDM_PAM_EXTENSION_CUSTOM_JSON); # 680| # 681|-> GDM_PAM_EXTENSION_CUSTOM_JSON_RESPONSE_INIT (json_response, # 682| json_request->protocol_name, # 683| json_request->version); Error: GCC_ANALYZER_WARNING (CWE-476): [#def25] gdm-48.0/redhat-linux-build/../daemon/gdm-session-worker.c:720:24: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘p’ gdm-48.0/redhat-linux-build/../daemon/gdm-session-worker.c:871:1: enter_function: entry to ‘gdm_session_worker_pam_new_messages_handler’ gdm-48.0/redhat-linux-build/../daemon/gdm-session-worker.c:900:21: branch_true: following ‘true’ branch (when ‘number_of_messages > i’)... gdm-48.0/redhat-linux-build/../daemon/gdm-session-worker.c:904:17: branch_true: ...to here gdm-48.0/redhat-linux-build/../daemon/gdm-session-worker.c:904:17: release_memory: ‘response’ is NULL gdm-48.0/redhat-linux-build/../daemon/gdm-session-worker.c:905:32: call_function: calling ‘gdm_session_worker_process_pam_message’ from ‘gdm_session_worker_pam_new_messages_handler’ # 718| # 719| p = utf8; # 720|-> while (*p != '\0' && !g_utf8_validate ((const char *)p, -1, (const char **)&q)) { # 721| *q = '?'; # 722| p = q + 1; Error: GCC_ANALYZER_WARNING (CWE-476): [#def26] gdm-48.0/redhat-linux-build/../daemon/gdm-session-worker.c:912:17: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘replies’ gdm-48.0/redhat-linux-build/../daemon/gdm-session-worker.c:871:1: enter_function: entry to ‘gdm_session_worker_pam_new_messages_handler’ gdm-48.0/redhat-linux-build/../daemon/gdm-session-worker.c:898:43: acquire_memory: this call could return NULL gdm-48.0/redhat-linux-build/../daemon/gdm-session-worker.c:900:21: branch_true: following ‘true’ branch (when ‘number_of_messages > i’)... gdm-48.0/redhat-linux-build/../daemon/gdm-session-worker.c:904:17: branch_true: ...to here gdm-48.0/redhat-linux-build/../daemon/gdm-session-worker.c:905:32: call_function: calling ‘gdm_session_worker_process_pam_message’ from ‘gdm_session_worker_pam_new_messages_handler’ gdm-48.0/redhat-linux-build/../daemon/gdm-session-worker.c:905:32: return_function: returning to ‘gdm_session_worker_pam_new_messages_handler’ from ‘gdm_session_worker_process_pam_message’ gdm-48.0/redhat-linux-build/../daemon/gdm-session-worker.c:908:20: branch_false: following ‘false’ branch... gdm-48.0/redhat-linux-build/../daemon/gdm-session-worker.c:912:24: branch_false: ...to here gdm-48.0/redhat-linux-build/../daemon/gdm-session-worker.c:912:17: 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) # 910| } # 911| # 912|-> replies[i].resp = response; # 913| replies[i].resp_retcode = PAM_SUCCESS; # 914| } Error: GCC_ANALYZER_WARNING (CWE-476): [#def27] gdm-48.0/redhat-linux-build/../daemon/gdm-session-worker.c:921:29: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘replies’ gdm-48.0/redhat-linux-build/../daemon/gdm-session-worker.c:871:1: enter_function: entry to ‘gdm_session_worker_pam_new_messages_handler’ gdm-48.0/redhat-linux-build/../daemon/gdm-session-worker.c:898:43: acquire_memory: this call could return NULL gdm-48.0/redhat-linux-build/../daemon/gdm-session-worker.c:905:32: call_function: calling ‘gdm_session_worker_process_pam_message’ from ‘gdm_session_worker_pam_new_messages_handler’ gdm-48.0/redhat-linux-build/../daemon/gdm-session-worker.c:905:32: return_function: returning to ‘gdm_session_worker_pam_new_messages_handler’ from ‘gdm_session_worker_process_pam_message’ gdm-48.0/redhat-linux-build/../daemon/gdm-session-worker.c:908:20: branch_true: following ‘true’ branch... gdm-48.0/redhat-linux-build/../daemon/gdm-session-worker.c:909:25: branch_true: ...to here gdm-48.0/redhat-linux-build/../daemon/gdm-session-worker.c:919:12: branch_true: following ‘true’ branch... branch_true: ...to here gdm-48.0/redhat-linux-build/../daemon/gdm-session-worker.c:920:29: branch_true: following ‘true’ branch (when ‘number_of_messages > i’)... gdm-48.0/redhat-linux-build/../daemon/gdm-session-worker.c:921:36: branch_true: ...to here gdm-48.0/redhat-linux-build/../daemon/gdm-session-worker.c:921:29: danger: ‘replies + (long unsigned int)i * 16’ could be NULL: unchecked value from [(2)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/1) # 919| if (return_value != PAM_SUCCESS || responses == NULL) { # 920| for (i = 0; i < number_of_messages; i++) { # 921|-> if (replies[i].resp != NULL) { # 922| memset (replies[i].resp, 0, strlen (replies[i].resp)); # 923| free (replies[i].resp); Error: GCC_ANALYZER_WARNING (CWE-775): [#def28] gdm-48.0/redhat-linux-build/../daemon/gdm-session-worker.c:1906:18: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘_open_program_session_log(*worker.log_file)’ gdm-48.0/redhat-linux-build/../daemon/gdm-session-worker.c:2839:1: enter_function: entry to ‘do_start_session’ gdm-48.0/redhat-linux-build/../daemon/gdm-session-worker.c:2844:15: call_function: calling ‘gdm_session_worker_start_session’ from ‘do_start_session’ # 1904| int i; # 1905| # 1906|-> for (i = n_copies - 1; i > 0; i--) { # 1907| g_autofree char *name_n = NULL; # 1908| g_autofree char *name_n1 = NULL; Error: GCC_ANALYZER_WARNING (CWE-688): [#def29] gdm-48.0/redhat-linux-build/../daemon/gdm-session-worker.c:1931:14: warning[-Wanalyzer-null-argument]: use of NULL ‘filename’ where non-null expected gdm-48.0/redhat-linux-build/../daemon/gdm-session-worker.c:2839:1: enter_function: entry to ‘do_start_session’ gdm-48.0/redhat-linux-build/../daemon/gdm-session-worker.c:2844:15: call_function: calling ‘gdm_session_worker_start_session’ from ‘do_start_session’ # 1929| rotate_logs (filename, MAX_LOGS); # 1930| # 1931|-> fd = g_open (filename, O_WRONLY | O_APPEND | O_CREAT, 0600); # 1932| # 1933| if (fd < 0) { Error: GCC_ANALYZER_WARNING (CWE-775): [#def30] gdm-48.0/redhat-linux-build/../daemon/gdm-session-worker.c:2093:36: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/null", 2)’ gdm-48.0/redhat-linux-build/../daemon/gdm-session-worker.c:2839:1: enter_function: entry to ‘do_start_session’ gdm-48.0/redhat-linux-build/../daemon/gdm-session-worker.c:2844:15: call_function: calling ‘gdm_session_worker_start_session’ from ‘do_start_session’ # 2091| needs_controlling_terminal = TRUE; # 2092| } else { # 2093|-> stdin_fd = open ("/dev/null", O_RDWR); # 2094| dup2 (stdin_fd, STDIN_FILENO); # 2095| close (stdin_fd); Error: GCC_ANALYZER_WARNING: [#def31] gdm-48.0/redhat-linux-build/../daemon/gdm-session-worker.c:2094:25: warning[-Wanalyzer-fd-use-without-check]: ‘dup2’ on possibly invalid file descriptor ‘open("/dev/null", 2)’ gdm-48.0/redhat-linux-build/../daemon/gdm-session-worker.c:2839:1: enter_function: entry to ‘do_start_session’ gdm-48.0/redhat-linux-build/../daemon/gdm-session-worker.c:2844:15: call_function: calling ‘gdm_session_worker_start_session’ from ‘do_start_session’ # 2092| } else { # 2093| stdin_fd = open ("/dev/null", O_RDWR); # 2094|-> dup2 (stdin_fd, STDIN_FILENO); # 2095| close (stdin_fd); # 2096| } Error: GCC_ANALYZER_WARNING: [#def32] gdm-48.0/redhat-linux-build/../daemon/gdm-session-worker.c:2103:37: warning[-Wanalyzer-fd-use-without-check]: ‘dup’ on possibly invalid file descriptor ‘_open_program_session_log(*worker.log_file)’ gdm-48.0/redhat-linux-build/../daemon/gdm-session-worker.c:2839:1: enter_function: entry to ‘do_start_session’ gdm-48.0/redhat-linux-build/../daemon/gdm-session-worker.c:2844:15: call_function: calling ‘gdm_session_worker_start_session’ from ‘do_start_session’ # 2101| if (!has_journald && worker->is_program_session) { # 2102| stdout_fd = _open_program_session_log (worker->log_file); # 2103|-> stderr_fd = dup (stdout_fd); # 2104| } # 2105| Error: GCC_ANALYZER_WARNING (CWE-775): [#def33] gdm-48.0/redhat-linux-build/../daemon/gdm-session-worker.c:2178:45: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/null", 2)’ gdm-48.0/redhat-linux-build/../daemon/gdm-session-worker.c:2839:1: enter_function: entry to ‘do_start_session’ gdm-48.0/redhat-linux-build/../daemon/gdm-session-worker.c:2844:15: call_function: calling ‘gdm_session_worker_start_session’ from ‘do_start_session’ # 2176| } # 2177| } else { # 2178|-> stdout_fd = open ("/dev/null", O_RDWR); # 2179| stderr_fd = dup (stdout_fd); # 2180| } Error: GCC_ANALYZER_WARNING: [#def34] gdm-48.0/redhat-linux-build/../daemon/gdm-session-worker.c:2179:45: warning[-Wanalyzer-fd-use-without-check]: ‘dup’ on possibly invalid file descriptor ‘open("/dev/null", 2)’ gdm-48.0/redhat-linux-build/../daemon/gdm-session-worker.c:2839:1: enter_function: entry to ‘do_start_session’ gdm-48.0/redhat-linux-build/../daemon/gdm-session-worker.c:2844:15: call_function: calling ‘gdm_session_worker_start_session’ from ‘do_start_session’ # 2177| } else { # 2178| stdout_fd = open ("/dev/null", O_RDWR); # 2179|-> stderr_fd = dup (stdout_fd); # 2180| } # 2181| }
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-120.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 | gdm-48.0-1.fc43 |
store-results-to | /tmp/tmpr7l2xt8c/gdm-48.0-1.fc43.tar.xz |
time-created | 2025-04-25 12:36:52 |
time-finished | 2025-04-25 12:38:51 |
tool | csmock |
tool-args | '/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'unicontrol,cppcheck,gcc,clippy,shellcheck' '-o' '/tmp/tmpr7l2xt8c/gdm-48.0-1.fc43.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmpr7l2xt8c/gdm-48.0-1.fc43.src.rpm' |
tool-version | csmock-3.8.1.20250422.172604.g26bc3d6-1.el9 |