Skip to content

Commit

Permalink
mptcp: fix bogus socket state update
Browse files Browse the repository at this point in the history
Since the blamed commit, closing the first subflow can unexpectedly
change the msk socket state. In case of incoming fastclose, that
allows a listen() call to successfully race with a blocking recvmsg()
potentially causing the latter to hit a divide by zero bug in
cleanup_rbuf/__tcp_select_window().

Address the issue simply dropping the bogus state change.

Fixes: b29fcfb ("mptcp: full disconnect implementation")
Signed-off-by: Paolo Abeni <[email protected]>
  • Loading branch information
Paolo Abeni authored and intel-lab-lkp committed Jun 27, 2023
1 parent e7e88d6 commit eee8e21
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion net/mptcp/protocol.c
Original file line number Diff line number Diff line change
Expand Up @@ -2377,7 +2377,6 @@ static void __mptcp_close_ssk(struct sock *sk, struct sock *ssk,
* disconnect should never fail
*/
WARN_ON_ONCE(tcp_disconnect(ssk, 0));
msk->subflow->state = SS_UNCONNECTED;
mptcp_subflow_ctx_reset(subflow);
release_sock(ssk);

Expand Down

0 comments on commit eee8e21

Please sign in to comment.