Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add minimum rust version requirement to libcgroups and libcontainers #626

Merged
merged 1 commit into from
Jan 22, 2022

Conversation

YJDoc2
Copy link
Collaborator

@YJDoc2 YJDoc2 commented Jan 21, 2022

CVE-2022-21658 was announced today which affects the rust std::fs::remove_dir_all function, where due to a race condition, a non-privileged process can request a privileged process to delete a dir which they do not have permission to delete. More information on this can be found at https://blog.rust-lang.org/2022/01/20/cve-2022-21658.html

Youki uses this function in libcgroups and libcontainer, where it is used to either remove a cgroup or remove a container bundle dir. Thus this PR adds rust-version field to both of these, and sets it to 1.58.1 which has a patch for this CVE. Now to compile youki one must have rust compiler of version at least 1.58.1 or newer. If tried to compile with previous version, it will give a compile time error.

This also changes the rust versions in the CI rust matrix to be compatible with this.

@YJDoc2 YJDoc2 requested a review from utam0k January 21, 2022 14:34
@YJDoc2
Copy link
Collaborator Author

YJDoc2 commented Jan 21, 2022

@utam0k PTAL

Copy link
Member

@utam0k utam0k left a comment

Choose a reason for hiding this comment

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

Perfect! Thanks a lot.

@utam0k utam0k merged commit 0f662dd into youki-dev:main Jan 22, 2022
@YJDoc2 YJDoc2 deleted the add_rust_min_v branch October 7, 2022 05:00
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants