Bug 577277 (CVE-2010-0787)
Summary: | CVE-2010-0787 samba: Race condition by mount (mount.cifs) operations | ||
---|---|---|---|
Product: | [Other] Security Response | Reporter: | Vincent Danen <vdanen> |
Component: | vulnerability | Assignee: | Red Hat Product Security <security-response-team> |
Status: | CLOSED ERRATA | QA Contact: | |
Severity: | low | Docs Contact: | |
Priority: | low | ||
Version: | unspecified | CC: | azelinka, gdeschner, jbacik, jlayton, jlieskov, kreilly, lemenkov, mjc, prc, security-response-team, ssorce, vcrhonek, vdanen |
Target Milestone: | --- | Keywords: | Security |
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | CVE-2010-0788 | Environment: | |
Last Closed: | 2011-08-30 06:51:25 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Bug Depends On: | 558829, 559272, 559274, 559276, 722551, 722552, 722553 | ||
Bug Blocks: | 721358 |
Description
Vincent Danen
2010-03-26 15:47:57 UTC
This issue has been addressed in Samba packages in Fedora: Fedora 12: samba-3.4.5-55.fc12 Fedora 11: samba-3.4.5-0.47.fc11 A few notes regarding mount.cifs since the above description isn't quite accurate, and to further clarify why this issue is of low impact. It notes a "disclosure of sensitive information" but I do not believe that is at accurate, or even likely on a properly-configure system. The problem is more that a user can gain privileges or mount a CIFS share at an arbitrary mount point (i.e. mounting a remote CIFS share over an existing directory like /tmp or /etc/pam.d). This does not immediately mean there is a disclosure of sensitive information unless they are able to mount over something like /var/log/ and capture log files (which does not seem likely without a syslog restart as log files will already be open). Tested by mounting a CIFS share over /var/log and having tailed /var/log/secure prior to the mount; syslog continues to log to the real /var/log/secure on a subsequent ssh login, as evidenced by: Apr 7 16:06:36 odvrhel5 sshd[6045]: lastlog_filetype: Couldn't stat /var/log/lastlog: No such file or directory Apr 7 16:06:36 odvrhel5 sshd[6045]: lastlog_openseek: /var/log/lastlog is not a file or directory Also, because mount.cifs is not suid root by default, a normal user cannot use it to mount CIFS shares, which limits the exposure of this problem. This is true even when CIFS mounts are defined in /etc/fstab; if mount.cifs is not suid the "user" option to mounts in fstab does not work but rather returns the error (in Fedora 12): /sbin/mount.cifs: not installed setuid - "user" CIFS mounts not supported. and in Red Hat Enterprise Linux 5: mount error 1 = Operation not permitted Refer to the mount.cifs(8) manual page (e.g.man mount.cifs) So the only way this can be exploited by an end-user is if the administrator has an fstab CIFS share defined to a directory that a user can write to (i.e. the user has privileges to write to /mnt/foo and the CIFS share is mounted to /mnt/foo/cifs; if the user can remove the cifs/ directory to replace with a symlink, in which case the root-mounted CIFS share will be mounted where the symlink points to). To fully mitigate this issue, ensure that CIFS shares are mounted in directories that users cannot write to. Also note that although the mount.cifs(8) manpage does not explicitly indicate that enabling the suid bit on mount.cifs is discouraged, upstream indicates that mount.cifs should not ever be installed suid root (which is the case in all supported versions of Red Hat Enterprise Linux and Fedora): https://bugzilla.samba.org/show_bug.cgi?id=6853#c2 Acknowledgements: Red Hat would like to thank the Debian Security Team for reporting this issue. The Debian Security Team acknowledges Ronald Volgers as the original reporter. This issue has been addressed in following products: Red Hat Enterprise Linux 4 Red Hat Enterprise Linux 5 Via RHSA-2011:1219 https://rhn.redhat.com/errata/RHSA-2011-1219.html Statement: (none) |