You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@rusty-snake how would I approach creating a LUKS encrypted wrapped environment?
Something similar to creating a LUKS encrypted file based disk and moving to it.
Is this theoretically possible, or, eventually since the process would be starting on the host machine all the root file system view will be available through/proc/$pid/root so it doesn't make any sense to start with?
Create a protected environment from host / datacenter access, when creating an encrypted filesystem for the host is not possible.
Is there a way to disallow the host apps from accessing such space for processes inside wraps?
bubblewrap works the other way around, processes in it are less privileged than processes outside of it.
You can not reasonable protect a less privileged domain from a more privileged domain.
Try the following:
Make sure kernel.yama.ptrace_scope has value 1 or 2.
Start a bash, show it's pid (echo $$) and leave it open.
Try to run strace -p $pid.
You should get strace: attach: ptrace(PTRACE_SEIZE, $pid): Operation not permitted
Now start a bash inside bubblewrap bwrap --unshare-user --dev-bind / / bash, show it's pid (echo $$) and leave it open.
Try to run strace -p $new_pid.
You should be able to attach to it and debug it.
As you see, using bubblewrap gives outside processes (with same uid) more permission over inside processes and not equal or less.
This is an issue tracker, not a discussion forum, and this is not an actionable issue.
It is not possible to use bubblewrap (or basically any other tool) to protect processes inside the sandbox from processes outside the sandbox: it is only for working in the other direction, protecting trusted processes outside the sandbox from untrusted processes inside the sandbox. For instance, if you look at how Flatpak uses bubblewrap, that's the intended use.
Processes outside the sandbox have total control over the parameters that get passed to bubblewrap, so they are trusted (with the information-security meaning of "trusted": a trusted component is a component that has the technical ability to break your security policy if it wants to). For anything clever that you try to think of in this direction, processes outside the sandbox will either have the ability to prevent you from doing that clever thing, or the ability to get access to credentials (like an encryption key), or both.
It is not possible to use bubblewrap (or basically any other tool) to protect processes inside the sandbox from processes outside the sandbox: it is only for working in the other direction, protecting trusted processes outside the sandbox from untrusted processes inside the sandbox. For instance, if you look at how Flatpak uses bubblewrap, that's the intended use.
Yeah that's clear. I'm trying to protect what's inside, that's it.
Processes outside the sandbox have total control over the parameters that get passed to bubblewrap, so they are trusted (with the information-security meaning of "trusted": a trusted component is a component that has the technical ability to break your security policy if it wants to). For anything clever that you try to think of in this direction, processes outside the sandbox will either have the ability to prevent you from doing that clever thing, or the ability to get access to credentials (like an encryption key), or both.
Yeah that's also obvious, however, I thought there might be a way Kernel-side, to control the abilities of host processes for example, or the isolation of sandboxes whichever, reaching the same target.
Activity
rusty-snake commentedon Oct 13, 2022
What do you want? And why do you want it?
Do you want to protect the programs running inside bwrap from the host? That's not in the thread model that bubblewrap can solve.
/proc/$pid/rootcan only be read/dereferenced by programs which havePTRACE_MODE_READ_FSCREDSon$pid.Bubblewarp has no LUKS support and will never get it.
cayolblake commentedon Oct 13, 2022
Create a protected environment from host / datacenter access, when creating an encrypted filesystem for the host is not possible.
Is there a way to disallow the host apps from accessing such space for processes inside wraps?
rusty-snake commentedon Oct 13, 2022
bubblewrap works the other way around, processes in it are less privileged than processes outside of it.
You can not reasonable protect a less privileged domain from a more privileged domain.
Try the following:
kernel.yama.ptrace_scopehas value1or2.bash, show it's pid (echo $$) and leave it open.strace -p $pid.strace: attach: ptrace(PTRACE_SEIZE, $pid): Operation not permittedbwrap --unshare-user --dev-bind / / bash, show it's pid (echo $$) and leave it open.strace -p $new_pid.As you see, using bubblewrap gives outside processes (with same uid) more permission over inside processes and not equal or less.
smcv commentedon Oct 13, 2022
This is an issue tracker, not a discussion forum, and this is not an actionable issue.
It is not possible to use bubblewrap (or basically any other tool) to protect processes inside the sandbox from processes outside the sandbox: it is only for working in the other direction, protecting trusted processes outside the sandbox from untrusted processes inside the sandbox. For instance, if you look at how Flatpak uses bubblewrap, that's the intended use.
Processes outside the sandbox have total control over the parameters that get passed to bubblewrap, so they are trusted (with the information-security meaning of "trusted": a trusted component is a component that has the technical ability to break your security policy if it wants to). For anything clever that you try to think of in this direction, processes outside the sandbox will either have the ability to prevent you from doing that clever thing, or the ability to get access to credentials (like an encryption key), or both.
rusty-snake commentedon Oct 13, 2022
OT: @smcv do you think it makes sense to enable GitHub Discussion for bubblewrap?
cayolblake commentedon Oct 13, 2022
@smcv There is no Discussion board available in the project, that's why the only route is using the Issue tracker.
cayolblake commentedon Oct 13, 2022
Yeah that's clear. I'm trying to protect what's inside, that's it.
Yeah that's also obvious, however, I thought there might be a way Kernel-side, to control the abilities of host processes for example, or the isolation of sandboxes whichever, reaching the same target.