summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorJason Gunthorpe <jgunthorpe@obsidianresearch.com>2015-05-26 17:30:17 -0600
committerDavid S. Miller <davem@davemloft.net>2015-05-27 14:15:26 -0400
commit9302d7bb0c5cd46be5706859301f18c137b2439f (patch)
tree6f1b707dec37c54bd8fbb80fb0a328944dc115e3 /net
parent86e363dc3b50bfd50a1f315934583fbda673ab8d (diff)
downloadop-kernel-dev-9302d7bb0c5cd46be5706859301f18c137b2439f.zip
op-kernel-dev-9302d7bb0c5cd46be5706859301f18c137b2439f.tar.gz
sctp: Fix mangled IPv4 addresses on a IPv6 listening socket
sctp_v4_map_v6 was subtly writing and reading from members of a union in a way the clobbered data it needed to read before it read it. Zeroing the v6 flowinfo overwrites the v4 sin_addr with 0, meaning that every place that calls sctp_v4_map_v6 gets ::ffff:0.0.0.0 as the result. Reorder things to guarantee correct behaviour no matter what the union layout is. This impacts user space clients that open an IPv6 SCTP socket and receive IPv4 connections. Prior to 299ee user space would see a sockaddr with AF_INET and a correct address, after 299ee the sockaddr is AF_INET6, but the address is wrong. Fixes: 299ee123e198 (sctp: Fixup v4mapped behaviour to comply with Sock API) Signed-off-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com> Acked-by: Daniel Borkmann <daniel@iogearbox.net> Acked-by: Neil Horman <nhorman@tuxdriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud