mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 22:48:11 +00:00
Kernel: Allow relaxing cleanup task rules during system shutdown
Once we move to a more proper shutdown procedure, processes other than the finalizer task must be able to perform cleanup and finalization duties, not only because the finalizer task itself needs to be cleaned up by someone. This global variable, mirroring the early boot flags, allows a future shutdown process to perform cleanup on its own. Note that while this *could* be considered a weakening in security, the attack surface is minimal and the results are not dramatic. To exploit this, an attacker would have to gain a Kernel write primitive to this global variable (bypassing KASLR among other things) and then gain some way of calling the relevant functions, all of this only to destroy some other running process. The same effect can be achieved with LPE which can often be gained with significantly simpler userspace exploits (e.g. of setuid binaries).
This commit is contained in:
parent
021fb3ea05
commit
2fd23745a9
6 changed files with 39 additions and 5 deletions
11
Kernel/Tasks/PowerStateSwitchTask.h
Normal file
11
Kernel/Tasks/PowerStateSwitchTask.h
Normal file
|
@ -0,0 +1,11 @@
|
|||
/*
|
||||
* Copyright (c) 2023, kleines Filmröllchen <filmroellchen@serenityos.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
namespace Kernel {
|
||||
|
||||
extern bool g_in_system_shutdown;
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue