Text   |  XML   |  ReML   |   Visible Warnings:

Null Pointer Dereference  at ssl-proxy-openssl.c:613

No properties have been set. | edit properties
Jump to warning location ↓ warning details...
Show Events | Options

sasl_server_auth_begin

(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/login-common/sasl-server.c)expand/collapse
Show more  
 130  void sasl_server_auth_begin(struct client *client,
 131                              const char *service, const char *mech_name,
 132                              const char *initial_resp_base64,
 133                              sasl_server_callback_t *callback)
 134  {
 135          struct auth_request_info info;
 136          const struct auth_mech_desc *mech;
 137          const char *error;
 138   
 139          client->auth_attempts++;
 140          client->authenticating = TRUE;
 141          i_free(client->auth_mech_name);
 142          client->auth_mech_name = str_ucase(i_strdup(mech_name));
 143          client->sasl_callback = callback;
 144   
 145          mech = auth_client_find_mech(auth_client, mech_name);
 146          if (mech == NULL) {
 147                  sasl_server_auth_failed(client,
 148                          "Unsupported authentication mechanism.");
 149                  return;
 150          }
 151   
 152          if (!client->secured && disable_plaintext_auth &&
 153              (mech->flags & MECH_SEC_PLAINTEXT) != 0) {
 154                  sasl_server_auth_failed(client,
 155                          "Plaintext authentication disabled.");
 156                  return;
 157          }
 158   
 159          memset(&info, 0, sizeof(info));
 160          info.mech = mech->name;
 161          info.service = service;
 162          info.cert_username = client->proxy == NULL ? NULL :
 163                  ssl_proxy_get_peer_name(client->proxy);
 164          info.flags = client_get_auth_flags(client);
 165          info.local_ip = client->local_ip;
 166          info.remote_ip = client->ip;
 167          info.local_port = client->local_port;
 168          info.remote_port = client->remote_port;
 169          info.initial_resp_base64 = initial_resp_base64;
 170   
 171          client->auth_request =
 172                  auth_client_request_new(auth_client, NULL, &info,
 173                                          authenticate_callback, client, &error);
 174          if (client->auth_request == NULL) {
 175                  sasl_server_auth_failed(client,
 176[+][+]                          t_strconcat("Authentication failed: ", error, NULL));
expand/collapse

sasl_server_auth_failed

(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/login-common/sasl-server.c)expand/collapse
Show more  
 202  void sasl_server_auth_failed(struct client *client, const char *reason)
 203  {
 204[+]         sasl_server_auth_cancel(client, reason, SASL_SERVER_REPLY_AUTH_FAILED);
expand/collapse

sasl_server_auth_cancel

(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/login-common/sasl-server.c)expand/collapse
Show more  
 180  static void sasl_server_auth_cancel(struct client *client, const char *reason,
 181                                      enum sasl_server_reply reply)
 182  {
 183          i_assert(client->authenticating);
 184   
 185          if (verbose_auth && reason != NULL) {
 186                  const char *auth_name =
 187                          str_sanitize(client->auth_mech_name, MAX_MECH_NAME);
 188                  client_syslog(client,
 189                          t_strdup_printf("Authenticate %s failed: %s",
 190[+]                                         auth_name, reason));
expand/collapse

client_syslog

(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/login-common/client-common.c)expand/collapse
Show more  
 154  void client_syslog(struct client *client, const char *msg)
 155  {
 156          T_BEGIN {
 157[+]                 i_info("%s", client_get_log_str(client, msg));
expand/collapse

client_get_log_str

(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/login-common/client-common.c)expand/collapse
Show more  
 112  static const char *
 113  client_get_log_str(struct client *client, const char *msg)
 114  {
 115          static struct var_expand_table static_tab[3] = {
 116                  { 's', NULL, NULL },
 117                  { '$', NULL, NULL },
 118                  { '\0', NULL, NULL }
 119          };
 120          const struct var_expand_table *var_expand_table;
 121          struct var_expand_table *tab;
 122          const char *p, *const *e;
 123          string_t *str;
 124   
 125[+]         var_expand_table = get_var_expand_table(client);
expand/collapse

get_var_expand_table

(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/login-common/client-common.c)expand/collapse
Show more  
 36  static const struct var_expand_table *
 37  get_var_expand_table(struct client *client)
 38  {
 39          static struct var_expand_table static_tab[] = {
 40                  { 'u', NULL, "user" },
 41                  { 'n', NULL, "username" },
 42                  { 'd', NULL, "domain" },
 43                  { 's', NULL, "service" },
 44                  { 'h', NULL, "home" },
 45                  { 'l', NULL, "lip" },
 46                  { 'r', NULL, "rip" },
 47                  { 'p', NULL, "pid" },
 48                  { 'm', NULL, "mech" },
 49                  { 'a', NULL, "lport" },
 50                  { 'b', NULL, "rport" },
 51                  { 'c', NULL, "secured" },
 52                  { 'k', NULL, "ssl_security" },
 53                  { 'e', NULL, "mail_pid" },
 54                  { '\0', NULL, NULL }
 55          };
 56          struct var_expand_table *tab;
 57          unsigned int i;
 58   
 59          tab = t_malloc(sizeof(static_tab));
 60          memcpy(tab, static_tab, sizeof(static_tab));
 61   
 62          if (client->virtual_user != NULL) {
 63                  tab[0].value = client->virtual_user;
 64                  tab[1].value = t_strcut(client->virtual_user, '@');
 65                  tab[2].value = strchr(client->virtual_user, '@');
 66                  if (tab[2].value != NULL) tab[2].value++;
 67   
 68                  for (i = 0; i < 3; i++)
 69                          tab[i].value = str_sanitize(tab[i].value, 80);
 70          }
 71          tab[3].value = ;
 72          tab[4].value = getenv("HOME");
 73          tab[5].value = net_ip2addr(&client->local_ip);
 74          tab[6].value = net_ip2addr(&client->ip);
 75          tab[7].value = my_pid;
 76          tab[8].value = client->auth_mech_name == NULL ? NULL :
 77                  str_sanitize(client->auth_mech_name, MAX_MECH_NAME);
 78          tab[9].value = dec2str(client->local_port);
 79          tab[10].value = dec2str(client->remote_port);
 80          if (!client->tls) {
 81                  tab[11].value = client->secured ? "secured" : NULL;
 82                  tab[12].value = "";
 83          } else {
 84[+]                 const char *ssl_state = ssl_proxy_is_handshaked(client->proxy) ?
expand/collapse

ssl_proxy_is_handshaked

(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/login-common/ssl-proxy-openssl.c)expand/collapse
Show more  
 611  bool ssl_proxy_is_handshaked(const struct ssl_proxy *proxy)
 612  {
 613          return proxy->handshaked;
Show more  
Show more  
Show more  
Show more  
Show more  
Show more  
Show more  




Change Warning 7937.25065 : Null Pointer Dereference

Priority:
State:
Finding:
Owner:
Note: