From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 5B195A0543 for ; Mon, 6 Jun 2022 18:03:17 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 53FF84161A; Mon, 6 Jun 2022 18:03:17 +0200 (CEST) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by mails.dpdk.org (Postfix) with ESMTP id 2FF384021E; Mon, 6 Jun 2022 18:03:15 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1654531395; x=1686067395; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=qqOuIrdn6hq2J3tQhGEpD851Dog6V6jRVx7ATzzwHlI=; b=HVKqyCwZ+dCLC0rDz7ksjvD9CiPj0A1YHcXqtGNiOHXLq6o43RS1BC71 e8ratxSV1I3kQCX0uEC4w69tTGUfqdlLdoJ2xuqk7IneAXQFio2xeRfLk /a1/woTgJR8ycm2YEb9yzVN87c8VZwPPPLkp4MQ8f4bfAxIeyVRc6bpta kb5MDqdzwFqvvSOPknE4Eg2c0AEYP+KI5OLVbvuYNvnsGylCqMyYaqSad MOmtA7pnj2mKzpv5ri7kME7EDAiNBSF8FcqqadgH5Wg2HyXCqun9stsDA L3/7jK7ebV6ez5OF0oYXINGfQmeYoMpjQl2F8r9DBVLApJ4iEL+9ixPYH g==; X-IronPort-AV: E=McAfee;i="6400,9594,10370"; a="274203440" X-IronPort-AV: E=Sophos;i="5.91,280,1647327600"; d="scan'208";a="274203440" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Jun 2022 09:03:13 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,280,1647327600"; d="scan'208";a="669541792" Received: from txanpdk03.an.intel.com ([10.123.117.78]) by FMSMGA003.fm.intel.com with ESMTP; 06 Jun 2022 09:03:13 -0700 From: Timothy McDaniel To: jerinj@marvell.com Cc: dev@dpdk.org, stable@dpdk.org Subject: [PATCH] event/dlb2: fix QID inflight exploit Date: Mon, 6 Jun 2022 11:03:11 -0500 Message-Id: <20220606160311.1227058-1-timothy.mcdaniel@intel.com> X-Mailer: git-send-email 2.23.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org If QID inflights is set to an invalid value it can cause the PMD to hang. This commit adds checks to make sure that the value is valid before programming the hardware. Fixes: 1857f1922ce2 ("event/dlb2: use new implementation of resource file") Cc: stable@dpdk.org Signed-off-by: Timothy McDaniel --- drivers/event/dlb2/pf/base/dlb2_resource.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/event/dlb2/pf/base/dlb2_resource.c b/drivers/event/dlb2/pf/base/dlb2_resource.c index d4c49c2992..548bebd068 100644 --- a/drivers/event/dlb2/pf/base/dlb2_resource.c +++ b/drivers/event/dlb2/pf/base/dlb2_resource.c @@ -3701,7 +3701,7 @@ dlb2_verify_create_ldb_queue_args(struct dlb2_hw *hw, } } - if (args->num_qid_inflights > 4096) { + if (args->num_qid_inflights < 1 || args->num_qid_inflights > 2048) { resp->status = DLB2_ST_INVALID_QID_INFLIGHT_ALLOCATION; return -EINVAL; } -- 2.25.1