From 67950c80c883054c0043a666e0d3f698e22a4d3e Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sun, 26 Jan 2020 09:33:47 +0100 Subject: [PATCH] Kernel: Zero-initialize LocalSocket::m_address It was possible to read uninitialized kernel memory via getsockname(). Of course, kmalloc() is a good boy and scrubs new allocations with 0xBB so all you got was a bunch of 0xBB. --- Kernel/Net/LocalSocket.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Kernel/Net/LocalSocket.h b/Kernel/Net/LocalSocket.h index 439cf1998f..21b04f6463 100644 --- a/Kernel/Net/LocalSocket.h +++ b/Kernel/Net/LocalSocket.h @@ -91,7 +91,7 @@ private: bool m_bound { false }; bool m_accept_side_fd_open { false }; - sockaddr_un m_address; + sockaddr_un m_address { 0, { 0 } }; DoubleBuffer m_for_client; DoubleBuffer m_for_server;