lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20090413215003.GB25085@us.ibm.com>
Date:	Mon, 13 Apr 2009 16:50:03 -0500
From:	"Serge E. Hallyn" <serue@...ibm.com>
To:	Valdis.Kletnieks@...edu
Cc:	Linus Torvalds <torvalds@...ux-foundation.org>,
	mtk.manpages@...il.com, Stephen Smalley <sds@...ch.ncsc.mil>,
	Andrew Morgan <morgan@...nel.org>,
	linux-security-module@...r.kernel.org,
	lkml <linux-kernel@...r.kernel.org>, linux-nfs@...r.kernel.org,
	Igor Zhbanov <izh1979@...il.com>,
	"J. Bruce Fields" <bfields@...i.umich.edu>, stable@...nel.org,
	linux-api@...r.kernel.org, Chris Wright <chrisw@...s-sol.org>
Subject: Re: [PATCH] add some long-missing capabilities to fs_mask

Quoting Valdis.Kletnieks@...edu (Valdis.Kletnieks@...edu):
> On Mon, 13 Apr 2009 09:56:14 CDT, "Serge E. Hallyn" said:
> > When POSIX capabilities were introduced during the 2.1 Linux
> > cycle, the fs mask, which represents the capabilities which having
> > fsuid==0 is supposed to grant, did not include CAP_MKNOD and
> > CAP_LINUX_IMMUTABLE.  However, before capabilities the privilege
> > to call these did in fact depend upon fsuid==0.
> 
> Wow. How did this manage to stay un-noticed for this long?

I guess setfsuid() is mainly used by NFS, and not a lot of people
do mknod over NFS?

To run into this, you'd have to do something like

	1. run as root
	2. setresuid(500,500,0);
	3. (...)
	4. setfsuid(0);
	5. mknod(path, mode, dev);

so I suspect the simpler (cross-platform) thing to do was
seteuid(0) for the mknod anyway...  Plus there is nowhere I've
found where the precise capabilities afforded to fsuid=0 are
documented, so noone would complain, they'd just accept it and
do seteuid()?

I'm guessing of course.

-serge
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ