SCTP: fix connection memory corruption 91/10791/3
authorMarco Varlese <marco.varlese@suse.com>
Fri, 23 Feb 2018 16:43:06 +0000 (17:43 +0100)
committerFlorin Coras <florin.coras@gmail.com>
Sun, 25 Feb 2018 19:33:48 +0000 (19:33 +0000)
commit04e5d64c454ec53103fa1f4b7f3634bb61a65d0f
treeeb934071bb2254bea39bca2a9804caa07393b4d9
parent3473e4938718a820b63edaeab5ae7738c31379d5
SCTP: fix connection memory corruption

A bug was found when multiple SCTP connections were being opened to the
same SCTP server. This patch addresses that problem, removing the use of
the 'parent' pointer approach for sub-connection and saving instead
within the sub-connection itself the ID representing its position. That
facilitates pointer-arithmetic to be computed in the
get_connection_from_transport().

Change-Id: Iaa1f4efc501590be1c93e42fd6fe3d6e02f635eb
Signed-off-by: Marco Varlese <marco.varlese@suse.com>
src/vnet/sctp/sctp.c
src/vnet/sctp/sctp.h
src/vnet/sctp/sctp_input.c
src/vnet/sctp/sctp_output.c
test/test_sctp.py