1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-14 14:44:58 +00:00

Kernel/FileSystem: Remove hardcoded unveil path of /usr/lib/Loader.so

If a program needs to execute a dynamic executable program, then it
should unveil /usr/lib/Loader.so by itself and not rely on the Kernel to
allow using this binary without any sense of respect to unveil promises
being made by the running parent program.
This commit is contained in:
Liav A 2022-10-24 18:09:03 +03:00 committed by Andrew Kaster
parent d102ea5f81
commit 03ae9f94cf

View file

@ -886,8 +886,6 @@ ErrorOr<void> VirtualFileSystem::validate_path_against_process_veil(StringView p
{
if (Process::current().veil_state() == VeilState::None)
return {};
if (options == O_EXEC && path == "/usr/lib/Loader.so")
return {};
VERIFY(path.starts_with('/'));
VERIFY(!path.contains("/../"sv) && !path.ends_with("/.."sv));