diff options
author | Mathias Krause <minipli@googlemail.com> | 2013-04-07 01:51:49 +0000 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-05-01 09:46:01 -0700 |
commit | 8244d9fcae39a13ec99f85a9eaf8956b25341ae1 (patch) | |
tree | f275a335061e43ae13b69fc5d9547df4cde91c0a /net/tipc/socket.c | |
parent | c1c820758a240b45ab413304c36c6bede9c2933c (diff) |
Bluetooth: fix possible info leak in bt_sock_recvmsg()
[ Upstream commit 4683f42fde3977bdb4e8a09622788cc8b5313778 ]
In case the socket is already shutting down, bt_sock_recvmsg() returns
with 0 without updating msg_namelen leading to net/socket.c leaking the
local, uninitialized sockaddr_storage variable to userland -- 128 bytes
of kernel stack memory.
Fix this by moving the msg_namelen assignment in front of the shutdown
test.
Signed-off-by: Mathias Krause <minipli@googlemail.com>
Cc: Marcel Holtmann <marcel@holtmann.org>
Cc: Gustavo Padovan <gustavo@padovan.org>
Cc: Johan Hedberg <johan.hedberg@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/tipc/socket.c')
0 files changed, 0 insertions, 0 deletions