aboutsummaryrefslogtreecommitdiff
path: root/usr/.gitignore
diff options
context:
space:
mode:
authorMathias Krause <minipli@googlemail.com>2013-04-07 01:52:00 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-05-01 08:56:40 -0700
commitdc85f620e827440f520551b2ff6222bc92b00fa9 (patch)
tree0cc896c905b9f1eb87b05e887ba4b33050c508b8 /usr/.gitignore
parent8576a59ab9134440a889b6728c49aeea105bacdf (diff)
tipc: fix info leaks via msg_name in recv_msg/recv_stream
[ Upstream commit 60085c3d009b0df252547adb336d1ccca5ce52ec ] The code in set_orig_addr() does not initialize all of the members of struct sockaddr_tipc when filling the sockaddr info -- namely the union is only partly filled. This will make recv_msg() and recv_stream() -- the only users of this function -- leak kernel stack memory as the msg_name member is a local variable in net/socket.c. Additionally to that both recv_msg() and recv_stream() fail to update the msg_namelen member to 0 while otherwise returning with 0, i.e. "success". This is the case for, e.g., non-blocking sockets. This will lead to a 128 byte kernel stack leak in net/socket.c. Fix the first issue by initializing the memory of the union with memset(0). Fix the second one by setting msg_namelen to 0 early as it will be updated later if we're going to fill the msg_name member. Signed-off-by: Mathias Krause <minipli@googlemail.com> Cc: Jon Maloy <jon.maloy@ericsson.com> Cc: Allan Stephens <allan.stephens@windriver.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'usr/.gitignore')
0 files changed, 0 insertions, 0 deletions