aboutsummaryrefslogtreecommitdiff
path: root/net/tipc/socket.c
diff options
context:
space:
mode:
authorHannes Frederic Sowa <hannes@stressinduktion.org>2013-11-18 04:20:45 +0100
committerWilly Tarreau <w@1wt.eu>2014-05-19 07:53:59 +0200
commitf8e4f8fc477a233429d60e7ed4acdc5e09337af9 (patch)
tree4d923f70d71af91803333e56f060d8dbb5cb8f1b /net/tipc/socket.c
parentc091517bfcde5e59ef4f8f1355761dbe2b04c6ff (diff)
inet: prevent leakage of uninitialized memory to user in recv syscalls
[ Upstream commit bceaa90240b6019ed73b49965eac7d167610be69 ] Only update *addr_len when we actually fill in sockaddr, otherwise we can return uninitialized memory from the stack to the caller in the recvfrom, recvmmsg and recvmsg syscalls. Drop the the (addr_len == NULL) checks because we only get called with a valid addr_len pointer either from sock_common_recvmsg or inet_recvmsg. If a blocking read waits on a socket which is concurrently shut down we now return zero and set msg_msgnamelen to 0. Reported-by: mpb <mpb.mail@gmail.com> Suggested-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: Hannes Frederic Sowa <hannes@stressinduktion.org> Signed-off-by: David S. Miller <davem@davemloft.net> [wt: no ieee802154, ping nor l2tp in 2.6.32] Signed-off-by: Willy Tarreau <w@1wt.eu>
Diffstat (limited to 'net/tipc/socket.c')
0 files changed, 0 insertions, 0 deletions