]> Git Repo - linux.git/commit - include/net/ip.h
inet: fix addr_len/msg->msg_namelen assignment in recv_error and rxpmtu functions
authorHannes Frederic Sowa <[email protected]>
Fri, 22 Nov 2013 23:46:12 +0000 (00:46 +0100)
committerDavid S. Miller <[email protected]>
Sat, 23 Nov 2013 22:46:23 +0000 (14:46 -0800)
commit85fbaa75037d0b6b786ff18658ddf0b4014ce2a4
tree7b0fdc3767421d9bc9c2157f6b652026fbff99dd
parentca15a078bd907df5fc1c009477869c5cbde3b753
inet: fix addr_len/msg->msg_namelen assignment in recv_error and rxpmtu functions

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 <[email protected]>
Reported-by: Tom Labanowski
Cc: mpb <[email protected]>
Cc: David S. Miller <[email protected]>
Cc: Eric Dumazet <[email protected]>
Signed-off-by: Hannes Frederic Sowa <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
12 files changed:
include/net/ip.h
include/net/ipv6.h
include/net/ping.h
net/ipv4/ip_sockglue.c
net/ipv4/ping.c
net/ipv4/raw.c
net/ipv4/udp.c
net/ipv6/datagram.c
net/ipv6/ping.c
net/ipv6/raw.c
net/ipv6/udp.c
net/l2tp/l2tp_ip6.c
This page took 0.047548 seconds and 4 git commands to generate.