Skip to content

Commit

Permalink
Kernel: Zero-initialize LocalSocket::m_address
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
awesomekling committed Jan 26, 2020
1 parent da296f5 commit 67950c8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Kernel/Net/LocalSocket.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ class LocalSocket final : public Socket, public InlineLinkedListNode<LocalSocket

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;
Expand Down

0 comments on commit 67950c8

Please sign in to comment.