From patchwork Wed Apr 29 10:41:44 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Abeni X-Patchwork-Id: 220338 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.9 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0290EC83003 for ; Wed, 29 Apr 2020 10:42:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C39BC2087E for ; Wed, 29 Apr 2020 10:42:21 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="fQqxhNrs" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726608AbgD2KmV (ORCPT ); Wed, 29 Apr 2020 06:42:21 -0400 Received: from us-smtp-1.mimecast.com ([207.211.31.81]:29838 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726558AbgD2KmU (ORCPT ); Wed, 29 Apr 2020 06:42:20 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1588156939; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=hrJpRjqlEu/UcuxY5AVUv/22u4ZTEP9BFfbUeRUtUSE=; b=fQqxhNrsfdNpHo6xQdIillQR3rALuWlD7z57NCtTeZ+4RsLCAdJQ1L720X5VjoVMENlj29 Brkoztyu8pce7+zwGpeyTjsmCB2fDKX6a+s5OpsMUE74JoB4/1upzS2nk93ruSUZGHLhgR AvRqkNJignXIG0fqRbQXYX/GD5BG77E= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-405-IGo0j1nsPCyJAcLZPm34Uw-1; Wed, 29 Apr 2020 06:42:17 -0400 X-MC-Unique: IGo0j1nsPCyJAcLZPm34Uw-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 93732EC1AA; Wed, 29 Apr 2020 10:42:15 +0000 (UTC) Received: from linux.fritz.box.com (ovpn-114-45.ams2.redhat.com [10.36.114.45]) by smtp.corp.redhat.com (Postfix) with ESMTP id B0CEF282E6; Wed, 29 Apr 2020 10:42:12 +0000 (UTC) From: Paolo Abeni To: netdev@vger.kernel.org Cc: Eric Dumazet , Mat Martineau , Matthieu Baerts , "David S. Miller" , Jakub Kicinski , Christoph Paasch , mptcp@lists.01.org Subject: [PATCH net 0/5] mptcp: fix incoming options parsing Date: Wed, 29 Apr 2020 12:41:44 +0200 Message-Id: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org This series addresses a serious issue in MPTCP option parsing. This is bigger than the usual -net change, but I was unable to find a working, sane, smaller fix. The core change is inside patch 2/5 which moved MPTCP options parsing from the TCP code inside existing MPTCP hooks and clean MPTCP options status on each processed packet. The patch 1/5 is a needed pre-requisite, and patches 3,4,5 are smaller, related fixes. Paolo Abeni (5): mptcp: consolidate synack processing. mptcp: move option parsing into mptcp_incoming_options() mptcp: avoid a WARN on bad input. mptcp: fix 'use_ack' option access. mptcp: initialize the data_fin field for mpc packets include/linux/tcp.h | 51 ------------------------ include/net/mptcp.h | 3 -- net/ipv4/tcp_input.c | 7 ---- net/mptcp/options.c | 95 +++++++++++++++++++------------------------- net/mptcp/protocol.c | 6 +-- net/mptcp/protocol.h | 43 +++++++++++++++++++- net/mptcp/subflow.c | 81 +++++++++++++++++++++++-------------- 7 files changed, 137 insertions(+), 149 deletions(-)