mirror of
https://github.com/RGBCube/serenity
synced 2025-05-16 20:25:07 +00:00
Kernel+SystemMonitor: Prevent userspace access to process ELF image
Every process keeps its own ELF executable mapped in memory in case we need to do symbol lookup (for backtraces, etc.) Until now, it was mapped in a way that made it accessible to the program, despite the program not having mapped it itself. I don't really see a need for userspace to have access to this right now, so let's lock things down a little bit. This patch makes it inaccessible to userspace and exposes that fact through /proc/PID/vm (per-region "user_accessible" flag.)
This commit is contained in:
parent
39a6d29b39
commit
931e4b7f5e
5 changed files with 7 additions and 3 deletions
|
@ -20,6 +20,8 @@ ProcessMemoryMapWidget::ProcessMemoryMapWidget(GWidget* parent)
|
|||
pid_vm_fields.empend("amount_resident", "Resident", TextAlignment::CenterRight);
|
||||
pid_vm_fields.empend("Access", TextAlignment::CenterLeft, [](auto& object) {
|
||||
StringBuilder builder;
|
||||
if (!object.get("user_accessible").to_bool())
|
||||
builder.append('K');
|
||||
if (object.get("readable").to_bool())
|
||||
builder.append('R');
|
||||
if (object.get("writable").to_bool())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue