Controlled launch of another sandbox from inside of a sandbox? #4557
Replies: 1 comment 1 reply
-
Some previous discussions were at #3785.
IMHO this is a good and wanted feature. It would allow to sandbox programs that need to start other programs without making a extremely weak profile. So for example you could use a weak sandbox for your IDE and start an other program from it that can get it's own tight profile. I fully agree with "this would still be an improvement if the alternative is to not use a sandbox at all or weaken the profiles".
My impression was always that such a feature should be implemented via D-Bus or an own socket. Maybe together with #3315.
Some already expect to run in the default namespace and are broken with firejail. |
Beta Was this translation helpful? Give feedback.
-
Firejail could selectively allow launching of new sandboxed apps from a sandbox by bind mounting a proxy program in the sandbox in place of the actual program. The proxy would pass its program arguments (but not the environment variables nor file descriptors?) to Firejail controlling the sandbox. Firejail would then launch a new sandbox for the app using the (sanitized) arguments. Signals and exit status would be relayed back to process in the original sandbox. By default, nothing would be proxied and then only when a profile requests proxying for only the explicitly selected apps.
The advantage would be better integration at the expense of weakened security. Though this would still be an improvement if the alternative is to not use a sandbox at all or weaken the profiles (or AppArmor rules) to allow both apps. Firejail may need to keep superuser capabilities or not setting NoNewPrivileges in order to be able to launch a new sandbox, which is pretty bad. Some cases may never work well if the apps expect to run in the same mount/PID namespaces etc.
One use case would be firejailed browser or email app, which could be allowed to launch selected viewer apps. This would be exactly the model of phishing attacks in case of email, so the negative and positive security implications should be considered carefully.
WDYT? I'm hesitant because of the security downsides.
Relates to:
Beta Was this translation helpful? Give feedback.
All reactions