Text   |  XML   |  ReML   |   Visible Warnings:

File System Race Condition  at cydir-storage.c:248

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

cydir_list_delete_mailbox

(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib-storage/index/cydir/cydir-storage.c)expand/collapse
Show more  
 308  cydir_list_delete_mailbox(struct mailbox_list *list, const char *name)
 309  {
 310          struct cydir_storage *storage = CYDIR_LIST_CONTEXT(list);
 311          struct stat st;
 312          const char *src;
 313   
 314          /* Make sure the indexes are closed before trying to delete the 
 315             directory that contains them. It can still fail with some NFS 
 316             implementations if indexes are opened by another session, but 
 317             that can't really be helped. */
 318          index_storage_destroy_unrefed();
 319   
 320          /* delete the index and control directories */
 321          if (storage->list_module_ctx.super.delete_mailbox(list, name) < 0)
 322                  return -1;
 323   
 324          /* check if the mailbox actually exists */
 325[+]         src = mailbox_list_get_path(list, name, MAILBOX_LIST_PATH_TYPE_MAILBOX);
 326          if (stat(src, &st) != 0 && errno == ENOENT) {
 327                  mailbox_list_set_error(list, MAIL_ERROR_NOTFOUND,
 328                          T_MAIL_ERR_MAILBOX_NOT_FOUND(name));
 329                  return -1;
 330          }
 331   
 332[+]         return cydir_delete_nonrecursive(list, src, name);
expand/collapse

cydir_delete_nonrecursive

(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib-storage/index/cydir/cydir-storage.c)expand/collapse
Show more  
 239  cydir_delete_nonrecursive(struct mailbox_list *list, const char *path,
 240                            const char *name)
 241  {
 242          DIR *dir;
 243          struct dirent *d;
 244          string_t *full_path;
 245          unsigned int dir_len;
 246          bool unlinked_something = FALSE;
 247   
 248          dir = opendir(path);
Show more  
Show more  




Change Warning 7499.25731 : File System Race Condition

Priority:
State:
Finding:
Owner:
Note: