mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-02 14:19:48 +00:00
Kernel: Use Userspace<T> for the recvfrom syscall, and Socket implementation
This fixes a bunch of unchecked kernel reads and writes, seems like they would might exploitable :). Write of sockaddr_in size to any address you please...
This commit is contained in:
parent
9f9b05ba0f
commit
8e97de2df9
Notes:
sideshowbarker
2024-07-19 03:25:25 +09:00
Author: https://github.com/bgianfo
Commit: 8e97de2df9
Pull-request: https://github.com/SerenityOS/serenity/pull/3201
Reviewed-by: https://github.com/awesomekling
9 changed files with 43 additions and 30 deletions
|
@ -195,7 +195,7 @@ KResultOr<size_t> Socket::read(FileDescription& description, size_t, u8* buffer,
|
|||
{
|
||||
if (is_shut_down_for_reading())
|
||||
return 0;
|
||||
return recvfrom(description, buffer, size, 0, nullptr, 0);
|
||||
return recvfrom(description, buffer, size, 0, {}, 0);
|
||||
}
|
||||
|
||||
KResultOr<size_t> Socket::write(FileDescription& description, size_t, const u8* data, size_t size)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue