android_kernel_samsung_univ.../net/sctp
Xin Long 957adaae7d sctp: delay the authentication for the duplicated cookie-echo chunk
[ Upstream commit 59d8d4434f429b4fa8a346fd889058bda427a837 ]

Now sctp only delays the authentication for the normal cookie-echo
chunk by setting chunk->auth_chunk in sctp_endpoint_bh_rcv(). But
for the duplicated one with auth, in sctp_assoc_bh_rcv(), it does
authentication first based on the old asoc, which will definitely
fail due to the different auth info in the old asoc.

The duplicated cookie-echo chunk will create a new asoc with the
auth info from this chunk, and the authentication should also be
done with the new asoc's auth info for all of the collision 'A',
'B' and 'D'. Otherwise, the duplicated cookie-echo chunk with auth
will never pass the authentication and create the new connection.

This issue exists since very beginning, and this fix is to make
sctp_assoc_bh_rcv() follow the way sctp_endpoint_bh_rcv() does
for the normal cookie-echo chunk to delay the authentication.

While at it, remove the unused params from sctp_sf_authenticate()
and define sctp_auth_chunk_verify() used for all the places that
do the delayed authentication.

v1->v2:
  fix the typo in changelog as Marcelo noticed.

Acked-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-26 08:48:49 +02:00
..
associola.c sctp: delay the authentication for the duplicated cookie-echo chunk 2018-05-26 08:48:49 +02:00
auth.c
bind_addr.c
chunk.c
debug.c net: sctp: fix array overrun read on sctp_timer_tbl 2017-12-09 18:42:42 +01:00
endpointola.c
input.c sctp: add the missing sock_owned_by_user check in sctp_icmp_redirect 2017-11-18 11:11:05 +01:00
inqueue.c sctp: fix the issue that the cookie-ack with auth can't get processed 2018-05-26 08:48:48 +02:00
ipv6.c sctp: handle two v4 addrs comparison in sctp_inet6_cmp_addr 2018-05-26 08:48:48 +02:00
Kconfig
Makefile
objcnt.c
output.c
outqueue.c
primitive.c
probe.c
proc.c
protocol.c sctp: fix dst refcnt leak in sctp_v4_get_dst 2018-03-11 16:19:46 +01:00
sm_make_chunk.c fixup: sctp: verify size of a new chunk in _sctp_make_chunk() 2018-03-18 11:17:54 +01:00
sm_sideeffect.c
sm_statefuns.c sctp: delay the authentication for the duplicated cookie-echo chunk 2018-05-26 08:48:49 +02:00
sm_statetable.c
socket.c sctp: sctp_sockaddr_af must check minimal addr length for AF_INET6 2018-04-13 19:50:25 +02:00
ssnmap.c
sysctl.c
transport.c
tsnmap.c
ulpevent.c
ulpqueue.c