Files
linux/include/net
Hannes Frederic Sowa abcc4a81f1 inet: fix addr_len/msg->msg_namelen assignment in recv_error and rxpmtu functions
[ Upstream commit 85fbaa7503 ]

Commit bceaa90240 ("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: bceaa90240 ("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>
[ kamal: backport to 3.8 ]
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
2013-12-11 13:52:44 -08:00
..
2012-11-19 23:56:59 +01:00
2012-08-09 16:18:06 -07:00
2012-04-15 12:44:40 -04:00
2005-08-29 15:32:25 -07:00
2012-04-15 12:44:40 -04:00
2010-06-03 03:21:52 -07:00
2012-04-15 12:44:40 -04:00
2012-07-19 10:43:03 -07:00
2012-10-08 17:42:36 -04:00
2011-03-31 11:26:23 -03:00
2012-12-11 12:49:53 -05:00
2013-02-28 05:38:41 -08:00
2012-08-14 14:28:32 -07:00
2008-06-11 21:00:38 -07:00
2011-03-31 11:26:23 -03:00
2012-05-17 18:45:20 -04:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2008-02-29 11:46:17 -08:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2010-06-03 03:21:52 -07:00
2012-08-07 16:24:55 -07:00
2009-01-06 11:38:15 -07:00
2005-08-29 16:01:32 -07:00
2011-05-17 14:16:58 -04:00
2009-03-21 19:06:50 -07:00
2012-05-19 01:08:16 -04:00
2012-11-03 14:59:04 -04:00
2013-05-01 09:46:20 -07:00
2012-08-06 13:40:47 -07:00
2013-11-01 10:40:52 -07:00
2008-07-05 21:25:39 -07:00
2013-11-01 10:40:52 -07:00
2009-10-07 16:39:43 -04:00
2012-04-15 12:44:40 -04:00
2012-05-16 15:17:08 -04:00
2012-04-15 12:44:40 -04:00