Re: [PATCH net] sctp: fix error path in sctp_stream_init

2018-01-03 Thread David Miller
From: Marcelo Ricardo Leitner Date: Tue, 2 Jan 2018 19:44:37 -0200 > syzbot noticed a NULL pointer dereference panic in sctp_stream_free() > which was caused by an incomplete error handling in sctp_stream_init(). > By not clearing stream->outcnt, it made a for() in sctp_stream_free() > think tha

Re: [PATCH net] sctp: fix error path in sctp_stream_init

2018-01-03 Thread Neil Horman
On Tue, Jan 02, 2018 at 07:44:37PM -0200, Marcelo Ricardo Leitner wrote: > syzbot noticed a NULL pointer dereference panic in sctp_stream_free() > which was caused by an incomplete error handling in sctp_stream_init(). > By not clearing stream->outcnt, it made a for() in sctp_stream_free() > think

Re: [PATCH net] sctp: fix error path in sctp_stream_init

2018-01-02 Thread Xin Long
On Wed, Jan 3, 2018 at 5:44 AM, Marcelo Ricardo Leitner wrote: > syzbot noticed a NULL pointer dereference panic in sctp_stream_free() > which was caused by an incomplete error handling in sctp_stream_init(). > By not clearing stream->outcnt, it made a for() in sctp_stream_free() > think that it h

[PATCH net] sctp: fix error path in sctp_stream_init

2018-01-02 Thread Marcelo Ricardo Leitner
syzbot noticed a NULL pointer dereference panic in sctp_stream_free() which was caused by an incomplete error handling in sctp_stream_init(). By not clearing stream->outcnt, it made a for() in sctp_stream_free() think that it had elements to free, but not, leading to the panic. As suggested by Xin