Skip to content
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

linux_env - FileSystem::resolve_path - wrong resolutions with symbolic link #1115

Open
Sh3idan opened this issue Dec 24, 2019 · 0 comments · May be fixed by #1117
Open

linux_env - FileSystem::resolve_path - wrong resolutions with symbolic link #1115

Sh3idan opened this issue Dec 24, 2019 · 0 comments · May be fixed by #1117

Comments

@Sh3idan
Copy link
Contributor

Sh3idan commented Dec 24, 2019

My architecture:

file_sb/
├── home
│   └── user
│       └── bin.elf
└── proc
    ├── 1000
    │   └── exe -> /home/bla/[TRUNCATED]/file_sb/home/user/bin.elf
    └── self -> 1000

The function FileSystem::resolve_path returns a wrong path with a symbolic link.

If the target is an absolute path and already a link in the sandbox, resolve_path returns a double sandboxed link. See below:

[syscalls][sys_generic_open][DEBUG]: sys_open('/proc/self/exe', 0, 0)
[environment][resolve_path][DEBUG]: resolve_path(path='/proc/self/exe', follow_link=True)
[environment][resolve_path][DEBUG]: resolve_path(path='/home/bla/[TRUNCATED]/file_sb/home/user/bin.elf', follow_link=True)
[environment][resolve_path][DEBUG]: -> '/home/bla/[TRUNCATED]/file_sb/home/bla/[TRUNCATED]/file_sb/home/user/bin.elf'
[environment][resolve_path][DEBUG]: -> '/home/bla/[TRUNCATED]/file_sb/home/bla/[TRUNCATED]/file_sb/home/user/bin.elf'
[syscalls][syscall_x86_64_exception_handler][DEBUG]: -> ffffffffffffffff
@Sh3idan Sh3idan linked a pull request Dec 24, 2019 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant