kernel-fxtec-pro1x/net/sctp
Xin Long 0e6b33fa9a sctp: remove sched init from sctp_stream_init
[ Upstream commit 2e990dfd13974d9eae493006f42ffb48707970ef ]

syzbot reported a NULL-ptr deref caused by that sched->init() in
sctp_stream_init() set stream->rr_next = NULL.

  kasan: GPF could be caused by NULL-ptr deref or user memory access
  RIP: 0010:sctp_sched_rr_dequeue+0xd3/0x170 net/sctp/stream_sched_rr.c:141
  Call Trace:
    sctp_outq_dequeue_data net/sctp/outqueue.c:90 [inline]
    sctp_outq_flush_data net/sctp/outqueue.c:1079 [inline]
    sctp_outq_flush+0xba2/0x2790 net/sctp/outqueue.c:1205

All sched info is saved in sout->ext now, in sctp_stream_init()
sctp_stream_alloc_out() will not change it, there's no need to
call sched->init() again, since sctp_outq_init() has already
done it.

Fixes: 5bbbbe32a4 ("sctp: introduce stream scheduler foundations")
Reported-by: syzbot+4c9934f20522c0efd657@syzkaller.appspotmail.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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-03-19 13:12:39 +01:00
..
associola.c sctp: update frag_point when stream_interleave is set 2018-12-17 09:24:28 +01:00
auth.c treewide: kzalloc() -> kcalloc() 2018-06-12 16:19:22 -07:00
bind_addr.c
chunk.c net/sctp: Make wrappers for accessing in/out streams 2018-08-11 12:25:15 -07:00
debug.c
diag.c inet_diag: fix reporting cgroup classid and fallback to priority 2019-02-27 10:08:58 +01:00
endpointola.c
input.c sctp: use the pmtu from the icmp packet to update transport pathmtu 2018-10-15 22:54:20 -07:00
inqueue.c
ipv6.c sctp: set flow sport from saddr only when it's 0 2019-02-06 17:30:10 +01:00
Kconfig sctp: whitespace fixes 2018-07-24 14:10:42 -07:00
Makefile
objcnt.c
offload.c sctp: call gso_reset_checksum when computing checksum in sctp_gso_segment 2019-02-27 10:08:58 +01:00
output.c Revert "sctp: remove sctp_transport_pmtu_check" 2018-11-23 08:17:04 +01:00
outqueue.c sctp: define SCTP_SS_DEFAULT for Stream schedulers 2018-11-23 08:17:06 +01:00
primitive.c
proc.c sctp: remove useless start_fail from sctp_ht_iter in proc 2018-08-27 15:13:17 -07:00
protocol.c sctp: set flow sport from saddr only when it's 0 2019-02-06 17:30:10 +01:00
sm_make_chunk.c sctp: set chunk transport correctly when it's a new asoc 2019-02-06 17:30:09 +01:00
sm_sideeffect.c sctp: whitespace fixes 2018-07-24 14:10:42 -07:00
sm_statefuns.c
sm_statetable.c
socket.c sctp: call iov_iter_revert() after sending ABORT 2019-03-10 07:17:17 +01:00
stream.c sctp: remove sched init from sctp_stream_init 2019-03-19 13:12:39 +01:00
stream_interleave.c net/sctp: Make wrappers for accessing in/out streams 2018-08-11 12:25:15 -07:00
stream_sched.c net/sctp: Make wrappers for accessing in/out streams 2018-08-11 12:25:15 -07:00
stream_sched_prio.c net/sctp: Make wrappers for accessing in/out streams 2018-08-11 12:25:15 -07:00
stream_sched_rr.c net/sctp: Make wrappers for accessing in/out streams 2018-08-11 12:25:15 -07:00
sysctl.c
transport.c sctp: update dst pmtu with the correct daddr 2018-09-20 11:29:30 -07:00
tsnmap.c
ulpevent.c
ulpqueue.c