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

unpack: insufficient pathname sanitisation #27

Closed
cyphar opened this issue Nov 9, 2016 · 1 comment
Closed

unpack: insufficient pathname sanitisation #27

cyphar opened this issue Nov 9, 2016 · 1 comment

Comments

@cyphar
Copy link
Member

cyphar commented Nov 9, 2016

Currently we aren't properly cleaning paths inside unpackEntry. In particular, if you have an invalid tar archive that contains entries such as ../../ or if it contains a entry that resolves through a symlink, then umoci will start touching parts of the host.

To fix this we need to use this library, which I helped write specifically to solve this problem inside Docker https://github.com/docker/docker/tree/master/pkg/symlink.

@cyphar
Copy link
Member Author

cyphar commented Nov 10, 2016

This has been fixed in 3da965c. I'm working on adding tests for this.

@cyphar cyphar closed this as completed Nov 10, 2016
@cyphar cyphar mentioned this issue Nov 10, 2016
22 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant