]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
sctp: clear the transport of some out_chunk_list chunks in sctp_assoc_rm_peer
authorXin Long <lucien.xin@gmail.com>
Mon, 29 Oct 2018 15:10:29 +0000 (23:10 +0800)
committerSultan Alsawaf <sultan.alsawaf@canonical.com>
Wed, 24 Jul 2019 15:44:51 +0000 (09:44 -0600)
commit3cb2d13ff9b76f4b4cbc47ff8b4405c6bdadea41
treecdd138f4fce43732e5d5aa471cbea4befe2ac82e
parent01f207b86cd70182e3dcf6f1ed82c7e948e3feb1
sctp: clear the transport of some out_chunk_list chunks in sctp_assoc_rm_peer

BugLink: https://bugs.launchpad.net/bugs/1836968
commit df132eff463873e14e019a07f387b4d577d6d1f9 upstream.

If a transport is removed by asconf but there still are some chunks with
this transport queuing on out_chunk_list, later an use-after-free issue
will be caused when accessing this transport from these chunks in
sctp_outq_flush().

This is an old bug, we fix it by clearing the transport of these chunks
in out_chunk_list when removing a transport in sctp_assoc_rm_peer().

Reported-by: syzbot+56a40ceee5fb35932f4d@syzkaller.appspotmail.com
Signed-off-by: Xin Long <lucien.xin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
net/sctp/associola.c