Bug 746266 (CVE-2009-3897) - CVE-2009-3897 dovecot: Insecure permissions set for certain directories at installation time
Summary: CVE-2009-3897 dovecot: Insecure permissions set for certain directories at in...
Keywords:
Status: CLOSED WONTFIX
Alias: CVE-2009-3897
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: 746273
TreeView+ depends on / blocked
 
Reported: 2011-10-14 15:07 UTC by Jan Lieskovsky
Modified: 2021-02-24 14:29 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2015-03-06 12:03:54 UTC
Embargoed:


Attachments (Terms of Use)

Comment 1 Huzaifa S. Sidhpurwala 2011-10-17 09:23:26 UTC
Upstream patch:

http://hg.dovecot.org/dovecot-1.2/rev/3ebbccdc05e6

Comment 2 Huzaifa S. Sidhpurwala 2011-10-17 09:27:18 UTC
rhel-5 uses dovecot-1.0, here is the relevant code snippet:
============================================================

    803 	if (mkdir_parents(set->base_dir, 0777) < 0 && errno != EEXIST) {
    804 		i_error("mkdir(%s) failed: %m", set->base_dir);
    805 		return FALSE;
    806 	}

...

    812 	if ((st.st_mode & 0310) != 0310 || (st.st_mode & 0777) == 0777) {

...
    822 		if (chmod(set->base_dir, 0755) < 0)
    823 			i_error("chmod(%s) failed: %m", set->base_dir);
    824 	}
    825 


Here the base_dir is created with 0777 and then the permission is later changed to 0755

rhel-6 used dovecot-2.0, here:
==============================
    671 	if (mkdir_parents(set->base_dir, 0755) < 0 && errno != EEXIST) {
    672 		i_error("mkdir(%s) failed: %m", set->base_dir);
    673 		return FALSE;
    674 	}

...

    684 	if ((st.st_mode & 0755) != 0755) {
    685 		i_warning("Fixing permissions of %s to be world-readable",
    686 			  set->base_dir);
    687 		if (chmod(set->base_dir, 0755) < 0)
    688 			i_error("chmod(%s) failed: %m", set->base_dir);
    689 	}

and therefore is not affected by this issue

Comment 4 Huzaifa S. Sidhpurwala 2011-10-17 09:43:43 UTC
Statement:

This issue did not affect the version of dovecot shipped with Red Hat Enterprise Linux 6.


Note You need to log in before you can comment on or make changes to this bug.