mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-05 22:52:22 +02:00
Kernel: Actually check Process unveil data when creating perfcore dump
Before of this patch, we looked at the unveil data of the FinalizerTask, which naturally doesn't have any unveil restrictions, therefore allowing an unveil bypass for a process that enabled performance coredumps. To ensure we always check the dumped process unveil data, an option to pass a Process& has been added to a couple of methods in the class of VirtualFileSystem.
This commit is contained in:
Notes:
sideshowbarker
2024-07-17 08:59:18 +09:00
Author: https://github.com/supercomputer7 Commit: https://github.com/SerenityOS/serenity/commit/39de5b7f82 Pull-request: https://github.com/SerenityOS/serenity/pull/17716 Issue: https://github.com/SerenityOS/serenity/issues/15996
@@ -709,7 +709,7 @@ ErrorOr<void> Process::dump_perfcore()
|
||||
LockRefPtr<OpenFileDescription> description;
|
||||
auto credentials = this->credentials();
|
||||
for (size_t attempt = 1; attempt <= 10; ++attempt) {
|
||||
auto description_or_error = VirtualFileSystem::the().open(credentials, perfcore_filename->view(), O_CREAT | O_EXCL, 0400, current_directory(), UidAndGid { 0, 0 });
|
||||
auto description_or_error = VirtualFileSystem::the().open(*this, credentials, perfcore_filename->view(), O_CREAT | O_EXCL, 0400, current_directory(), UidAndGid { 0, 0 });
|
||||
if (!description_or_error.is_error()) {
|
||||
description = description_or_error.release_value();
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user