Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp97851pxb; Wed, 18 Nov 2020 17:40:12 -0800 (PST) X-Google-Smtp-Source: ABdhPJzCrt1UaYeztQgm5mVXjwahn5P6t8xI/EhIlLIDwtnKsqS5OJWyYH2Cu3ro+xOoSqH8Dd7m X-Received: by 2002:a17:906:9391:: with SMTP id l17mr4185415ejx.22.1605750012471; Wed, 18 Nov 2020 17:40:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605750012; cv=none; d=google.com; s=arc-20160816; b=Idns/kZsgwAa8hnWOntbBTaEyIIugBqpusMx22CD5Ab3vPuFMvFUdvtkmEdQ1tUS0Q KFWvshfW0M7B5/M2EGA1vo7h16/2rj4PbKs9Y+I/QemF+wI2S/ihN3FfadKyXaMDxVuN mIE4eC6EAw0N+XeaE/V2Bw/2rOGlj0dbUcnPT4ISeaSmvf51mbCWwuE7OV/+zOs+ru0U dP2QZhPshuWTw4XXOO63Hd05bH9VeovsHGIJ1sG5n10Q6qRAfk14kPpIMqYBczStypSE tim5nvbsWP1c811/Gb77pRdYmebxnNs7y0uz1n3NHSLyQ8FOJWpIN13frdj++CS8G/0n 0rww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=y6PilhZL1pi3UEob3Xpcg7mteSElGJd5gg9gNPGOaW4=; b=dA6wsXFm1B5gWOexuFOEoIZvnryn/an0pBMu9KFud+IzI6zZYNqSmzKIcXulFihURr Aa9CUuC4/mNVwuVKVaXRLxKCAP3Er2ab7xoL853/Uvof55nzdpLfh+MLzXbVitoHj5D7 Jg0I9q08GYohIf9DgtDzgS2uOZdGAOZzHq3C4BdqUEvoCNgOhHNwOk7v6SqX3bQ0kWHy CGVxwv5sLcfXDTXtxURLGKqoLZAS785jAHK1QZfPbTPgI1J4+f+mY3WPx1si5UFqLaU+ nR4/lXbyLvfg8iR3xHZixH1Po8IZbk3ZuJhoZUah5qUR+yXDSVWpC9GOpPb8eG4f7IIL C1HQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=NRgV84XA; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c6si16171266ejr.584.2020.11.18.17.39.50; Wed, 18 Nov 2020 17:40:12 -0800 (PST) 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; dkim=pass header.i=@kernel.org header.s=default header.b=NRgV84XA; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727316AbgKSBhS (ORCPT + 99 others); Wed, 18 Nov 2020 20:37:18 -0500 Received: from mail.kernel.org ([198.145.29.99]:49954 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727251AbgKSBhR (ORCPT ); Wed, 18 Nov 2020 20:37:17 -0500 Received: from kicinski-fedora-PC1C0HJN.hsd1.ca.comcast.net (unknown [163.114.132.5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 42353246BC; Thu, 19 Nov 2020 01:37:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1605749837; bh=hy/0Wyoy2DVKfSDqiEuD9aHC7csSc49sOnRumWXkj3g=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=NRgV84XANhupC2+3ALv+5ELR1hKQDiXKlA9IlYNm/3Z0sxm2SvMhFtVztJnyl5eWa LDICNxKHYlJqf6KmgPL2h6k19ydVKbWxCa7gNbNnOKNJ+ZXXsZwM0rUAVjU4Fl7QYF Ry+f+Yyu4p5pxZoN9kRtaijDqnvktZf4NnpMFl1E= Date: Wed, 18 Nov 2020 17:37:15 -0800 From: Jakub Kicinski To: "Andrea Parri (Microsoft)" Cc: linux-kernel@vger.kernel.org, "K . Y . Srinivasan" , Haiyang Zhang , Stephen Hemminger , Wei Liu , linux-hyperv@vger.kernel.org, Michael Kelley , Juan Vazquez , Saruhan Karademir , "David S. Miller" , netdev@vger.kernel.org Subject: Re: [PATCH] hv_netvsc: Validate number of allocated sub-channels Message-ID: <20201118173715.60b5a8f2@kicinski-fedora-PC1C0HJN.hsd1.ca.comcast.net> In-Reply-To: <20201118153310.112404-1-parri.andrea@gmail.com> References: <20201118153310.112404-1-parri.andrea@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 18 Nov 2020 16:33:10 +0100 Andrea Parri (Microsoft) wrote: > Lack of validation could lead to out-of-bound reads and information > leaks (cf. usage of nvdev->chan_table[]). Check that the number of > allocated sub-channels fits into the expected range. > > Suggested-by: Saruhan Karademir > Signed-off-by: Andrea Parri (Microsoft) > Cc: "David S. Miller" > Cc: Jakub Kicinski > Cc: netdev@vger.kernel.org Acked-by: Jakub Kicinski