Xin Long 6a9a27d539 sctp: clear the new asoc's stream outcnt in sctp_stream_update
When processing a duplicate cookie-echo chunk, sctp moves the new
temp asoc's stream out/in into the old asoc, and later frees this
new temp asoc.

But now after this move, the new temp asoc's stream->outcnt is not
cleared while stream->out is set to NULL, which would cause a same
crash as the one fixed in Commit 79d0895140e9 ("sctp: fix error
path in sctp_stream_init") when freeing this asoc later.

This fix is to clear this outcnt in sctp_stream_update.

Fixes: f952be79cebd ("sctp: introduce struct sctp_stream_out_ext")
Reported-by: Jianwen Ji <jiji@redhat.com>
Signed-off-by: Xin Long <lucien.xin@gmail.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Acked-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2018-04-27 13:34:34 -04:00
..
2018-03-27 13:18:09 -04:00
2018-04-10 12:25:30 -07:00
2018-04-25 09:51:54 +02:00
2018-04-07 22:32:31 -04:00
2018-04-27 11:49:31 -04:00
2018-03-27 13:18:09 -04:00
2018-03-27 13:18:09 -04:00
2018-03-27 13:18:09 -04:00
2018-04-24 13:17:08 -04:00
2018-03-27 13:18:09 -04:00
2018-04-15 23:49:27 -04:00
2018-04-12 21:46:10 -04:00
2018-02-01 09:51:57 -08:00