From: Xin Long <lucien....@gmail.com>
Date: Sun, 10 Dec 2017 15:40:51 +0800

> Now in sctp_setsockopt_reset_streams, it only does the check
> optlen < sizeof(*params) for optlen. But it's not enough, as
> params->srs_number_streams should also match optlen.
> 
> If the streams in params->srs_stream_list are less than stream
> nums in params->srs_number_streams, later when dereferencing
> the stream list, it could cause a slab-out-of-bounds crash, as
> reported by syzbot.
> 
> This patch is to fix it by also checking the stream numbers in
> sctp_setsockopt_reset_streams to make sure at least it's not
> greater than the streams in the list.
> 
> Fixes: 7f9d68ac944e ("sctp: implement sender-side procedures for SSN Reset 
> Request Parameter")
> Reported-by: Dmitry Vyukov <dvyu...@google.com>
> Signed-off-by: Xin Long <lucien....@gmail.com>

Applied and queued up for -stable, thanks.

Reply via email to