-
Notifications
You must be signed in to change notification settings - Fork 273
Update bwrap.xml: Indicate potential problem forking mountspaces may cause. #548
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
The only indication that this may occur is the timing of lsof return - with every instance of bubblewrap closed, return was a bit faster. Problem referenced: https://forums.gentoo.org/viewtopic-t-1116050-start-0.html Nothing else indicated why a mapped device was busy.
|
Actually bwrap should not keep devices busy because it uses slave mount propagation. See also #522. Do you use OpenRC or runit or something like that? |
I do. Is that somehow related to the problem? |
|
Could be because
|
|
What does ¹This it not the correct way to parse mountinfo but should work here. |
"- ext4" without the cut: 27 1 254:2 / / rw,relatime - ext4 /dev/mapper/vg_pool-rootfs rw |
|
Yeah, for me (Fedora 37) it is If you want you can try what happens after you run |
|
I see, thanks. Are there any security implications for making mount point non-private? Does software running in bubblewrap gain more attack surface? |
Since bubblewrap always unshare the mount namespaces and makes all mountpoints slaves, nothing changes for the code running in bubblewrap. But see below.
Depends on your thread models (the ultimate answer to every question starting with " Are there any security implications"). For There is however a implication with removable media (actually mounting in general but after system start you usually only mount removable media) and sandboxing. I did not check how bubblewrap behaves here (because heavily depends on the command line options you use) but systemd.exec explicitly states:
|
|
That was informative. |
The only indication that this may occur is the timing of lsof return - with every instance of bubblewrap closed, return was a bit faster. Problem referenced: https://forums.gentoo.org/viewtopic-t-1116050-start-0.html
When a mount namespace is forked from its parent, it inherits all existing mounts. When you ran umount, you only unmounted in the namespace where you ran that. The device remains mounted in any other mount namespaces where it was mounted, preventing you from closing the device.Nothing indicated why a mapped device was busy when attempting to close.