mptcp: more strict state checking for acks
authorPaolo Abeni <pabeni@redhat.com>
Tue, 12 Jan 2021 17:25:23 +0000 (18:25 +0100)
committerJakub Kicinski <kuba@kernel.org>
Wed, 13 Jan 2021 04:09:19 +0000 (20:09 -0800)
commit20bc80b6f582ad1151c52ca09ab66b472768c9c8
tree0ba67f80da78e148b9b06d4d9d7bc5075788fc43
parentece9ab2a78afa1424c1aff45b1a95748dbc1f100
mptcp: more strict state checking for acks

Syzkaller found a way to trigger division by zero
in mptcp_subflow_cleanup_rbuf().

The current checks implemented into tcp_can_send_ack()
are too week, let's be more accurate.

Reported-by: Christoph Paasch <cpaasch@apple.com>
Fixes: ea4ca586b16f ("mptcp: refine MPTCP-level ack scheduling")
Fixes: fd8976790a6c ("mptcp: be careful on MPTCP-level ack.")
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Reviewed-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/mptcp/protocol.c