From: Mathias Krause Date: Sun, 7 Apr 2013 01:51:49 +0000 (+0000) Subject: Bluetooth: fix possible info leak in bt_sock_recvmsg() X-Git-Tag: v3.2.45~19 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=95ee0fb7a014cdf80be37b329fa462ff3847f7c0;p=pandora-kernel.git 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. Cc: Marcel Holtmann Cc: Gustavo Padovan Cc: Johan Hedberg Signed-off-by: Mathias Krause Signed-off-by: David S. Miller Signed-off-by: Ben Hutchings --- Reading git-diff-tree failed