From patchwork Wed Feb 12 18:07:27 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kelsey Skunberg X-Patchwork-Id: 1236981 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=canonical.com Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48Hng90mHwz9sRL; Thu, 13 Feb 2020 05:07:48 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1j1wQK-0003SQ-9e; Wed, 12 Feb 2020 18:07:44 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1j1wQI-0003S1-5U for kernel-team@lists.ubuntu.com; Wed, 12 Feb 2020 18:07:42 +0000 Received: from mail-io1-f71.google.com ([209.85.166.71]) by youngberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1j1wQH-0001ln-Pb for kernel-team@lists.ubuntu.com; Wed, 12 Feb 2020 18:07:41 +0000 Received: by mail-io1-f71.google.com with SMTP id z201so2265347iof.8 for ; Wed, 12 Feb 2020 10:07:41 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=cmcgUnngk5iX16usH83F1NXnBndV07oGVwSKb1WPiQQ=; b=SYB2LQifuqvHeridN+JSwDZvNseRtIgci+tz3nfBrKh1lvl/yq+18kAKMyjJ2JYmId BIQ0Agp7WzPILiMuSeY0AP2tBhcy4SMDemmX6pC3IehXPyDmB/6hWDpyX6ziJVv+KONV 03tS1UXkvQMhdxv88O8f20xrIWOluyIQtzOWy3NPreFbjbLXTiw3znfY07tdUZeZaI9T Svfvn+DpS9t/4uk8t9Wq+VSAT/KpsQ6YM9QAtxfEibdmUhi113t9IlVRWq8Y22fkAjlJ cxQu2pnc6C/SfUHeqoWCeL1RKUiaX/4V+gKtP67xkvsZ50KOeqZnOleAYY3OK07ngfot 6/+g== X-Gm-Message-State: APjAAAW+da8EJz1HwRtkBU/J2PMXSvvNKjkHhS0gfDW+3ItXNJN0JxoD DivpzYdsxeezPVrvAQkP0YX7gpF7y3G9EmbXaAy1AJoZxF/PK49nOANd/g2LD78mCtD0foIQ43B QrmW7Xkd63hnatGk5XJb+XQU2PytKjyJrJE2lBOPIfg== X-Received: by 2002:a6b:2c95:: with SMTP id s143mr18256274ios.308.1581530860574; Wed, 12 Feb 2020 10:07:40 -0800 (PST) X-Google-Smtp-Source: APXvYqzF0YqS2pdqf9yegOC+HNaX26CyX68ubkufxaDU2KZhgnxLzl7jOoR50O6h6YfKEKE7zTRCkg== X-Received: by 2002:a6b:2c95:: with SMTP id s143mr18256254ios.308.1581530860305; Wed, 12 Feb 2020 10:07:40 -0800 (PST) Received: from localhost.localdomain (c-73-243-191-173.hsd1.co.comcast.net. [73.243.191.173]) by smtp.gmail.com with ESMTPSA id a21sm259044ioh.29.2020.02.12.10.07.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Feb 2020 10:07:40 -0800 (PST) From: Kelsey Skunberg To: kernel-team@lists.ubuntu.com Subject: [SRU][F/E/B/X][PATCH v2 0/2] ipsec interfaces: fix sending with bpf_redirect() / AF_PACKET sockets Date: Wed, 12 Feb 2020 11:07:27 -0700 Message-Id: <20200212180729.10428-1-kelsey.skunberg@canonical.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" BugLink: https://bugs.launchpad.net/bugs/1860969 SRU Justification: [Impact] Packets sent to a vti[6]/xfrm interface via bpf_redirect() or via an AF_PACKET socket are dropped (no carrier). The bug exists since the beginning of each driver. [Fix] This has been fixed in v5.5 by the following upstream commits - 95224166a903 ("vti[6]: fix packet tx through bpf_redirect()") - f042365dbffe ("xfrm interface: fix packet tx through bpf_redirect()") https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=95224166a903 https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=f042365dbffe Backport the requested patches to Eoan (5.3), Bionic (4.15) and Xenial (4.4). Patches have already been applied to 5.4 focal tree through upstream stable updates. [Testcase] Can be reproduced and tested with an AF_PACKET socket and python script which is included in both mentioned patches. [Risk of Regression] This patch affects only the cases described above (when no dst is attached to the skb), thus the risk should be low. Changes in v2: - organize SRU Justification information to be listed under proper catergories - limit lines to 80 characters Nicolas Dichtel (2): vti[6]: fix packet tx through bpf_redirect() xfrm interface: fix packet tx through bpf_redirect() net/ipv4/ip_vti.c | 13 +++++++++++-- net/ipv6/ip6_vti.c | 13 +++++++++++-- net/xfrm/xfrm_interface.c | 32 +++++++++++++++++++++++++------- 3 files changed, 47 insertions(+), 11 deletions(-) Acked-by: Kamal Mostafa Acked-by: Kleber Sacilotto de Souza