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] [thread-next>] [day] [month] [year] [list]
Message-Id: <1248976383.2771.4.camel@localhost>
Date:	Thu, 30 Jul 2009 13:53:03 -0400
From:	Eric Paris <eparis@...hat.com>
To:	"Serge E. Hallyn" <serue@...ibm.com>
Cc:	linux-kernel@...r.kernel.org,
	linux-security-module@...r.kernel.org, selinux@...ho.nsa.gov,
	jwcart2@...ho.nsa.gov, sds@...ho.nsa.gov, spender@...ecurity.net,
	dwalsh@...hat.com, cl@...ux-foundation.org, arjan@...radead.org,
	alan@...rguk.ukuu.org.uk, kees@...flux.net, csellers@...sys.com,
	penguin-kernel@...ove.sakura.ne.jp
Subject: Re: [PATCH -v3 1/3] Capabilities: move cap_file_mmap to commoncap.c

On Thu, 2009-07-30 at 10:54 -0500, Serge E. Hallyn wrote:
> Quoting Eric Paris (eparis@...hat.com):
> > On Thu, 2009-07-30 at 00:14 -0500, Serge E. Hallyn wrote:
> > > Quoting Eric Paris (eparis@...hat.com):
> > > > Currently we duplicate the mmap_min_addr test in cap_file_mmap and in
> > > > security_file_mmap if !CONFIG_SECURITY.  This patch moves cap_file_mmap
> > > > into commoncap.c and then calls that function directly from
> > > > security_file_mmap ifndef CONFIG_SECURITY like all of the other capability
> > > > checks are done.
> > > 
> > > It also
> > > 
> > > 	1. changes the return value in error case from -EACCES to
> > > 	   -EPERM
> > > 	2. no onger sets PF_SUPERPRIV in t->flags if the capability
> > > 	   is used.
> > > 
> > > Do we care about these?
> > 
> > Personally, not really, but I'll gladly put them back if you care.   #2
> > seems more interesting to me than number 1.   I actually kinda like
> > getting EPERM from caps rather than EACCES since them I know if I was
> > denied by selinux or by caps.....
> > 
> > -Eric
> 
> Yup, I asked bc I didn't particularly care myself.
> 
> I think I agree with you about -EPERM being better anyway.  However I
> (now) think in this case PF_SUPERPRIV definately should be set, as this
> is a clear use of a capability to do something that couldn't have been
> done without it.

Easy enough, if I add PF_SUPERPRIV can I add your ACK?  Basically just

ret = cap_capable();
if (!ret)
	current->flags |= PF_SUPERPRIV;

return ret;

--
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