Received: by 2002:a25:ca44:0:0:0:0:0 with SMTP id a65csp2314705ybg; Thu, 30 Jul 2020 16:50:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzrK5LM+Hw7PS7E4e0LWL+U2NL6XyQGbtXGUjzEuu1b+fM8qpQAJ8JP04o8bj4OiYDkuSd9 X-Received: by 2002:a17:907:11c3:: with SMTP id va3mr1535798ejb.497.1596153036562; Thu, 30 Jul 2020 16:50:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596153036; cv=none; d=google.com; s=arc-20160816; b=ypzTgI26uwAnrfQBtHWBuc8HI5ezyTBigfW4M3G9r52r1z2sWELbLaQt2QQWHW8eU1 Z2Vyp0xvcu4rGzFIs3wDs8gwHDiXoi/wTiuvrvYhvVDbR3MFFd7EfE6XSNWZ1hVBazao 1tU0WMep/8iJuqUwj2eGZQI8ziIXpciPgchd4o6R4cgfzmVS6r5bT/uGpj+i+cplZeHj vtZFy+RHqR02mQVqtjYCNhnqu0QLjg9JMJKgFcSoc7aKG49syrtJI1JO04pjFvm9LJdm lNYRuaR8f+6yV688fbGMTCU9dvITygR0+EypY6ZhlSj6Rl599Vhc5acA1bPQfx351Fzy zMSw== 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; bh=k1nULJLvEETSFuOSVLK6q8u6dzXbCq0dxNlxYqV9vdQ=; b=fNuSwkORdnxglXeiu1uwSoEgTwP9zeWIlsLqqWLkIam/LR0dALu2b65JZTjC5WCk5M mzABO5Sb3BZ4Tqp58x0QMj2jQYBoHQ4q/rxt3JMH2S9+PmImUQ1clf/1dWnzjFaCWvJz scbgBs8+KJ7xeZbtOv70svOy2HLoU7llqWUuztzQwctkWqiab0M94zl3PY7gXUu53kG3 ML6gld/k/jkYcuO4HvO6MAoZaQ8yOX/7IR0NABWIRSwwQFNfrC0R8omcxK1CcrJYxubH nu9pvpb0tkGYaWqynIzVc6ZY3v3wIlBRU4RvdFjEjDHDbtzSbH3LzcPP6medBKB3nvGi lnjQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ec22si4086011ejb.23.2020.07.30.16.50.10; Thu, 30 Jul 2020 16:50:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730766AbgG3Xt7 (ORCPT + 99 others); Thu, 30 Jul 2020 19:49:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56932 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728047AbgG3Xt7 (ORCPT ); Thu, 30 Jul 2020 19:49:59 -0400 Received: from shards.monkeyblade.net (shards.monkeyblade.net [IPv6:2620:137:e000::1:9]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E158CC061574; Thu, 30 Jul 2020 16:49:58 -0700 (PDT) Received: from localhost (unknown [IPv6:2601:601:9f00:477::3d5]) (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 A1DC5126C06D8; Thu, 30 Jul 2020 16:33:12 -0700 (PDT) Date: Thu, 30 Jul 2020 16:49:57 -0700 (PDT) Message-Id: <20200730.164957.117753738942479389.davem@davemloft.net> To: lkmlabelt@gmail.com Cc: kys@microsoft.com, haiyangz@microsoft.com, sthemmin@microsoft.com, wei.liu@kernel.org, linux-hyperv@vger.kernel.org, linux-kernel@vger.kernel.org, mikelley@microsoft.com, parri.andrea@gmail.com, skarade@microsoft.com, kuba@kernel.org, netdev@vger.kernel.org Subject: Re: [PATCH] hv_netvsc: Add validation for untrusted Hyper-V values From: David Miller In-Reply-To: <20200728225321.26570-1-lkmlabelt@gmail.com> References: <20200728225321.26570-1-lkmlabelt@gmail.com> X-Mailer: Mew version 6.8 on Emacs 26.3 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, 30 Jul 2020 16:33:13 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Andres Beltran Date: Tue, 28 Jul 2020 18:53:21 -0400 > For additional robustness in the face of Hyper-V errors or malicious > behavior, validate all values that originate from packets that Hyper-V > has sent to the guest in the host-to-guest ring buffer. Ensure that > invalid values cannot cause indexing off the end of an array, or > subvert an existing validation via integer overflow. Ensure that > outgoing packets do not have any leftover guest memory that has not > been zeroed out. > > Cc: David S. Miller > Cc: Jakub Kicinski > Cc: netdev@vger.kernel.org > Signed-off-by: Andres Beltran I need hyperv maintainer reviews before I will apply this. Thank you.