[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20180103.113024.1172104926214846601.davem@davemloft.net>
Date: Wed, 03 Jan 2018 11:30:24 -0500 (EST)
From: David Miller <davem@...emloft.net>
To: marcelo.leitner@...il.com
Cc: netdev@...r.kernel.org, linux-sctp@...r.kernel.org,
lucien.xin@...il.com, vyasevich@...il.com, nhorman@...driver.com
Subject: Re: [PATCH net] sctp: fix error path in sctp_stream_init
From: Marcelo Ricardo Leitner <marcelo.leitner@...il.com>
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 that it had elements to free, but not, leading to the panic.
>
> As suggested by Xin Long, this patch also simplifies the error path by
> moving it to the only if() that uses it.
>
> See-also: https://www.spinics.net/lists/netdev/msg473756.html
> See-also: https://www.spinics.net/lists/netdev/msg465024.html
> Reported-by: syzbot <syzkaller@...glegroups.com>
> Fixes: f952be79cebd ("sctp: introduce struct sctp_stream_out_ext")
> Signed-off-by: Marcelo Ricardo Leitner <marcelo.leitner@...il.com>
Applied, thank you.
Powered by blists - more mailing lists