-
Notifications
You must be signed in to change notification settings - Fork 346
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
Implement secure join #346
Comments
Hi, I'm quite new to youki. Can I try to work on this? |
@Ian-Yy Sure. Do you know where to start? Please don't hesitate to ask us on how we can help you. |
@yihuaf I will try going through the code first. Thanks. |
Hi @yihuaf , correct me if I am wrong. This task require me to implement a new function |
Yes that's a very good idea. Or you can just implement a function |
Sorry but there's one thing I'm quite unsure of now. The implementation of |
Let's use it to at least prototype. |
Hi @yihuaf , I've done with a prototype with some tests for it. After working on it for some time, I realized I don't need to use the crate |
We need a
secure_join
implementation that's similar tohttps://github.com/cyphar/filepath-securejoin
. In short, this function guaranteesecure_join(rootfs, path)
thepath
is withinrootfs
. Whenpath
is../../
or other malicious symbolic links, it can cause youki to make changes outside of rootfs, creating security issue. This can be a follow up to #342An example of usage in runc:
https://github.com/opencontainers/runc/blob/51beb5c436b159ae2d483b219c37ecfde13b006a/libcontainer/utils/utils.go#L119
The text was updated successfully, but these errors were encountered: