-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Can Redox OS implement a TOCTOU-free fs::remove_dir_all
yet?
#140533
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
Comments
RedoxOS doesn't have openat support yet. It is planned though: https://gitlab.redox-os.org/redox-os/rfcs/-/merge_requests/25 After that we would need to add more |
We may already support it in a different way, can you point to the Linux implementation so I can check? |
rust/library/std/src/sys/fs/unix.rs Lines 2162 to 2320 in 0e517d3
|
I think unlinkat would also be important. |
We are working to implement all the *at functions and eliminate the other functions at the syscall level but it will take time |
@workingjubilee I'm working through this in the Redox OS chat, can you assign me to the issue? |
Yes, I saw that the Redox GitLab had recent commotion around the openat API, which I know is part of the minimal requirement here if we use any POSIX-like APIs for this. Thus I thought to myself "is this even up-to-date?" Note that we do not require Redox OS to implement POSIX APIs for the purpose of the stdlib. It can be nice from the code review perspective (if the POSIX code for the OS does not require many custom exceptions for that OS, anyways), but it's optional. Any API that allows us to avoid a TOCTOU race and thus satisfy the relevant security requirement will allow us to update the stdlib and remove the special note about Redox in the the security notice from the |
Location
fs::remove_dir_all
Summary
See https://blog.rust-lang.org/2022/01/20/cve-2022-21658/ if you want an explanation of what I mean.
Noticed it has been a hot minute since this happened after I noticed the FORTRANization of Redox's name.
Classifying as a documentation issue for now since I have no idea if the docs are even up-to-date on this point.
cc @jackpot51
The text was updated successfully, but these errors were encountered: