Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 385315 (CVE-2011-3585) - <net-fs/cifs-utils-5.1: mount.cifs mtab locking Denial of Service (CVE-2011-3585)
Summary: <net-fs/cifs-utils-5.1: mount.cifs mtab locking Denial of Service (CVE-2011-3...
Status: RESOLVED FIXED
Alias: CVE-2011-3585
Product: Gentoo Security
Classification: Unclassified
Component: Vulnerabilities (show other bugs)
Hardware: All Linux
: Normal minor (vote)
Assignee: Gentoo Security
URL: https://bugzilla.samba.org/show_bug.c...
Whiteboard: ~3 [noglsa]
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-02 05:06 UTC by Tim Sammut (RETIRED)
Modified: 2012-04-11 10:58 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tim Sammut (RETIRED) gentoo-dev 2011-10-02 05:06:18 UTC
From the upstream bug at $URL:

mount.cifs, and umount.cifs are vulnerable to race conditions that allow
unprivileged users to create denial of service conditions.  All of these
mounting utilities create "/etc/mtab~" as a lockfile before updating /etc/mtab,
deleting the lockfile after finishing.  By starting the mounting or unmounting
process using either of these utilities and then sending a SIGKILL to the
process at the right moment, the lockfile will not be cleaned up.  The
existence of this stale lockfile will cause most mounting utilities to abort,
denying service.  While the use of /etc/mtab~ is standard practice for mount
utilities, suid versions such as these should use safer locking techniques that
expire on process termination, since they can be killed mid-execution by
unprivileged users.  Signal handling is not an option, since SIGKILL cannot be
caught.  I have working exploit code available on request if you're having
trouble reproducing the issue.
Comment 1 Víctor Ostorga (RETIRED) gentoo-dev 2011-10-03 14:17:41 UTC
CVE-2011-3585 is still reserved [1] and our stable samba doesn't allow mount.cifs being installed setuid root.

[1] http://www.cve.mitre.org/cgi-bin/cvename.cgi?name=2011-3585
Comment 2 Alex Legler (RETIRED) archtester gentoo-dev Security 2011-10-03 15:22:38 UTC
(In reply to comment #1)
> CVE-2011-3585 is still reserved [1] 

Not sure what that has to say as to the nature of the issue. CVEs usually take a few days to be filled in.

> and our stable samba doesn't allow
> mount.cifs being installed setuid root.
> 

Our "stable samba" implies that our testing samba behaves differently?

Also, next time, please just state your reasons why a bug is invalid in your opinion without closing the bug, *we* will do that after confirming your explanation.
Comment 3 Alex Legler (RETIRED) archtester gentoo-dev Security 2011-10-04 13:59:28 UTC
Reopening until my questions are answered.
Comment 4 Víctor Ostorga (RETIRED) gentoo-dev 2011-10-04 16:08:20 UTC
(In reply to comment #2)
> (In reply to comment #1)
> > CVE-2011-3585 is still reserved [1] 
> 
> Not sure what that has to say as to the nature of the issue. CVEs usually take
> a few days to be filled in.
> 
> > and our stable samba doesn't allow
> > mount.cifs being installed setuid root.
> > 
> 
> Our "stable samba" implies that our testing samba behaves differently?

Currently there is no testing samba but masked one. masked samba 3.6.0 and above use net-fs/cifs-utils as a provider for mount.cifs. I've dropped setuid flag from cifs-utils, however users are free to set it setuid (as they were when the ebuild provided setuid use flag).

> 
> Also, next time, please just state your reasons why a bug is invalid in your
> opinion without closing the bug, *we* will do that after confirming your
> explanation.

got it
Comment 5 Sean Amoss (RETIRED) gentoo-dev Security 2012-04-11 10:58:35 UTC
04 Oct 2011; Víctor Ostorga <vostorga@gentoo.org> cifs-utils-5.1.ebuild:
  Dropping setuid flag, CVE-2011-3585  bug 385315
-> net-fs/cifs-utils is noglsa for ~arch only

So our stable net-fs/samba versions are not vulnerable because they don't allow mount.cifs to be installed setuid root. Our unstable net-fs/samba relies on net-fs/cifs-utils which was vulnerable but now fixed. 

Re-rating to ~3 and closing.