mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [LSF TOPIC] beyond uidmapping, & towards a better security model
@ 2024-02-17 20:56 Kent Overstreet
  2024-02-17 22:31 ` Matthew Wilcox
  2024-02-19 14:26 ` James Bottomley
  0 siblings, 2 replies; 17+ messages in thread
From: Kent Overstreet @ 2024-02-17 20:56 UTC (permalink / raw)
  To: linux-fsdevel, linux-kernel, lsf-pc

AKA - integer identifiers considered harmful

Any time you've got a namespace that's just integers, if you ever end up
needing to subdivide it you're going to have a bad time.

This comes up all over the place - for another example, consider ioctl
numbering, where keeping them organized and collision free is a major
headache.

For UIDs, we need to be able to subdivide the UID namespace for e.g.
containers and mounting filesystems as an unprivileged user - but since
we just have an integer identifier, this requires complicated remapping
and updating and maintaining a global table.

Subdividing a UID to create new permissions domains should be a cheap,
easy operation, and it's not.

The solution (originally from plan9, of course) is - UIDs shouldn't be
numbers, they should be strings; and additionally, the strings should be
paths.

Then, if 'alice' is a user, 'alice.foo' and 'alice.bar' would be
subusers, created by alice without any privileged operations or mucking
with outside system state, and 'alice' would be superuser w.r.t.
'alice.foo' and 'alice.bar'.

What's this get us?

Much better, easier to use sandboxing - and maybe we can kill off a
_whole_ lot of other stuff, too.

Apparmour and selinux are fundamentally just about sandboxing programs
so they can't own everything owned by the user they're run by.

But if we have an easy way to say "exec this program as a subuser of the
current user..."

Then we can control what that program can access with just our existing
UNIX permission and acls.

This would be a pretty radical change, and there's a number of things to
explore - lots of brainstorming to do.

 - How can we do this without breaking absolutely everything? Obviously,
   any syscalls that communicate in terms of UIDs and GIDs are a
   problem; can we come up with a compat layer so that most stuff more
   or less still works?

 - How can we do this a way that's the most orthogonal, that gets us the
   most bang for our buck? How can we kill off as much security model
   stupidity as possible? How can we make sandboxing _dead easy_ for new
   applications?

Cheers,
Kent

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

end of thread, other threads:[~2024-02-29  8:52 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-17 20:56 [LSF TOPIC] beyond uidmapping, & towards a better security model Kent Overstreet
2024-02-17 22:31 ` Matthew Wilcox
2024-02-17 22:54   ` Kent Overstreet
2024-02-19 14:26 ` James Bottomley
2024-02-21  0:25   ` Kent Overstreet
2024-02-21  0:56     ` Stéphane Graber
2024-02-21  1:01       ` Kent Overstreet
2024-02-21  1:22     ` Matthew Wilcox
2024-02-21  2:07       ` Kent Overstreet
2024-02-21  2:15       ` NeilBrown
2024-02-29  8:51         ` Shyam Prasad N
2024-02-21  3:53     ` James Bottomley
2024-02-21 23:01       ` Kent Overstreet
2024-02-22  0:33         ` James Bottomley
2024-02-22  3:37           ` Kent Overstreet
2024-02-22  8:45             ` James Bottomley
2024-02-22 11:53               ` Kent Overstreet

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

all inboxes | Powered by JetHome®