sctp: Check address length before reading address family
authorTetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Fri, 12 Apr 2019 10:53:10 +0000 (19:53 +0900)
committerDavid S. Miller <davem@davemloft.net>
Fri, 12 Apr 2019 17:25:03 +0000 (10:25 -0700)
commit175f7c1f01d30b2088491bee4636fbf846fb76ce
treef3e3d60992e26ca033d285e6d287abd5a29ef4c1
parent238ffdc49ef98b15819cfd5e3fb23194e3ea3d39
sctp: Check address length before reading address family

KMSAN will complain if valid address length passed to connect() is shorter
than sizeof("struct sockaddr"->sa_family) bytes.

Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sctp/socket.c