mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-01 06:07:59 +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:
committed by
Andreas Kling
parent
9f9b05ba0f
commit
8e97de2df9
@@ -290,7 +290,7 @@ DoubleBuffer& LocalSocket::send_buffer_for(FileDescription& description)
|
||||
ASSERT_NOT_REACHED();
|
||||
}
|
||||
|
||||
KResultOr<size_t> LocalSocket::recvfrom(FileDescription& description, void* buffer, size_t buffer_size, int, sockaddr*, socklen_t*)
|
||||
KResultOr<size_t> LocalSocket::recvfrom(FileDescription& description, void* buffer, size_t buffer_size, int, Userspace<sockaddr*>, Userspace<socklen_t*>)
|
||||
{
|
||||
auto& buffer_for_me = receive_buffer_for(description);
|
||||
if (!description.is_blocking()) {
|
||||
|
||||
Reference in New Issue
Block a user