Received: by 10.213.65.68 with SMTP id h4csp1689441imn; Thu, 29 Mar 2018 09:11:02 -0700 (PDT) X-Google-Smtp-Source: AIpwx4++6+eULN6lFOf2smqsgocjdHIABnlg7V1+/zmR7QbUUe5BqdkEj1y8X8KXQDTG8LY88MHk X-Received: by 10.98.202.10 with SMTP id n10mr6913119pfg.220.1522339862705; Thu, 29 Mar 2018 09:11:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522339862; cv=none; d=google.com; s=arc-20160816; b=acAZnSWpooJLFJ7x+tPESLWlDrUH7NhXCKWHCe1IVQSPjpeC4Cz4SM4KLLkwEEKtsk jqKYMIzRJ6R1I/aTzWtJwLhCOeZCZcUcZwh3cVTJQxG0tFELk5EWk+sNKbUHAVwVx8BQ J6xMbcG2Cch+3ojbVmWs0RMaLzVPmkjSYkYbtW9igDsJovUn8UngNmRnwxgSGVD/MvHD M62cFHlfndpDkgff/3LpOq8onbgmZqEtBfK4Ko+yEnh+UJ1FJFYEuSEgS4a8/Isrx8Ix ao4alvbM/FOf4+ri3Kdmn4k/try2QR7geMw5pI69eZDuCyRGpW7ksu3cF2gdppmGwx/+ Fu2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:from:subject:cc:to:message-id:date :arc-authentication-results; bh=Tv2YHsrP66ZTu83uhssebQaEINVQ3qajE1CYHXz/698=; b=jg3z2rSuG/Me8OD5fG5MtbcxxW/RVdiTy8N3gUmcJGuufF4hjfijDZyHKgRO6EEdui VEz2os/VeTURXVBXRHw3+aGZYwyIHnqQgQmP3gTOKkEVrF+1BEGWUn3WSliL8mx4E+RM Wr6hlJqgSZAShRNVHiJ4cn9OMCB+mP28sPYozaz4OiqxtPwn1FGK7s/+191yux6lwV5M IGtjZIS39paLhuWbQ17mAqTqX969Z22PZq2NnTnXEySpR8cC1g0/uX8b7EB2LrtROQwC akwdadzK/TLP/NpjuPpUcvtJF0KPf/f73UPW//wLWFNqxd8QJ4o6PkJCmbKWgQNsD/7k 5D+w== 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 n9-v6si5928505plk.71.2018.03.29.09.10.48; Thu, 29 Mar 2018 09:11:02 -0700 (PDT) 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 S1752698AbeC2QJH (ORCPT + 99 others); Thu, 29 Mar 2018 12:09:07 -0400 Received: from shards.monkeyblade.net ([184.105.139.130]:45364 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752673AbeC2QJF (ORCPT ); Thu, 29 Mar 2018 12:09:05 -0400 Received: from localhost (67.110.78.66.ptr.us.xo.net [67.110.78.66]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: davem-davemloft) by shards.monkeyblade.net (Postfix) with ESMTPSA id A137D1208F8C8; Thu, 29 Mar 2018 09:09:04 -0700 (PDT) Date: Thu, 29 Mar 2018 12:09:03 -0400 (EDT) Message-Id: <20180329.120903.1175452061863560219.davem@davemloft.net> To: dongli.zhang@oracle.com Cc: xen-devel@lists.xenproject.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, wei.liu2@citrix.com, paul.durrant@citrix.com Subject: Re: [PATCH 1/1] xen-netback: process malformed sk_buff correctly to avoid BUG_ON() From: David Miller In-Reply-To: <1522194136-11985-1-git-send-email-dongli.zhang@oracle.com> References: <1522194136-11985-1-git-send-email-dongli.zhang@oracle.com> X-Mailer: Mew version 6.7 on Emacs 25.3 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Thu, 29 Mar 2018 09:09:05 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Dongli Zhang Date: Wed, 28 Mar 2018 07:42:16 +0800 > The "BUG_ON(!frag_iter)" in function xenvif_rx_next_chunk() is triggered if > the received sk_buff is malformed, that is, when the sk_buff has pattern > (skb->data_len && !skb_shinfo(skb)->nr_frags). Below is a sample call > stack: We should fix the parts of the kernel which build illegal malformed SKBs rather than adding checks to every driver in the tree. I'm not applying this, sorry.