Skip to content

sandbox2: reject writable root in EnableSharedMountNamespace() - #183

Open
prasanna8585 wants to merge 1 commit into
google:mainfrom
prasanna8585:fix-shared-mntns-writable-root
Open

sandbox2: reject writable root in EnableSharedMountNamespace()#183
prasanna8585 wants to merge 1 commit into
google:mainfrom
prasanna8585:fix-shared-mntns-writable-root

Conversation

@prasanna8585

Copy link
Copy Markdown

VerifySharedMountNamespace() rejects tmpfs and /proc mounts to prevent unintended shared state when multiple Sandbox2 instances share a mount namespace, but did not check MountTree::Node::RootNode.writable. A policy built with SetRootWritable() passed validation unconditionally, and two independently-launched Sandbox2 instances sharing a mount namespace via EnableSharedMountNamespace() with a writable root end up sharing the same writable filesystem root -- confirmed end-to-end: one instance's write is directly readable by a second, separate instance.

Adds the RootNode.writable() check alongside the existing tmpfs_node() check, and a regression test.

VerifySharedMountNamespace() rejects tmpfs and /proc mounts to prevent
unintended shared state when multiple Sandbox2 instances share a mount
namespace, but did not check MountTree::Node::RootNode.writable. A policy
built with SetRootWritable() passed validation unconditionally, and two
independently-launched Sandbox2 instances sharing a mount namespace via
EnableSharedMountNamespace() with a writable root end up sharing the same
writable filesystem root -- confirmed end-to-end: one instance's write is
directly readable by a second, separate instance.

Adds the RootNode.writable() check alongside the existing tmpfs_node()
check, and a regression test.
@prasanna8585

Copy link
Copy Markdown
Author

Hi Team,
Is there any changes on this PR or are we ready to merge the PR?

Thanks for your time!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant