linux/net/mptcp
Paolo Abeni 91b493f15d mptcp: don't always assume copied data in mptcp_cleanup_rbuf()
commit 551844f26d upstream.

Under some corner cases the MPTCP protocol can end-up invoking
mptcp_cleanup_rbuf() when no data has been copied, but such helper
assumes the opposite condition.

Explicitly drop such assumption and performs the costly call only
when strictly needed - before releasing the msk socket lock.

Fixes: fd8976790a ("mptcp: be careful on MPTCP-level ack.")
Cc: stable@vger.kernel.org
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Reviewed-by: Mat Martineau <martineau@kernel.org>
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Link: https://patch.msgid.link/20241230-net-mptcp-rbuf-fixes-v1-2-8608af434ceb@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
History 2025-01-09 13:30:07 +01:00
..
bpf.c bpf: Add bpf_skc_to_mptcp_sock_proto 2022-05-20 15:29:00 -07:00
crypto.c kunit: mptcp: adhere to KUNIT formatting standard 2021-04-16 17:10:40 -07:00
crypto_test.c mptcp: move crypto test to KUNIT 2020-06-26 16:21:39 -07:00
ctrl.c mptcp: Add a per-namespace sysctl to set the default path manager type 2022-04-29 17:25:14 -07:00
diag.c mptcp: correct MPTCP_SUBFLOW_ATTR_SSN_OFFSET reserved size 2024-08-29 17:30:25 +02:00
Kconfig kunit: mptcp: adhere to KUNIT formatting standard 2021-04-16 17:10:40 -07:00
Makefile Merge https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next 2022-05-23 16:07:14 -07:00
mib.c mptcp: prevent MPC handshake on port-based signal endpoints 2024-10-22 15:56:51 +02:00
mib.h mptcp: prevent MPC handshake on port-based signal endpoints 2024-10-22 15:56:51 +02:00
mptcp_diag.c tcp: Access &tcp_hashinfo via net. 2022-09-20 10:21:49 -07:00
options.c mptcp: fix TCP options overflow. 2025-01-09 13:30:07 +01:00
pm.c mptcp: pr_debug: add missing \n at the end 2024-09-08 07:53:02 +02:00
pm_netlink.c mptcp: pm: use _rcu variant under rcu_read_lock 2024-11-22 15:37:33 +01:00
pm_userspace.c mptcp: hold pm lock when deleting entry 2024-11-22 15:37:33 +01:00
protocol.c mptcp: don't always assume copied data in mptcp_cleanup_rbuf() 2025-01-09 13:30:07 +01:00
protocol.h mptcp: prevent MPC handshake on port-based signal endpoints 2024-10-22 15:56:51 +02:00
sockopt.c mptcp: pr_debug: add missing \n at the end 2024-09-08 07:53:02 +02:00
subflow.c mptcp: prevent MPC handshake on port-based signal endpoints 2024-10-22 15:56:51 +02:00
syncookies.c mptcp: don't return sockets in foreign netns 2021-09-24 10:51:36 +01:00
token.c mptcp: full disconnect implementation 2022-01-07 11:27:06 +00:00
token_test.c mptcp: don't return sockets in foreign netns 2021-09-24 10:51:36 +01:00