public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [RFC][7/11][MANUX] Kernel compatibility : capset(2)
@ 2014-04-15 13:43 Emmanuel Colbus
  2014-04-15 15:10 ` One Thousand Gnomes
  0 siblings, 1 reply; 3+ messages in thread
From: Emmanuel Colbus @ 2014-04-15 13:43 UTC (permalink / raw)
  To: linux-kernel

Now another syscall. I recently implemented capabilities, and decided to
use a version number that's different from the one Linux uses.  I guess
that's exactly how I should have done it, but can you confirm me that
this is acceptable?

Also, for your information, I decided to use 64-bit capabilities, in
order to give a possibility to reduce the rights of an unprivileged
software (for example, if a process lacks CAP_USR_CHMOD, it won't be
able to perform a chmod on an existing file). This means I'm not using
the same data structure as you; do you have any objection to it?

Thank you,

Emmanuel

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [RFC][7/11][MANUX] Kernel compatibility : capset(2)
  2014-04-15 13:43 [RFC][7/11][MANUX] Kernel compatibility : capset(2) Emmanuel Colbus
@ 2014-04-15 15:10 ` One Thousand Gnomes
  2014-04-15 15:42   ` Emmanuel Colbus
  0 siblings, 1 reply; 3+ messages in thread
From: One Thousand Gnomes @ 2014-04-15 15:10 UTC (permalink / raw)
  To: Emmanuel Colbus; +Cc: linux-kernel

> Also, for your information, I decided to use 64-bit capabilities, in
> order to give a possibility to reduce the rights of an unprivileged
> software (for example, if a process lacks CAP_USR_CHMOD, it won't be
> able to perform a chmod on an existing file). This means I'm not using
> the same data structure as you; do you have any objection to it?

Save yourself the effort. The Linux old style capble() model is basically
broken. It's vaguely useful if you combine it with SELinux to repair some
of the awkward cases.

The world has moved on to MAC/DAC and is heading now for real
"capability" based security which is nothing to do with having a bunch of
bit flags.

Alan

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [RFC][7/11][MANUX] Kernel compatibility : capset(2)
  2014-04-15 15:10 ` One Thousand Gnomes
@ 2014-04-15 15:42   ` Emmanuel Colbus
  0 siblings, 0 replies; 3+ messages in thread
From: Emmanuel Colbus @ 2014-04-15 15:42 UTC (permalink / raw)
  To: One Thousand Gnomes; +Cc: linux-kernel

Le 15/04/2014 17:10, One Thousand Gnomes a écrit :
>> Also, for your information, I decided to use 64-bit capabilities, in
>> order to give a possibility to reduce the rights of an unprivileged
>> software (for example, if a process lacks CAP_USR_CHMOD, it won't be
>> able to perform a chmod on an existing file). This means I'm not using
>> the same data structure as you; do you have any objection to it?
> 
> Save yourself the effort. The Linux old style capble() model is basically
> broken. It's vaguely useful if you combine it with SELinux to repair some
> of the awkward cases.
> 
> The world has moved on to MAC/DAC and is heading now for real
> "capability" based security which is nothing to do with having a bunch of
> bit flags.
> 
> Alan
> 

Oh, I know. In fact, this is just a bit of icing on the cake, as I
already use true capability-based security. But I considered it, and I
decided this shouldn't be harmful (save for the very small slowdown at
each syscall), and that there could be cases where this little added
security could be useful, so since I needed the syscall for Linux
compatibility anyways, I decided to add it.

(As an example, if you've two processes that run in the same chroot, but
only one of them that can have a valid reason to call execve(2),
removing CAP_USR_EXECVE to the second one ensures it can't perform an
exec on the binaries used by the first one. In my OS, this would
actually improve security, because most binaries are actually wrappers
used to jump across chroots, so a true execve(2) is quite different from
a manual ELF loading.)

Emmanuel

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-04-15 15:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-15 13:43 [RFC][7/11][MANUX] Kernel compatibility : capset(2) Emmanuel Colbus
2014-04-15 15:10 ` One Thousand Gnomes
2014-04-15 15:42   ` Emmanuel Colbus

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox