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 C158D45B7C for ; Mon, 18 Nov 2024 11:01:35 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B57484066F; Mon, 18 Nov 2024 11:01:35 +0100 (CET) Received: from mx0a-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id D823C40150; Mon, 18 Nov 2024 11:01:32 +0100 (CET) Received: from pps.filterd (m0431384.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 4AI80gMb024483; Mon, 18 Nov 2024 02:01:32 -0800 Received: from nam10-bn7-obe.outbound.protection.outlook.com (mail-bn7nam10lp2046.outbound.protection.outlook.com [104.47.70.46]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 4301ps86j2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 18 Nov 2024 02:01:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=JXTchL1hmrAiQ1AabzlYX/xmoVzIsnhzT4tPh898ihAwsPI5PT5CqIZIJOMFNyuSYZlCfGY275kv68+iLZQz5Is/qd/tE8z5DFNw4zt5Lwd0hm/8W9NrfN5ExxpqJgbg9DuuBRgzVteCpbwl6X7URTFdU1TRpwis01qm7780J5YwRpasMul4w1m3upQLOjJyUsHO9b6CookLACjMCnQ8FQN/1l3JQzy2E4AlTOIvdi6CTTsVSWciL0rqStXeCl7bpAvQHq+5CI07jO3ZJnatBKa9frUGhrE2s7xVa30wYpYtnSB6P5nv/OcTUqGySSDJQsiSL/GuQt3mteQK9+0sWQ== 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=8/VbyE0nyD8hm3Jjw4crCQ6IgjRnvR1YAyIn7LLQJwg=; b=S991PyubKC8eztyMEVbTuNwwD7YRJiHs7giX3xxNkLDULJN6ul3rCttdWd96nDbzr13fpan5jHneJQxrS26aIBf5Z9JADR12GtYcFldjdEGKqmyE0mVLfb+UPkrd9fYe+B9fbHc6lk52Dvga1xTNkw0nfzIhSQuhuoPQDF/iFsc5nAKbn5y3hVhHTaXXh/RSptXvDF9BqnMKYMgOZTkNRDk88YWIfZQ3KEYewVQFvW+Q4smRRhV4U1RMpCQiPgG6ohsRYeM4vh2lTvtW1YHw/hCnOeNxpT0oJyIKNBTZfr//D6LkL0BykD/tpm6DnRu6N3+ivtV5lu/hGsWDxA9mrg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=marvell.com; dmarc=pass action=none header.from=marvell.com; dkim=pass header.d=marvell.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=8/VbyE0nyD8hm3Jjw4crCQ6IgjRnvR1YAyIn7LLQJwg=; b=Y+iEOs0+WYwT3Bm7XkSn3ZEjmjErn2R+5AKv21OCYy0pOU04/7lyYhvsKDs5ND/ofjf+s6pxXmAEwbgbgHTuANyxLSUBy3ZNoeweB3K1d2jwYHl6VukCpKZfscaNGWIekYFw9Br2xyT8mwqMmQiWTukOK3VJgyEsvIzrg5npHMs= Received: from BY3PR18MB4785.namprd18.prod.outlook.com (2603:10b6:a03:3cc::18) by CO6PR18MB3796.namprd18.prod.outlook.com (2603:10b6:5:34d::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8158.24; Mon, 18 Nov 2024 10:01:27 +0000 Received: from BY3PR18MB4785.namprd18.prod.outlook.com ([fe80::4f9f:e101:dad7:c576]) by BY3PR18MB4785.namprd18.prod.outlook.com ([fe80::4f9f:e101:dad7:c576%4]) with mapi id 15.20.8158.023; Mon, 18 Nov 2024 10:01:27 +0000 From: Jerin Jacob To: Bruce Richardson , "dev@dpdk.org" CC: "stable@dpdk.org" , Naga Harish K S V , Nikhil Rao Subject: RE: [EXTERNAL] [PATCH] eventdev: fix possible array underflow/overflow Thread-Topic: [EXTERNAL] [PATCH] eventdev: fix possible array underflow/overflow Thread-Index: AQHbNowtKG3gzQGuU0q7psgTKwFyd7K81Hiw Date: Mon, 18 Nov 2024 10:01:27 +0000 Message-ID: References: <20241114115538.3736059-1-bruce.richardson@intel.com> In-Reply-To: <20241114115538.3736059-1-bruce.richardson@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: BY3PR18MB4785:EE_|CO6PR18MB3796:EE_ x-ms-office365-filtering-correlation-id: ef5b0705-4c9f-4341-ec06-08dd07b7f7a7 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; ARA:13230040|376014|1800799024|366016|38070700018; x-microsoft-antispam-message-info: =?us-ascii?Q?9IOz8J20T696uOtV1o21EHDy0LtBIUNUC6hCWFT5/yUvyxspBsKIXWKekhGV?= =?us-ascii?Q?y9urFBPLGAjjVVbMr8V+3tgyf9SQeOQMgSBsiqzoJOOzdVUoKRT/3OycxkDV?= =?us-ascii?Q?y5w1XVeK1ET5Ghc3mkbgai2kUlMYsprty7RFSfDERyv4cANbJ9vaUWgHgKbu?= =?us-ascii?Q?2Pyoah9vC7RS1sVtp2cwxGvBl7a8oX/GtvSNYekvOrfNMBYO3eqtDEEiDBpT?= =?us-ascii?Q?HhA0T5LM6GHuhrQSr1/mpbnMt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/7?= =?us-ascii?Q?fqx+Mrf1DfW+LwonQSrJ7SGp3/4FsRihKubGjJ2WJiHdCDyPlu5338D3WD+Q?= =?us-ascii?Q?sAHIZsRd+/JXPOyTYOrEXjV3HnaEt4eWgeAAUJx4yij5EpRiZ+eUVxr8U81C?= =?us-ascii?Q?7i1BqvVomdilX4XFsqrVboFO1ZAkWdUpWFi2FPgDIghKX5qYHtpK2Qg1gSmk?= =?us-ascii?Q?BJcQgIkR4bmy3RWMzI2Hugd9?= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BY3PR18MB4785.namprd18.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(376014)(1800799024)(366016)(38070700018); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?weWLS7/KgBOri5wXaQYs4k3scM0Hkyk7jnjmj24zV6pZvBF44MvmwPBsL6Aq?= =?us-ascii?Q?zjWEuJoV9QblltO6d57vu7Y3Z3uW8cBO1s6T3djEfKDoht+M+mQcl3JnUQLl?= =?us-ascii?Q?LOnQtXlnq+JaJREFc7B8Ifiexnbb+VpUu1z8twITNZcljxaiFpnXxbEZUMU/?= =?us-ascii?Q?7WEX2+Y2nMzgGze+2918k/xcUGQUrZHbhFvjrN4avLFn3MuUZOwJ+vViki+d?= =?us-ascii?Q?+reNmehc5vjrIHHgm41ZTFek6ATiAOnXsomidpfhESrjti+cOxA+VmYsqVHF?= =?us-ascii?Q?CV+QCgMwsaolxu84aTeW4uC15agpPtqHWhmsEnGtjmqiIiG4HM5tQysA7PuY?= =?us-ascii?Q?aLX1s4GWoog+JjYBs3aKMGdCxutVYcTsx0Bm6k9+fMWve9kNR8RCaYjQRg9L?= =?us-ascii?Q?t3KgwAlbu+DGlhnY7Zm3YFGic0BQxJb+Wek9uRtm3Go2vmjtc+67vZLJD8BZ?= =?us-ascii?Q?L8U7Rg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+8T5uXwctH1voGHsLk1?= =?us-ascii?Q?aIEhq78kuXcDNV6q3KSLncV0GGYKUrpnsOgy3f/2yrbvflk2G9yIiAB29cca?= =?us-ascii?Q?jiwC4ngspSgPiPqZj8M3xvgsy0GlzYfIHF6ocPqOO2phoUBibwfxZ5LvcLpi?= =?us-ascii?Q?WW62eoCgDG9NQYjCSe5P0UHa03s+Eb65HLxPla8TGG0EQlmxgvIk2/WUhgNi?= =?us-ascii?Q?4pHcIifZm+mmuWjonnU=3D?= MIME-Version: 1.0 X-OriginatorOrg: marvell.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BY3PR18MB4785.namprd18.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: ef5b0705-4c9f-4341-ec06-08dd07b7f7a7 X-MS-Exchange-CrossTenant-originalarrivaltime: 18 Nov 2024 10:01:27.1628 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 70e1fb47-1155-421d-87fc-2e58f638b6e0 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: lWLoJIsN96UjyBYwPVGtcUS57f0FgszXjkVVqvfYHi8encRbYqLdFmdNVaBjaOPzPFCdQKmc8qmihdTtRLepyA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO6PR18MB3796 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Proofpoint-ORIG-GUID: ZiC6vExCGfjwUyMlpPG0Okqg6R20Z2pb X-Proofpoint-GUID: ZiC6vExCGfjwUyMlpPG0Okqg6R20Z2pb X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.687,Hydra:6.0.235,FMLib:17.0.607.475 definitions=2020-10-13_15,2020-10-13_02,2020-04-07_01 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 > -----Original Message----- > From: Bruce Richardson > Sent: Thursday, November 14, 2024 5:26 PM > To: dev@dpdk.org > Cc: Bruce Richardson ; stable@dpdk.org; Naga > Harish K S V ; Jerin Jacob ; > Nikhil Rao > Subject: [EXTERNAL] [PATCH] eventdev: fix possible array underflow/overfl= ow >=20 > If the number of interrupts is zero, then indexing an array by "nb_rx_int= r - 1" > will cause an out-of-bounds write Fix this by putting in a check that nb_= rx_intr > > 0 before doing the array write. Coverity issue: 448870 Fixes: 3810ae435783 >=20 > If the number of interrupts is zero, then indexing an array by "nb_rx_int= r - 1" > will cause an out-of-bounds write Fix this by putting in a check that nb= _rx_intr > > 0 before doing the array write. >=20 > Coverity issue: 448870 > Fixes: 3810ae435783 ("eventdev: add interrupt driven queues to Rx adapter= ") > Cc: stable@dpdk.org >=20 > Signed-off-by: Bruce Richardson Acked-by: Jerin Jacob Applied to dpdk-next-eventdev/for-main. Thanks > --- > lib/eventdev/rte_event_eth_rx_adapter.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > diff --git a/lib/eventdev/rte_event_eth_rx_adapter.c > b/lib/eventdev/rte_event_eth_rx_adapter.c > index 3ee20d95f3..39674c4604 100644 > --- a/lib/eventdev/rte_event_eth_rx_adapter.c > +++ b/lib/eventdev/rte_event_eth_rx_adapter.c > @@ -2299,7 +2299,7 @@ rxa_sw_add(struct event_eth_rx_adapter > *rx_adapter, uint16_t eth_dev_id, > for (i =3D 0; i < dev_info->dev->data->nb_rx_queues; i++) > dev_info->intr_queue[i] =3D i; > } else { > - if (!rxa_intr_queue(dev_info, rx_queue_id)) > + if (!rxa_intr_queue(dev_info, rx_queue_id) && > nb_rx_intr > 0) > dev_info->intr_queue[nb_rx_intr - 1] =3D > rx_queue_id; > } > -- > 2.43.0