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

Kernel: *at syscalls should fully ignore dirfd if an absolute path is given #24328

Open
timschumi opened this issue May 14, 2024 · 0 comments · May be fixed by #24426
Open

Kernel: *at syscalls should fully ignore dirfd if an absolute path is given #24328

timschumi opened this issue May 14, 2024 · 0 comments · May be fixed by #24426
Labels
bug Something isn't working posix POSIX compliance

Comments

@timschumi
Copy link
Member

At the moment, most *at syscalls will still try to resolve the directory custody before checking the path (with the latter happening in VirtualFileSystem::resolve_path_without_veil), so passing an invalid or non-directory file descriptor (such as 0, 1 or 2) will cause errors that shouldn't happen according to POSIX.

#23099 papered over this for the utimensat functionality in particular, but ideally there should be a structurally sound fix that we can easily apply to all similar syscalls. One potential solution is to not pass the resolved Custody down to resolve_path_without_veil, but rather a fallible lambda function that resolves the Custody on demand if required.

@timschumi timschumi added bug Something isn't working posix POSIX compliance labels May 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working posix POSIX compliance
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant