Skip to content
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

volume mount sandbox should protect against path traversal #21

Merged
merged 1 commit into from
Nov 11, 2020

Conversation

tgross
Copy link
Member

@tgross tgross commented Nov 11, 2020

The volume mounts for the LXC driver check that the path is not absolute, but
a relative path can be passed as the source and that can be used to escape the
task directory sandbox in the case where volumes_enabled is false (not the
default).

This issue was discovered while investigating hashicorp/nomad#9303

@tgross
Copy link
Member Author

tgross commented Nov 11, 2020

While this works in local development, it looks like TravisCI is broken with the current make deps; this is because some of our dependencies have switched to go.mod.

lxc/lxc_test.go Show resolved Hide resolved
@tgross
Copy link
Member Author

tgross commented Nov 11, 2020

Working on getting the build fixed in #22

The volume mounts for the LXC driver check that the path is not absolute, but
a relative path can be passed as the source and that can be used to escape the
task directory sandbox in the case where `volumes_enabled` is false (not the
default).
@tgross tgross merged commit 790464c into master Nov 11, 2020
@jrasell jrasell deleted the b_mount_sandbox branch June 30, 2021 11:30
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.

None yet

3 participants