Received: by 10.223.185.116 with SMTP id b49csp1144671wrg; Fri, 23 Feb 2018 12:44:31 -0800 (PST) X-Google-Smtp-Source: AH8x227j3vW6G/FAHdcUFt/fFH3MCyeHZ0yS1HF0xu0FmUUPr9ydVk+Oxhk1E6RcAVDG+USyF9Dl X-Received: by 2002:a17:902:d904:: with SMTP id c4-v6mr2842112plz.203.1519418671291; Fri, 23 Feb 2018 12:44:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519418671; cv=none; d=google.com; s=arc-20160816; b=jM4ihb6m1+/l097VrjaYgPYcmss+0RWLa2W2IFIAd4OQyHHVC0UT2HXRML2oc06+8t 6W6WQM3x2FKpqADKI0RsDCs2rgoK9bFLw4irbdt1GLR3C4Tx/uygvueB/u+HBhYwh3V8 GbxC6JoRn8uAtV4Ire2TpyzFB/QpoAxjvDQozbMxx5M6J3qI5NeQvr+Fv+Z8BQV7gb2B szDKtbWMRsuRcUYlDeBOpTOm9WIZVCiG2NG4xHStmLXY/e+id6oUmDaUlaLEpYrjH+4m u8sfth3E8cBVDGjLuGYOAmyPg9rvbDtJV/E9eSdCPPbjt3QzAmLwjkiBU05kENVNU5QX hYwg== 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=tGrQIT9vxlw2IsGaTS38bfdPVEBw9aC6O9lqiPVVYQw=; b=VU09FBEvsuLMc4wCsBAGRH6AOEuD/uKev/Mn26dINAGzEvudyOtrQZi/yfMZve+wGz gPH8ulN5e+y6F48ZbXXWQB+2Q7JUz9w8rx7v9iwSTRoizC/1LBlH0T2GeZK2wrWDt2Tl YVhuYGm2eZvn5KeJqtYosp1mBEU0i32CBinjoSxnxod3hbdaHf0zMrAm3baYN5b2IJZO /HGNi5NPx/Y7J1FyuAu42W06HFfHIwFmohB6U3dLiCIQS39gMEPKggUEkSRBmjdDB4T7 PtsgRSKWEqgESv78Emdq99BgBZ+7Pl4y0yEJdW2dvoyoyWLhT4NwY1ikLnc0OshbCYQE wUEw== 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 k14si1925850pgp.812.2018.02.23.12.44.16; Fri, 23 Feb 2018 12:44:31 -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 S1753397AbeBWUm0 (ORCPT + 99 others); Fri, 23 Feb 2018 15:42:26 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:36562 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753128AbeBWSd0 (ORCPT ); Fri, 23 Feb 2018 13:33:26 -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 0FB9A1164; Fri, 23 Feb 2018 18:33:25 +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.4 020/193] net: avoid skb_warn_bad_offload on IS_ERR Date: Fri, 23 Feb 2018 19:24:13 +0100 Message-Id: <20180223170329.250184813@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180223170325.997716448@linuxfoundation.org> References: <20180223170325.997716448@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.4-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 @@ -2598,7 +2598,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;