Live data from Hacker News

How sandboxing works in Fuchsia

fuchsia.googlesource.com

171–172 of 172 posts

Re: How sandboxing works in Fuchsia

#171

Earlier quoted context omitted.

> You can think of the creation syscalls as taking an implied handle to the Process's Job, which is an "object factory" similar to what you suggest. Implicit handles are not explicit handles, and capability security requires explicit handles. You're obviously familiar with capabilities and the problems inherent to breaking capability properties, so why violate them in this instance? You mention API usability, but mx_…

Yes, handles are partitioned per-process. Having them be unlikely to be reused or collide with small numbers (locally) helps avoid some common failure cases (somebody uses a fd after close but somebody else has opened something else that got the same fd and now you have two problems). Having them be harder to guess provides some (minor) additional defense against attempting to remotely exploit bugs in another process…

> Yes, handles are partitioned per-process. Having them be unlikely to be reused or collide with small numbers (locally) helps avoid some common failure cases (somebody uses a fd after close but somebody else has opened something else that got the same fd and now you have two problems).

This could be handled in user space without affecting kernel structures using opaque structs and some runtime bookkeeping.

Alternately, Kernel fds could use the low order 24-bits for the descriptor itself, with top 8-bits reserved as an allocation count. When a given fd is closed, increment the counter for the next time it's allocated. You've reduced the chance of already rare misuse by 256 fold with requiring some kind of sparse data structure in the kernel.

Perhaps the current handle design is even harder to misuse, but how defensive should you be for accidental misuse like this?

> Having them be harder to guess provides some (minor) additional defense against attempting to remotely exploit bugs in another process.

I've never heard of this kind of exploit. Do you have an example?

Re: How sandboxing works in Fuchsia

#172
post #100

"dev, gn, /svc, /pkg, PA_VMAR_ROOT" Hate this old unix approach for name shortening, what makes them unreadable and non intuitive. If they break compatibility anyway, they could name things in a way, that people can read like a book.

Another positive of short names is that commonly used names occupy less screen real estate

I agree.

People who don't understand need to know that big / Retina displays are not accessible to people who, let's say it, are poor immigrant geniuses who only have access to a 1024*768.

Terminals are 80x24, and even system administrators need to have multiple terminal windows open.

Let's not forget that a lot of people learn through books, so print real estate is an issue as well.

Post reply on HN