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 41929460D6; Tue, 21 Jan 2025 18:10:32 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8F1944064E; Tue, 21 Jan 2025 18:08:52 +0100 (CET) Received: from egress-ip42a.ess.de.barracuda.com (egress-ip42a.ess.de.barracuda.com [18.185.115.201]) by mails.dpdk.org (Postfix) with ESMTP id 4704F4066D for ; Tue, 21 Jan 2025 18:08:39 +0100 (CET) Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05lp2170.outbound.protection.outlook.com [104.47.17.170]) by mx-outbound11-0.eu-central-1a.ess.aws.cudaops.com (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 21 Jan 2025 17:08:38 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=F51Ik2ptk8PYw9+gmRVhlnlRzDbginyEMv+c1IGXV9r6KdYYVp9iw5/e0HclEfIZBK7j/xHqcCKpjSQp2f9TKX4eW59hRhChiMHW4KzJDBzif3Sms1CTUShQ7UtbroXgRtCLNZhcRD2FYe61DqDeiHhqyhWew+65Zao2SJa+FnyaBqZ0Od9RgkqrqKZFVFcATNqxl5+ry3B+WzcioA90ITYYbncO6Ia/HEg+rwzzy0LInUl8CKtHm3zqfRZRthwJaXRIsa/QzFgaK2/2THjAoJyUYGdxRFPNZJaGBtKfIKnS1Tx1oJAC7qZIvz5/UHVJ9wzPPbsL+1M4B6p2bq/KRg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=aQLXzW+Psp1yfldVTzAibZM7D+4rBNuVa7ESFPNIR78=; b=ZEPEdpv9DPIE2GgOv1VyD8V25+yAQM3csEfglQiHI4teduQ3HAJQVF7wZJ1V93baAxxKxyUkYEaoRAyio1FuZXG/ASoFywE/1NNMwousPQ4Yttd3AwHJPUmzho/m3KK7PLPTHVHi5t86iDwRW3a7jio7XzAMgh8dOTR0UumGEFcIzP5YB92VOAvOQA7eAGHGyb06HcmBWCbOvpBbMIaDRZ8gzxQwC8eKsQuRKvTsVr4yzlxWlac1CF2PiRM/VX/cWKqGjcRqamIolPhD/kwOTsE7LRHZ0VrSjKzfhRpupaB0um70oSVWFDdWcJV02i5Kw6rvk9FF9sQDLoKfUNwjjA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=fail (sender ip is 178.72.21.4) smtp.rcpttodomain=dpdk.org smtp.mailfrom=napatech.com; dmarc=fail (p=reject sp=reject pct=100) action=oreject header.from=napatech.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=napatech.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=aQLXzW+Psp1yfldVTzAibZM7D+4rBNuVa7ESFPNIR78=; b=Sq/Fw/qKNQK4ZLz+wtnaalP3Brk/x1h5acjNbtFpKQP0R+Q7LPXFV2ynWOD/Kr2TPPToJLvvQRDSrPegr7kkq4zYo3EOfJDoMjgplyV/Jf9sZfqmy51B0ycl3jbm34+/+VP0S/NLjheSBefPWmVLEyCm+4o890GnXEM5VB+nNOw= Received: from AS4P251CA0030.EURP251.PROD.OUTLOOK.COM (2603:10a6:20b:5d3::18) by DB9P190MB1210.EURP190.PROD.OUTLOOK.COM (2603:10a6:10:22e::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8356.22; Tue, 21 Jan 2025 17:08:36 +0000 Received: from AM2PEPF0001C70A.eurprd05.prod.outlook.com (2603:10a6:20b:5d3:cafe::75) by AS4P251CA0030.outlook.office365.com (2603:10a6:20b:5d3::18) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8356.21 via Frontend Transport; Tue, 21 Jan 2025 17:08:36 +0000 X-MS-Exchange-Authentication-Results: spf=fail (sender IP is 178.72.21.4) smtp.mailfrom=napatech.com; dkim=none (message not signed) header.d=none;dmarc=fail action=oreject header.from=napatech.com; Received-SPF: Fail (protection.outlook.com: domain of napatech.com does not designate 178.72.21.4 as permitted sender) receiver=protection.outlook.com; client-ip=178.72.21.4; helo=localhost.localdomain; Received: from localhost.localdomain (178.72.21.4) by AM2PEPF0001C70A.mail.protection.outlook.com (10.167.16.198) with Microsoft SMTP Server id 15.20.8377.8 via Frontend Transport; Tue, 21 Jan 2025 17:08:36 +0000 From: Serhii Iliushyk To: dev@dpdk.org Cc: mko-plv@napatech.com, sil-plv@napatech.com, ckm@napatech.com, stephen@networkplumber.org, Danylo Vodopianov Subject: [PATCH v1 20/31] net/ntnic: fix array verification Date: Tue, 21 Jan 2025 18:07:58 +0100 Message-ID: <20250121170814.3252171-21-sil-plv@napatech.com> X-Mailer: git-send-email 2.45.0 In-Reply-To: <20250121170814.3252171-1-sil-plv@napatech.com> References: <20250121170814.3252171-1-sil-plv@napatech.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM2PEPF0001C70A:EE_|DB9P190MB1210:EE_ Content-Type: text/plain X-MS-Office365-Filtering-Correlation-Id: 6e71e59c-a246-4adf-d907-08dd3a3e3e80 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|376014|1800799024|36860700013|82310400026; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?3QMcDQzc/glN5jqdPA4ISQp8XB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= =?us-ascii?Q?VEbPb2JHgR8EayqXRljAph6L1Gaqs3YWAuIuiKqhRsMeDLpoOKmG4lkW6+3i?= =?us-ascii?Q?8U9LwK4efa19eF54KObC9R6Kn4b0+Hc1kEZ4fL89e9KCtCFrHMaOej4Cc0xR?= =?us-ascii?Q?0p8lnIFCjBxPtgFcpBj3eAmbfp+QOf5nlXDJ/Dhkw6HNhafJtfla8PL3JtyJ?= =?us-ascii?Q?wIsKw0fQAaUns5GIKrneW+lTTtBa1mxdK3wA1fUrY4rcqvCO3nu+dp1ccGKS?= =?us-ascii?Q?IViG2n91A559yW4JponwGNNCtqToIhiblkzmcEs/dUu/Z5WBpkEfiIe1N20m?= =?us-ascii?Q?u5PG3GmeFPRyXb3BlApntlxdeHfpw1PxU0JLGscdx0mYk5MlvwhLI4e4SH3P?= =?us-ascii?Q?IPLNInKcUvTQZ/PI92V5zgFGFj1IH+rd9vKrWAuXoFsWZaW33UcIAHNcZ30O?= =?us-ascii?Q?l3ea+RfwSQWmTUp1nUyDJtOF4/87ok2dirmXrjUpZByyf10HLCndJUs0rptu?= =?us-ascii?Q?gncV1H1Kreluu6/TU9iyxuiiweOThLwHJg9IlhHeJ2Q4oXaHodBVd7wYFSQM?= =?us-ascii?Q?xFVfskTN0BWq3vJK6PeGL9re5e/EBuwKO2obR65gVa5reBtBR68EZg=3D=3D?= X-Forefront-Antispam-Report: CIP:178.72.21.4; CTRY:DK; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:localhost.localdomain; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230040)(376014)(1800799024)(36860700013)(82310400026); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: 60DXM9jE+Ylz35qwQxGtl4jCQgmctCzKVOEdMvwH+B+G6ps4btVDBc7c+K4cquvq7PEQwl0SNwH9V1Sf8szVvJaO5j/YDem4dmAr+gb2NExHlhZUSzjESQAk94jLb+avDAp2Fh2GT9mj1k64PHoKadnLYXMdWXAsba/a34cYSmbbaDJNdNMV0XNCQXktQcsTOiz2i8LL40Us2Y2aJfxhby1DAvloVY3a/XBhb0i40CmrMqcJzVrF1lKIs4llUmyBsGu2nLd7DSAOigz6q/rfg/k15U42WfG6gDG386NBcr9Ts2badYLGfsJPlcvhi5oIFyBzKKBeBBo7j20ClidoKdDBRUF8TZS2pWavfKxK2vTsjA06gjiCv4pIwlbdi+yBtMVHqy11DNV8VfCK1/0Vu8Q3y6uQgCSER9x+ubhXSBAxiAFlL6E3aO0LFTiO1rodgIygSoK9Xjp/qF42Bz7QtcTmjJejeHF3lT3azJZAL4AT6iXMknSa48TnSXP4LLULM8niK5Qlw1BlOW/1snLJsVz5nOXcRoqEgAKUp8M+nfHzGCx0BxaT68IcJFAp+h1R4JE99I8jgvhpHq8qZdhXUAmjs3jZeO0kguO0vaYkdgrJJhm3G9cLL1swa3z4TAuVm46vxgwDcNSytJnMl3QiQA== X-OriginatorOrg: napatech.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Jan 2025 17:08:36.6243 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 6e71e59c-a246-4adf-d907-08dd3a3e3e80 X-MS-Exchange-CrossTenant-Id: c4540d0b-728a-4233-9da5-9ea30c7ec3ed X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=c4540d0b-728a-4233-9da5-9ea30c7ec3ed; Ip=[178.72.21.4]; Helo=[localhost.localdomain] X-MS-Exchange-CrossTenant-AuthSource: AM2PEPF0001C70A.eurprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9P190MB1210 X-BESS-ID: 1737479318-302816-13349-7978-1 X-BESS-VER: 2019.1_20250117.1903 X-BESS-Apparent-Source-IP: 104.47.17.170 X-BESS-Parts: H4sIAAAAAAACA4uuVkqtKFGyUioBkjpK+cVKVpZmRkBGBlDMPC0t0czI2DjZyC zNzCDN1NgyOTE5LSXJwNI4ydLINE2pNhYAUYx+T0AAAAA= X-BESS-Outbound-Spam-Score: 0.00 X-BESS-Outbound-Spam-Report: Code version 3.2, rules version 3.2.2.261957 [from cloudscan21-179.eu-central-1b.ess.aws.cudaops.com] Rule breakdown below pts rule name description ---- ---------------------- -------------------------------- 0.00 BSF_BESS_OUTBOUND META: BESS Outbound X-BESS-Outbound-Spam-Status: SCORE=0.00 using account:ESS113687 scores of KILL_LEVEL=7.0 tests=BSF_BESS_OUTBOUND X-BESS-BRTS-Status: 1 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org From: Danylo Vodopianov if statement was modify to ensure that word_off doesn't exceed the size of the array Coverity issue: 448958 Fixes: 7fa0bf29e667 ("net/ntnic: add hash module") Signed-off-by: Danylo Vodopianov --- drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_hsh.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_hsh.c b/drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_hsh.c index cc8db2fae5..d19e72e323 100644 --- a/drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_hsh.c +++ b/drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_hsh.c @@ -221,7 +221,7 @@ static int hw_mod_hsh_rcp_mod(struct flow_api_backend_s *be, enum hw_hsh_e field break; case HW_HSH_RCP_WORD_MASK: - if (word_off > HSH_RCP_WORD_MASK_SIZE) { + if (word_off >= HSH_RCP_WORD_MASK_SIZE) { WORD_OFF_TOO_LARGE_LOG; return WORD_OFF_TOO_LARGE; } -- 2.45.0