]> Git Repo - linux.git/commit
sctp: sctp_addr_id2transport should verify the addr before looking up assoc
authorXin Long <[email protected]>
Tue, 24 Jan 2017 06:01:53 +0000 (14:01 +0800)
committerDavid S. Miller <[email protected]>
Wed, 25 Jan 2017 17:26:55 +0000 (12:26 -0500)
commit6f29a130613191d3c6335169febe002cba00edf5
treed2581877c6cae4819e17ff33897f930d05ce4e65
parentec221a17a638dec4d9b0ba3e5817113f249dd194
sctp: sctp_addr_id2transport should verify the addr before looking up assoc

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 <[email protected]>
Acked-by: Neil Horman <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
net/sctp/socket.c
This page took 0.059739 seconds and 4 git commands to generate.