]> git.baikalelectronics.ru Git - kernel.git/commit
sctp: walk the list of asoc safely
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 1 Feb 2019 14:15:22 +0000 (15:15 +0100)
committerDavid S. Miller <davem@davemloft.net>
Fri, 1 Feb 2019 18:41:46 +0000 (10:41 -0800)
commit5e40b219ff3151f96cd7717d45ff4045e2fc93f3
treea2a036d38544f2cf0dfdc1daa1d13c250b8bd568
parent99a8f435e9f2ecc92541c9b4b34e8a700e340493
sctp: walk the list of asoc safely

In sctp_sendmesg(), when walking the list of endpoint associations, the
association can be dropped from the list, making the list corrupt.
Properly handle this by using list_for_each_entry_safe()

Fixes: 9e64cff497b3 ("sctp: add support for snd flag SCTP_SENDALL process in sendmsg")
Reported-by: Secunia Research <vuln@secunia.com>
Tested-by: Secunia Research <vuln@secunia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Acked-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sctp/socket.c