Skip to content

Add scripts for overlay sandbox execution#4

Merged
angelhof merged 4 commits intomainfrom
add-overlay-sandbox-module
Dec 6, 2022
Merged

Add scripts for overlay sandbox execution#4
angelhof merged 4 commits intomainfrom
add-overlay-sandbox-module

Conversation

@gliargovas
Copy link
Copy Markdown
Collaborator

No description provided.

@gliargovas gliargovas requested a review from angelhof December 4, 2022 23:17
@gliargovas gliargovas self-assigned this Dec 4, 2022
Copy link
Copy Markdown
Member

@angelhof angelhof left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in general it looks good, but I think adding more comments and documentation is pretty important to understand why this works.

Comment thread overlay-sandbox/run-sandboxed.sh Outdated
Comment thread overlay-sandbox/run-sandboxed.sh
Comment thread overlay-sandbox/run-sandboxed.sh Outdated
Comment thread overlay-sandbox/run-sandboxed.sh

# TODO: use unshare instead of chroot
# Alternatively, have a look at this
# NOTE: installed version of unshare does not support --root option
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is OK to use chroot here (we can leave a more precise TODO to investigate the security implications of not doing an unshare together with the chroot and how could an adversary cause issues here).


ls / | xargs -I '{}' mount -t overlay overlay -o lowerdir=/'{}',upperdir=$PWD/$pt/upperdir/'{}',workdir=$PWD/$pt/workdir/'{}' $PWD/$pt/temproot/'{}'

# TODO: use unshare instead of chroot
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure if we ever said to use unshare instead of chroot. I thought we said to use them together(?)

@angelhof angelhof merged commit 431f29f into main Dec 6, 2022
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.

2 participants