-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[core][state][log] Cherry pick changes to prevent state API from read…
…ing files outside the Ray log directory (#41520) * [core][state][log] State API should not allow reading files outside of the ray log directory on all ray nodes. (#41467) State API log retrieval has a security bug where one could pass: relative paths like "../../../xxx" to get file outside of ray's log dir absolute path that's refers to other files to get file somewhere else. This PR fixes both issues such that one could only read logs under the ray logs directory. --------- Signed-off-by: rickyyx <rickyx@anyscale.com> Signed-off-by: Edward Oakes <ed.nmi.oakes@gmail.com> * [core][state][log] Enable following symlinks that point outside of the `root_log_dir` when resolving paths (#41502) Follow-up to: #41467. The change incidentally broke log retrieval on mac os because /tmp is a symlink to /private/tmp. This PR avoids resolving the symlink until after we do the subdir check. This solves the mac os problem and generically enables file paths that contain symlinks outside of the root_log_dir. --------- Signed-off-by: Edward Oakes <ed.nmi.oakes@gmail.com> --------- Signed-off-by: rickyyx <rickyx@anyscale.com> Signed-off-by: Edward Oakes <ed.nmi.oakes@gmail.com> Co-authored-by: Ricky Xu <xuchen727@hotmail.com>
- Loading branch information
Showing
7 changed files
with
143 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters