lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20220519115837.380bb8d4@canb.auug.org.au>
Date:   Thu, 19 May 2022 11:58:37 +1000
From:   Stephen Rothwell <sfr@...b.auug.org.au>
To:     David Miller <davem@...emloft.net>
Cc:     Networking <netdev@...r.kernel.org>,
        Geliang Tang <geliang.tang@...e.com>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Linux Next Mailing List <linux-next@...r.kernel.org>,
        Mat Martineau <mathew.j.martineau@...ux.intel.com>
Subject: linux-next: manual merge of the net-next tree with the net tree

Hi all,

Today's linux-next merge of the net-next tree got a conflict in:

  net/mptcp/subflow.c

between commit:

  ae66fb2ba6c3 ("mptcp: Do TCP fallback on early DSS checksum failure")

from the net tree and commits:

  0348c690ed37 ("mptcp: add the fallback check")
  f8d4bcacff3b ("mptcp: infinite mapping receiving")

from the net-next tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc net/mptcp/subflow.c
index be76ada89d96,6d59336a8e1e..000000000000
--- a/net/mptcp/subflow.c
+++ b/net/mptcp/subflow.c
@@@ -1218,35 -1215,45 +1230,45 @@@ no_data
  	return false;
  
  fallback:
- 	/* RFC 8684 section 3.7. */
- 	if (subflow->send_mp_fail) {
- 		if (mptcp_has_another_subflow(ssk)) {
- 			while ((skb = skb_peek(&ssk->sk_receive_queue)))
- 				sk_eat_skb(ssk, skb);
+ 	if (!__mptcp_check_fallback(msk)) {
+ 		/* RFC 8684 section 3.7. */
+ 		if (subflow->send_mp_fail) {
+ 			if (mptcp_has_another_subflow(ssk) ||
+ 			    !READ_ONCE(msk->allow_infinite_fallback)) {
+ 				ssk->sk_err = EBADMSG;
+ 				tcp_set_state(ssk, TCP_CLOSE);
+ 				subflow->reset_transient = 0;
+ 				subflow->reset_reason = MPTCP_RST_EMIDDLEBOX;
+ 				tcp_send_active_reset(ssk, GFP_ATOMIC);
+ 				while ((skb = skb_peek(&ssk->sk_receive_queue)))
+ 					sk_eat_skb(ssk, skb);
+ 			} else {
+ 				WRITE_ONCE(subflow->mp_fail_response_expect, true);
+ 				/* The data lock is acquired in __mptcp_move_skbs() */
+ 				sk_reset_timer((struct sock *)msk,
+ 					       &((struct sock *)msk)->sk_timer,
+ 					       jiffies + TCP_RTO_MAX);
+ 			}
+ 			WRITE_ONCE(subflow->data_avail, MPTCP_SUBFLOW_NODATA);
+ 			return true;
  		}
- 		ssk->sk_err = EBADMSG;
- 		tcp_set_state(ssk, TCP_CLOSE);
- 		subflow->reset_transient = 0;
- 		subflow->reset_reason = MPTCP_RST_EMIDDLEBOX;
- 		tcp_send_active_reset(ssk, GFP_ATOMIC);
- 		WRITE_ONCE(subflow->data_avail, MPTCP_SUBFLOW_NODATA);
- 		return true;
- 	}
  
- 	if (!subflow_can_fallback(subflow)) {
- 		/* fatal protocol error, close the socket.
- 		 * subflow_error_report() will introduce the appropriate barriers
- 		 */
- 		ssk->sk_err = EBADMSG;
- 		tcp_set_state(ssk, TCP_CLOSE);
- 		subflow->reset_transient = 0;
- 		subflow->reset_reason = MPTCP_RST_EMPTCP;
- 		tcp_send_active_reset(ssk, GFP_ATOMIC);
- 		WRITE_ONCE(subflow->data_avail, MPTCP_SUBFLOW_NODATA);
- 		return false;
 -		if ((subflow->mp_join || subflow->fully_established) && subflow->map_data_len) {
++		if (!subflow_can_fallback(subflow) && subflow->map_data_len) {
+ 			/* fatal protocol error, close the socket.
+ 			 * subflow_error_report() will introduce the appropriate barriers
+ 			 */
+ 			ssk->sk_err = EBADMSG;
+ 			tcp_set_state(ssk, TCP_CLOSE);
+ 			subflow->reset_transient = 0;
+ 			subflow->reset_reason = MPTCP_RST_EMPTCP;
+ 			tcp_send_active_reset(ssk, GFP_ATOMIC);
+ 			WRITE_ONCE(subflow->data_avail, MPTCP_SUBFLOW_NODATA);
+ 			return false;
+ 		}
+ 
+ 		__mptcp_do_fallback(msk);
  	}
  
- 	__mptcp_do_fallback(msk);
  	skb = skb_peek(&ssk->sk_receive_queue);
  	subflow->map_valid = 1;
  	subflow->map_seq = READ_ONCE(msk->ack_seq);

Content of type "application/pgp-signature" skipped

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ