diff options
author | Andreas Kling <kling@serenityos.org> | 2020-01-26 09:33:47 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-01-26 09:48:53 +0100 |
commit | 67950c80c883054c0043a666e0d3f698e22a4d3e (patch) | |
tree | 23ac8b247d72f2f99c3549ab96ea8a9988a15429 | |
parent | da296f58659f740f18f8eaa9a539385908ed34b3 (diff) | |
download | serenity-67950c80c883054c0043a666e0d3f698e22a4d3e.zip |
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.
-rw-r--r-- | Kernel/Net/LocalSocket.h | 2 |
1 files changed, 1 insertions, 1 deletions
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; |