]> www.infradead.org Git - users/dwmw2/linux.git/commit
sctp: call iov_iter_revert() after sending ABORT
authorXin Long <lucien.xin@gmail.com>
Sun, 3 Mar 2019 08:50:26 +0000 (16:50 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 10 Mar 2019 06:17:17 +0000 (07:17 +0100)
commit8085d6d03fe3702e9cf37fff3677c08b40b1007f
treebd781b4b16b321bd629c5fb9dfedf90d25a122d6
parent16a006d72f333882b6affdebcaa0e84524e4a0c8
sctp: call iov_iter_revert() after sending ABORT

[ Upstream commit 901efe12318b1ea8d3e2c88a7b75ed6e6d5d7245 ]

The user msg is also copied to the abort packet when doing SCTP_ABORT in
sctp_sendmsg_check_sflags(). When SCTP_SENDALL is set, iov_iter_revert()
should have been called for sending abort on the next asoc with copying
this msg. Otherwise, memcpy_from_msg() in sctp_make_abort_user() will
fail and return error.

Fixes: 4910280503f3 ("sctp: add support for snd flag SCTP_SENDALL process in sendmsg")
Reported-by: Ying Xu <yinxu@redhat.com>
Signed-off-by: Xin Long <lucien.xin@gmail.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/sctp/socket.c