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 7481A460D6; Tue, 21 Jan 2025 18:09:09 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5E1D54065F; Tue, 21 Jan 2025 18:08:35 +0100 (CET) Received: from egress-ip11b.ess.de.barracuda.com (egress-ip11b.ess.de.barracuda.com [18.185.115.215]) by mails.dpdk.org (Postfix) with ESMTP id C554240609 for ; Tue, 21 Jan 2025 18:08:28 +0100 (CET) Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05lp2106.outbound.protection.outlook.com [104.47.18.106]) by mx-outbound40-251.eu-central-1c.ess.aws.cudaops.com (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 21 Jan 2025 17:08:28 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=e7659ADkeFXrMMKMEn5MzWz6eh+TqFdjVcJMfQqZpO5S+INatSDPK7Do7wedjSmn1VsdfCB8H92QxujR3I+nwyWnoSpzkI1Tz7vyh7CNhuArBND+N61HYX3es/DsUxuEKXCaYWUafAWJnj+4BT6K94IBMg5G2jQ+vrVdf+Lht6wPXQITyuoYzGs+JPJ6Lu+RyI0FkLd60AX7UvxF1SVvYsZXxYULChzG7A7RwqrWdesfo6CTjV0pYUF1Y+Oa2KWf2mlxfzSix5CvupdAOaocYbYkHdLx2gSFsyGkwR/VOuVxif6WmwzpQ7+r1eeBBj93wuSW0stI30KzqlhZYnBjGQ== 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=eHOwN2j0QqqOHW43rmJ5SH1sjM3KFtjLJIZvD2VB2iE=; b=vnWui0MwT9UcwsDZYtyuIVsMvtn/Z6L7b8U6vCseNtBjcHkD0w12G9R1p42Od+1vdK28iEZkMglcY6q+rCtoLBq5bduULGeAZAkMObnyvCz3lZnP6mSZiMet9hwoYkyTXF//JkFqou2iGf9H2kA2mgmteY1ZxpeDfCfgsVDfFFSV5R1RVohxJLWRsbnOC0mCRA25EM5goXA40FEURu+NiEdYNUhdGHXP1IvFDoegeczksmqQYk4UNQw/ek2JFmPIvp1a7QNTM7Zx9rybK3wBnLutcQFv7PsfnFb3xlcmWpvfa8MW21Jf14Dt6Bp4j9VY93Ycf/xQ+w6DeIwsiqhy+g== 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=eHOwN2j0QqqOHW43rmJ5SH1sjM3KFtjLJIZvD2VB2iE=; b=oGANVRcoOXRBPCLqvavH+v/9n46qi6wfRjBzRzftbHw5IayYM81ekcEirv60w6HvEwpB30tbxIElyBnzVGT2mpnfC7acob0dcD+j487UJ8gb1sOxRpclLjptmTP+j4HS7zXw/bbGsAKX9sZru2aw+3f4iTTVrayNvoqdwcK6W2k= Received: from AS4P251CA0018.EURP251.PROD.OUTLOOK.COM (2603:10a6:20b:5d3::10) by AS8P190MB1319.EURP190.PROD.OUTLOOK.COM (2603:10a6:20b:2e7::11) 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:26 +0000 Received: from AM2PEPF0001C70A.eurprd05.prod.outlook.com (2603:10a6:20b:5d3:cafe::e9) by AS4P251CA0018.outlook.office365.com (2603:10a6:20b:5d3::10) 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:26 +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:26 +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 06/31] net/ntnic: fix array index verification Date: Tue, 21 Jan 2025 18:07:44 +0100 Message-ID: <20250121170814.3252171-7-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_|AS8P190MB1319:EE_ Content-Type: text/plain X-MS-Office365-Filtering-Correlation-Id: 4c73be96-8548-4234-93de-08dd3a3e38a7 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|376014|82310400026|1800799024|36860700013; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?mAuvsr3XHi01prmov86CWVvIDB+3jU/ZwNUJN0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Ek82uvreJOWDMH15CPn80N227qOg9V6c7mxiT1BjFMA?= =?us-ascii?Q?yaESpb/hE/W79SkQGwgfsYq3hEeatMgs0qlNDj+23rp0FhUqxd20i4fxnfCD?= =?us-ascii?Q?58cHVTrje0RVJEDqme9PRzKtXdDf3/mK8Pov0TV96rUZJPgTgJvQdKHVnGyY?= =?us-ascii?Q?LOO65Zpo7UBaCmznBSO4yT20GWolyZQ3GBshTDtsFSd+14PlOQUtLzeVsMMM?= =?us-ascii?Q?BkIPnvm1EHlOUYYPwDiQEGWDWd9GzEAfdFeadxjcoj8tWcOHI8Gm/ij+y7Z3?= =?us-ascii?Q?QsR07fyKILbq+cMuNm+TcZ5hfpZvgAOOPRYTFUlf5LYbAvARcXbCwSh/Le4g?= =?us-ascii?Q?nffwDrXNAEhRDmKpbmzt6hkyEcs0qAPjedwPvjdO+8vHxBQbWGbp+S0bZMi3?= =?us-ascii?Q?FJGwjCCxv39V5409nVOoxcbIWy+V4BFINVkMBVkMrWH9px6334I/RqskcK2c?= =?us-ascii?Q?FcZwttCk/WSsa2/dKawZqRroVKFQbpuhfG82hw1MnDMp4bSHZQu7QiCDbUNQ?= =?us-ascii?Q?gYKdeO8jjQwDuwh70HBZTfK9tzESSXDjYFIoLkyCArSyVM3pV4YyYydOg43z?= =?us-ascii?Q?9Fevc5SM2UqSpTM=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)(82310400026)(1800799024)(36860700013); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: rhUYGUVTEQ3bFrt3YQN6GbmED++TfE0yYe4kR8hBMceypBWofLSXjGJl25xPATUIYCbk6j47z7q2b0MpAqzigIEuIlzRymT+HbUIH8ClXpbgqsD9rsqL0AscinINJQz4FEJ0SAlf6ZgV/B5TWEBHfEMvV4u5OQeZOu83piSwTLJUGect8k0F9YOIDUENiGNYqdsorQ4IqttxBB8mU6ot9CRIh0PNCgTXDIWxG4oUZTgqdLjeQE+TIy16Dh0h7HqTqCszCvooysa7febUyuEZGhCEQH5APhEj1xm5Rw6B9RZUV3q0UPueZx485nlXxJtvSLW6JCH2RmngZtQFG26s8XZ7yj9clG4cj9kQ2W8bDQTgcz7byMQuJr2Pk5IpmFBSE41Kg+LHUHPHz6uH2y9MFroKAEh9ZfAAAn+EQLcoLnTGp2xsCgRZ2k+RP7FpKMuB6kXU5cylVENX/ses6J5PqyAxtzYh7qOmUyHB2uHg3JVzb5jmSQlnDj72CnI9Lj35MigaqNOdnER49qUWsIyWtVMLpGMLEY5Gs5noXLqQn+T7vqtz9MauDNtvAhXrLt53iZyWy6Ofs6F+L9QuYcoZ32MhBh7UlTdUfm0Pse0EchIIPE3+yrIOeK4fvlVHS3pSvQFoCNGTSday0+OK0Q7fXw== X-OriginatorOrg: napatech.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Jan 2025 17:08:26.8118 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 4c73be96-8548-4234-93de-08dd3a3e38a7 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: AS8P190MB1319 X-BESS-ID: 1737479308-310491-13355-7724-1 X-BESS-VER: 2019.1_20250117.1903 X-BESS-Apparent-Source-IP: 104.47.18.106 X-BESS-Parts: H4sIAAAAAAACA4uuVkqtKFGyUioBkjpK+cVKVpYGRkBGBlAsySA1zdA4xcwk1d IiJc3UPDU5ydjAItXC2DjV1NLU2EipNhYAaqoIgUAAAAA= X-BESS-Outbound-Spam-Score: 0.00 X-BESS-Outbound-Spam-Report: Code version 3.2, rules version 3.2.2.261957 [from cloudscan10-237.eu-central-1a.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 CI found couple coverity problems which were fixed in this commit. CID: 448983 Out-of-bounds write (OVERRUN). These issues were fixed with updating index verification statement. Coverity issue: 448983 Fixes: 96c8249be53e ("net/ntnic: learn flow queue handling") Signed-off-by: Danylo Vodopianov --- drivers/net/ntnic/ntnic_ethdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ntnic/ntnic_ethdev.c b/drivers/net/ntnic/ntnic_ethdev.c index 620d023a71..28b086c009 100644 --- a/drivers/net/ntnic/ntnic_ethdev.c +++ b/drivers/net/ntnic/ntnic_ethdev.c @@ -140,7 +140,7 @@ store_pdrv(struct drv_s *p_drv) static void clear_pdrv(struct drv_s *p_drv) { - if (p_drv->adapter_no > NUM_ADAPTER_MAX) + if (p_drv->adapter_no >= NUM_ADAPTER_MAX) return; rte_spinlock_lock(&hwlock); -- 2.45.0