android_kernel_google_msm/net/phonet
Hannes Frederic Sowa 11afb94fbe inet: prevent leakage of uninitialized memory to user in recv syscalls
[ Upstream commit bceaa90240 ]

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-08 07:29:41 -08:00
..
af_phonet.c net: reintroduce missing rcu_assign_pointer() calls 2012-01-12 12:26:56 -08:00
datagram.c inet: prevent leakage of uninitialized memory to user in recv syscalls 2013-12-08 07:29:41 -08:00
Kconfig Phonet: kill the ST-Ericsson pipe controller Kconfig 2011-03-09 11:59:33 -08:00
Makefile
pep-gprs.c
pep.c phonet: Check input from user before allocating 2012-04-05 19:05:56 -04:00
pn_dev.c phonet: Sort out initiailziation and cleanup code. 2012-04-13 11:01:43 -04:00
pn_netlink.c rtnetlink: Compute and store minimum ifinfo dump size 2011-06-09 20:38:07 -07:00
socket.c net: reintroduce missing rcu_assign_pointer() calls 2012-01-12 12:26:56 -08:00
sysctl.c