Closed
Description
The read_link
function will return an error if the link's destination is an absolute path. There are three problems with this:
- It won't return an error if the link's destination is a relative path that uses
../
to point outside of the sandbox. That's inconsistent. - Sometimes a symlink with an absolute path doesn't escape the sandbox. For example
/sandbox/link -> /sandbox/target
. - More importantly, sometimes it's important to read a link that points outside of the sandbox. For example, a backup application could copy all of the files from the root directory of one computer to a subdirectory of another. Symlinks would be broken, but would work again after a restore operation. The application that performs the restore would need to be able to read link targets, even if they point outside of the root. Or, a jail file system could contain absolute symlinks that resolve correctly for a jailed process, but not for an unjailed one. But it would still sometimes be useful for an unjailed process to read the links.
I suggest simply removing the absolute path check.
Metadata
Metadata
Assignees
Labels
No labels