Text   |  XML   |  ReML   |   Visible Warnings:

Use After Free  at ssl-proxy-openssl.c:644

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

plain_read

(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/login-common/ssl-proxy-openssl.c)expand/collapse
Show more  
 255  static void plain_read(struct ssl_proxy *proxy)
 256  {
 257          ssize_t ret;
 258          bool corked = FALSE;
 259   
 260          if (proxy->sslout_size == sizeof(proxy->sslout_buf)) {
 261                  /* buffer full, block input until it's written */
 262                  plain_block_input(proxy, TRUE);
 263                  return;
 264          }
 265   
 266          proxy->refcount++;
 267   
 268          while (proxy->sslout_size < sizeof(proxy->sslout_buf) &&
 269                 !proxy->destroyed) {
 270                  ret = net_receive(proxy->fd_plain,
 271                                    proxy->sslout_buf + proxy->sslout_size,
 272                                    sizeof(proxy->sslout_buf) -
 273                                    proxy->sslout_size);
 274                  if (ret <= 0) {
 275                          if (ret < 0)
 276[+]                                 ssl_proxy_destroy(proxy);
 277                          break;
 278                  } else {
 279                          proxy->sslout_size += ret;
 280                          if (!corked) {
 281                                  net_set_cork(proxy->fd_ssl, TRUE);
 282                                  corked = TRUE;
 283                          }
 284                          ssl_write(proxy);
 285                  }
 286          }
 287   
 288          if (corked)
 289                  net_set_cork(proxy->fd_ssl, FALSE);
 290   
 291[+]         ssl_proxy_unref(proxy);
expand/collapse

ssl_proxy_unref

(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/login-common/ssl-proxy-openssl.c)expand/collapse
Show more  
 642  static void ssl_proxy_unref(struct ssl_proxy *proxy)
 643  {
 644          if (--proxy->refcount > 0)
Show more  
Show more  




Change Warning 11757.25688 : Use After Free

Priority:
State:
Finding:
Owner:
Note: