From: Xin Long <lucien.xin@xxxxxxxxx> 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 <dvyukov@xxxxxxxxxx> > Signed-off-by: Xin Long <lucien.xin@xxxxxxxxx> Applied and queued up for -stable, thanks. -- To unsubscribe from this list: send the line "unsubscribe linux-sctp" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html