]> git.dujemihanovic.xyz Git - linux.git/commit
mptcp: fix duplicate data handling
authorPaolo Abeni <pabeni@redhat.com>
Wed, 31 Jul 2024 10:10:15 +0000 (12:10 +0200)
committerPaolo Abeni <pabeni@redhat.com>
Thu, 1 Aug 2024 10:30:13 +0000 (12:30 +0200)
commit68cc924729ffcfe90d0383177192030a9aeb2ee4
treece89414485cd2c82a99bc5c5e65d711bea4889b9
parent0a567c2a10033bf04ed618368d179bce6977984b
mptcp: fix duplicate data handling

When a subflow receives and discards duplicate data, the mptcp
stack assumes that the consumed offset inside the current skb is
zero.

With multiple subflows receiving data simultaneously such assertion
does not held true. As a result the subflow-level copied_seq will
be incorrectly increased and later on the same subflow will observe
a bad mapping, leading to subflow reset.

Address the issue taking into account the skb consumed offset in
mptcp_subflow_discard_data().

Fixes: 04e4cd4f7ca4 ("mptcp: cleanup mptcp_subflow_discard_data()")
Cc: stable@vger.kernel.org
Link: https://github.com/multipath-tcp/mptcp_net-next/issues/501
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Reviewed-by: Mat Martineau <martineau@kernel.org>
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
net/mptcp/subflow.c