Skip to content
This repository has been archived by the owner on Nov 8, 2024. It is now read-only.

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants