Received: by 10.223.185.116 with SMTP id b49csp1081468wrg; Fri, 23 Feb 2018 11:34:59 -0800 (PST) X-Google-Smtp-Source: AH8x225ohEf3xfIL/QQ06VTZx1lEsTEfZcj73vbGFr90e3TH54Ps1jNdZ2AN1jzrSZRZ02XDR5Td X-Received: by 2002:a17:902:5914:: with SMTP id o20-v6mr2652211pli.60.1519414498877; Fri, 23 Feb 2018 11:34:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519414498; cv=none; d=google.com; s=arc-20160816; b=KM9Z28Ve5KwWtwJM8sY+5HX/pwZMUsv+grviaQGVKP2v6be+c4csKqsdxLXRl4z5OA ySNTeAvgvoH/OM72Ksl2Ci9fYe7i8TWhrvWgKsdzU+SPNEeIw2WC1Su9oUr8FcVsuXXW FR1x/Q6aOpjphbWtWW+03LXbATaNa6qVUrdECxSOQxRsMAImtwbqhhPSUzpEKa02gF0j 8Stz3/8tAxq6Ol+WiHPKVKAkhdfITIKDedvkUNVMrZ+ejSXTX9+encNOw0YB6NifT8z1 IPdqSIQgwVOuDA/zhkZIcrn90a+i161/k19fDAgh7zfyQZn6JyAj7wn+QoBqr55acq8s NPKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=fxkKHlNe/trC7xfR3W5NiTBrMPclC8j1umgKa+AGHpQ=; b=MpFIa0kDjKJI303etWPpl7tgUmCrlVVBDIB+W74CG77rW8IyQPMdiq2a3y8RsY9+CN NsJO8XVRLt6KaUcvetldcLOiL3zqT8ivX3lxvjDPLjA0zxquww9acWMooLgiN1cFP5ej zJlAmJnKjozPKDp6KufrmPDBFtosvqHM3ORmSbduUVzh3tI/39FhKlRUGAQ2deGICcD+ rb5J1B2Q/nPRo4erMS3jCIR8Cnvfg9+0MJnhMZel2zILnhauKLhaZkQOyf9M+dw0zt+f 6c9FapNWUYPwFgNyyScMBDOP65E6ODJECCWLy/QMJ8lL1tjDIGBiBz9VtA0NeRJu0qiP tjTQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k20-v6si2164742pll.645.2018.02.23.11.34.44; Fri, 23 Feb 2018 11:34:58 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754631AbeBWTeL (ORCPT + 99 others); Fri, 23 Feb 2018 14:34:11 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:45914 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934866AbeBWSvC (ORCPT ); Fri, 23 Feb 2018 13:51:02 -0500 Received: from localhost (LFbn-1-12258-90.w90-92.abo.wanadoo.fr [90.92.71.90]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 97BD812E2; Fri, 23 Feb 2018 18:51:01 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Willem de Bruijn , "David S. Miller" Subject: [PATCH 4.14 043/159] net: avoid skb_warn_bad_offload on IS_ERR Date: Fri, 23 Feb 2018 19:25:51 +0100 Message-Id: <20180223170748.597729358@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180223170743.086611315@linuxfoundation.org> References: <20180223170743.086611315@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Willem de Bruijn commit 8d74e9f88d65af8bb2e095aff506aa6eac755ada upstream. skb_warn_bad_offload warns when packets enter the GSO stack that require skb_checksum_help or vice versa. Do not warn on arbitrary bad packets. Packet sockets can craft many. Syzkaller was able to demonstrate another one with eth_type games. In particular, suppress the warning when segmentation returns an error, which is for reasons other than checksum offload. See also commit 36c92474498a ("net: WARN if skb_checksum_help() is called on skb requiring segmentation") for context on this warning. Signed-off-by: Willem de Bruijn Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- net/core/dev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/net/core/dev.c +++ b/net/core/dev.c @@ -2792,7 +2792,7 @@ struct sk_buff *__skb_gso_segment(struct segs = skb_mac_gso_segment(skb, features); - if (unlikely(skb_needs_check(skb, tx_path))) + if (unlikely(skb_needs_check(skb, tx_path) && !IS_ERR(segs))) skb_warn_bad_offload(skb); return segs;