Text   |  XML   |  ReML   |   Visible Warnings:

Use After Free  at client.c:427

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

sasl_callback

(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/pop3-login/client-authenticate.c)expand/collapse
Show more  
 218  static void sasl_callback(struct client *_client, enum sasl_server_reply reply,
 219                            const char *data, const char *const *args)
 220  {
 221          struct pop3_client *client = (struct pop3_client *)_client;
 222          struct const_iovec iov[3];
 223          const char *msg;
 224          size_t data_len;
 225          bool nodelay;
 226   
 227          i_assert(!client->destroyed ||
 228                   reply == SASL_SERVER_REPLY_CLIENT_ERROR ||
 229                   reply == SASL_SERVER_REPLY_MASTER_FAILED);
 230   
 231          switch (reply) {
 232          case SASL_SERVER_REPLY_SUCCESS:
 233                  if (args != NULL) {
 234                          if (client_handle_args(client, args, TRUE, &nodelay))
 235                                  break;
 236                  }
 237   
 238[+]                 client_destroy_success(client, "");
 239                  break;
 240          case SASL_SERVER_REPLY_AUTH_FAILED:
 241          case SASL_SERVER_REPLY_CLIENT_ERROR:
 242                  if (args != NULL) {
 243                          if (client_handle_args(client, args, FALSE, &nodelay))
 244                                  break;
 245                  }
 246   
 247                  msg = t_strconcat("-ERR ", data != NULL ?
 248                                    data : AUTH_FAILED_MSG, NULL);
 249                  client_send_line(client, msg);
 250
272
Show [ Lines 250 to 272 omitted. ]
 273                     to call client_destroy() in here. */
 274                  (void)o_stream_sendv(client->output, iov, 3);
 275   
 276                  i_assert(client->io == NULL);
 277                  client->io = io_add(client->common.fd, IO_READ,
 278                                      client_auth_input, client);
 279                  client_auth_input(client);
 280                  return;
 281          }
 282   
 283[+]         client_unref(client);
expand/collapse

client_unref

(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/pop3-login/client.c)expand/collapse
Show more  
 425  bool client_unref(struct pop3_client *client)
 426  {
 427          i_assert(client->refcount > 0);
Show more  
Show more  




Change Warning 11779.26001 : Use After Free

Because they are very similar, this warning shares annotations with warning 11779.26049.

Priority:
State:
Finding:
Owner:
Note: