linux-stable/net/mptcp
Paolo Abeni 1d39cd8cf7 mptcp: fix integer overflow in mptcp_subflow_discard_data()
Christoph reported an infinite loop in the subflow receive path
under stress condition.

If there are multiple subflows, each of them using a large send
buffer, the delta between the sequence number used by
MPTCP-level retransmission can and the current msk->ack_seq
can be greater than MAX_INT.

In the above scenario, when calling mptcp_subflow_discard_data(),
such delta will be truncated to int, and could result in a negative
number: no bytes will be dropped, and subflow_check_data_avail()
will try again to process the same packet, looping forever.

This change addresses the issue by expanding the 'limit' size to 64
bits, so that overflows are not possible anymore.

Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/87
Fixes: 6719331c2f ("mptcp: trigger msk processing even for OoO data")
Reported-and-tested-by: Christoph Paasch <cpaasch@apple.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Reviewed-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2020-09-17 18:04:48 -07:00
..
crypto.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next 2020-08-05 20:13:21 -07:00
crypto_test.c mptcp: move crypto test to KUNIT 2020-06-26 16:21:39 -07:00
ctrl.c mptcp: enable JOIN requests even if cookies are in use 2020-07-31 16:55:32 -07:00
diag.c mptcp: allow dumping subflow context to userspace 2020-03-29 22:14:48 -07:00
Kconfig mptcp: add MPTCP socket diag interface 2020-07-09 12:38:41 -07:00
Makefile mptcp: enable JOIN requests even if cookies are in use 2020-07-31 16:55:32 -07:00
mib.c mptcp: add OoO related mibs 2020-09-14 13:28:02 -07:00
mib.h mptcp: add OoO related mibs 2020-09-14 13:28:02 -07:00
mptcp_diag.c mptcp: add MPTCP socket diag interface 2020-07-09 12:38:41 -07:00
options.c mptcp: Skip unnecessary skb extension allocation for bare acks 2020-07-28 17:02:42 -07:00
pm.c mptcp: use mptcp worker for path management 2020-07-07 13:02:13 -07:00
pm_netlink.c mptcp: move address attribute into mptcp_addr_info 2020-09-14 13:28:02 -07:00
protocol.c mptcp: Fix unsigned 'max_seq' compared with zero in mptcp_data_queue_ofo 2020-09-17 16:45:05 -07:00
protocol.h mptcp: allow picking different xmit subflows 2020-09-14 13:28:02 -07:00
subflow.c mptcp: fix integer overflow in mptcp_subflow_discard_data() 2020-09-17 18:04:48 -07:00
syncookies.c mptcp: fix syncookie build error on UP 2020-08-01 11:52:55 -07:00
token.c mptcp: subflow: add mptcp_subflow_init_cookie_req helper 2020-07-31 16:55:32 -07:00
token_test.c mptcp: introduce token KUNIT self-tests 2020-06-26 16:21:39 -07:00