android_kernel_samsung_msm8976/net/l2tp
Hannes Frederic Sowa 08c62a109e inet: fix addr_len/msg->msg_namelen assignment in recv_error and rxpmtu functions
[ Upstream commit 85fbaa75037d0b6b786ff18658ddf0b4014ce2a4 ]

Commit bceaa90240b6019ed73b49965eac7d167610be69 ("inet: prevent leakage
of uninitialized memory to user in recv syscalls") conditionally updated
addr_len if the msg_name is written to. The recv_error and rxpmtu
functions relied on the recvmsg functions to set up addr_len before.

As this does not happen any more we have to pass addr_len to those
functions as well and set it to the size of the corresponding sockaddr
length.

This broke traceroute and such.

Fixes: bceaa90240b6 ("inet: prevent leakage of uninitialized memory to user in recv syscalls")
Reported-by: Brad Spengler <spender@grsecurity.net>
Reported-by: Tom Labanowski
Cc: mpb <mpb.mail@gmail.com>
Cc: David S. Miller <davem@davemloft.net>
Cc: 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:25 -08:00
..
Kconfig net/l2tp: remove depends on CONFIG_EXPERIMENTAL 2013-01-11 11:40:01 -08:00
l2tp_core.c l2tp: Fix build warning with ipv6 disabled. 2013-11-04 04:31:00 -08:00
l2tp_core.h l2tp: fix kernel panic when using IPv4-mapped IPv6 addresses 2013-11-04 04:31:00 -08:00
l2tp_debugfs.c l2tp: avoid deadlock in l2tp stats update 2013-03-20 12:10:39 -04:00
l2tp_eth.c l2tp: fix oops in l2tp_eth_create() error path 2012-11-02 21:56:35 -04:00
l2tp_ip.c inet: prevent leakage of uninitialized memory to user in recv syscalls 2013-12-08 07:29:25 -08:00
l2tp_ip6.c inet: fix addr_len/msg->msg_namelen assignment in recv_error and rxpmtu functions 2013-12-08 07:29:25 -08:00
l2tp_netlink.c l2tp: avoid deadlock in l2tp stats update 2013-03-20 12:10:39 -04:00
l2tp_ppp.c net: rework recvmsg handler msg_name and msg_namelen logic 2013-12-08 07:29:25 -08:00
Makefile l2tp: introduce L2TPv3 IP encapsulation support for IPv6 2012-05-01 09:30:55 -04:00