mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-26 14:28:49 +00:00
Kernel: Let InodeWatcher track child inode numbers instead of names
First of all, this fixes a dumb info leak where we'd write kernel heap addresses (StringImpl*) into userspace memory when reading a watcher. Instead of trying to pass names to userspace, we now simply pass the child inode index. Nothing in userspace makes use of this yet anyway, so it's not like we're breaking anything. We'll see how this evolves.
This commit is contained in:
parent
55dd13ccac
commit
2cb32f8356
Notes:
sideshowbarker
2024-07-19 02:20:12 +09:00
Author: https://github.com/awesomekling
Commit: 2cb32f8356
6 changed files with 19 additions and 18 deletions
|
@ -1027,7 +1027,7 @@ KResult Ext2FSInode::add_child(Inode& child, const StringView& name, mode_t mode
|
|||
if (success)
|
||||
m_lookup_cache.set(name, child.index());
|
||||
|
||||
did_add_child(name);
|
||||
did_add_child(child.identifier());
|
||||
return KSuccess;
|
||||
}
|
||||
|
||||
|
@ -1072,7 +1072,7 @@ KResult Ext2FSInode::remove_child(const StringView& name)
|
|||
if (result.is_error())
|
||||
return result;
|
||||
|
||||
did_remove_child(name);
|
||||
did_remove_child(child_id);
|
||||
return KSuccess;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue