diff options
author | Xin Long <lucien.xin@gmail.com> | 2017-01-24 06:01:53 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-06-17 04:41:56 (GMT) |
commit | fb72eca1333c374e6eefff7f6e99917c44c4f231 (patch) | |
tree | 17d58c0c518287810ecfb5b8d6464ebc8a05de02 /drivers | |
parent | bf812fe92683cd52581824dc2c6767cbf04a72fb (diff) | |
download | linux-fb72eca1333c374e6eefff7f6e99917c44c4f231.tar.xz |
sctp: sctp_addr_id2transport should verify the addr before looking up assoc
[ Upstream commit 6f29a130613191d3c6335169febe002cba00edf5 ]
sctp_addr_id2transport is a function for sockopt to look up assoc by
address. As the address is from userspace, it can be a v4-mapped v6
address. But in sctp protocol stack, it always handles a v4-mapped
v6 address as a v4 address. So it's necessary to convert it to a v4
address before looking up assoc by address.
This patch is to fix it by calling sctp_verify_addr in which it can do
this conversion before calling sctp_endpoint_lookup_assoc, just like
what sctp_sendmsg and __sctp_connect do for the address from users.
Signed-off-by: Xin Long <lucien.xin@gmail.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
0 files changed, 0 insertions, 0 deletions