From 03ae9f94cfdc734d8cb036f408ab05e582e4e345 Mon Sep 17 00:00:00 2001 From: Liav A Date: Mon, 24 Oct 2022 18:09:03 +0300 Subject: [PATCH] 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. --- Kernel/FileSystem/VirtualFileSystem.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/Kernel/FileSystem/VirtualFileSystem.cpp b/Kernel/FileSystem/VirtualFileSystem.cpp index 6fe7161b12..84fe0fe382 100644 --- a/Kernel/FileSystem/VirtualFileSystem.cpp +++ b/Kernel/FileSystem/VirtualFileSystem.cpp @@ -886,8 +886,6 @@ ErrorOr 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));