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 B448FA0093; Wed, 9 Mar 2022 15:40:14 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7357A40687; Wed, 9 Mar 2022 15:40:14 +0100 (CET) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by mails.dpdk.org (Postfix) with ESMTP id 1902B40395; Wed, 9 Mar 2022 15:40:12 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1646836813; x=1678372813; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=7DoHJqoH/BTF1vMv3tRa3g7l6ppZm6go+ujQXYE6uak=; b=AZzAoaX3wTsiTxAUzw+7F2L7Vq63xPsJyTH38md4RRlgZ0+/c2RotPRJ GxwDEWlGPi80ngv5XLTiFl7gWY50dVG9yYomlx9K276oAkYlpbiHqH9dG /5zirthQQUwUZCJeutFWkSaP/BejEJJq4ERwr0pEdgxdWxpUK0XnmrfkD 6Sbpc3leyY6H4JsZlDQoqlZ8Tka6lt4wF7nceZtPM0r0rFh9ocDcRnSgq p3a6b9QqVJwA80o80idGgXDiaM2R41Gq3IwioQ5FjqGKSkE56Wk35yM9C XPd52b0y4FczhJE+cdBlDZiH2NoaPmmaG8olBv3AjN9gfbkr4iNf3315w g==; X-IronPort-AV: E=McAfee;i="6200,9189,10280"; a="254928694" X-IronPort-AV: E=Sophos;i="5.90,167,1643702400"; d="scan'208";a="254928694" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Mar 2022 06:40:11 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.90,167,1643702400"; d="scan'208";a="781100918" Received: from orsmsx601.amr.corp.intel.com ([10.22.229.14]) by fmsmga006.fm.intel.com with ESMTP; 09 Mar 2022 06:40:11 -0800 Received: from orsmsx612.amr.corp.intel.com (10.22.229.25) by ORSMSX601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.21; Wed, 9 Mar 2022 06:40:11 -0800 Received: from orsmsx607.amr.corp.intel.com (10.22.229.20) by ORSMSX612.amr.corp.intel.com (10.22.229.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.21; Wed, 9 Mar 2022 06:40:10 -0800 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx607.amr.corp.intel.com (10.22.229.20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.21 via Frontend Transport; Wed, 9 Mar 2022 06:40:10 -0800 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (104.47.55.100) by edgegateway.intel.com (134.134.137.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.21; Wed, 9 Mar 2022 06:40:10 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CzcuTdqeWxKhGzqq4edILu9ZNWqYBWEVGS38FEnJENXUAzeI53o+nG0uS4HNbYEAtcjnXaAiR6Ez7iV/r3d/vqRWnr2DWFr36ckT6CEgqIvRrpPlz6n4EAY1TSahwu3z4iGDnMvy2bFHrbFt8BuN9Z+0ZJZzJQtal2bhhak3ZfK8Ck0sK5blZJE++/UvvxBpnMdV71Ai4GRNv+qkntrOCDps78iDOCSUjvS+L8TdOhBucz+VdWr9O2IG9MX0BPl6PPfymG7KqJbMSZiH8ddwk0aYq6wxrwyht0G2kElSQWwVcULLYHD/CTv/h/JRoPG2NfzzG4fmutXgw0sNOupitw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=7DoHJqoH/BTF1vMv3tRa3g7l6ppZm6go+ujQXYE6uak=; b=f+9OAQ2dKNhLhHEEmbvLYgml3T5NCoqWUJ5E4FyLXNOzP4Oxxb4zL+c15AICznCxAVwNlp7QyX5uVT1BtpclmUT+stPpbkFE9lsk/7lqwJT0bnQ32HlWUdW3RqBqe2+LNP1iZJTizpdLnqHDTjd8UH4GTm6BHiAZ588XceK9QGXg3pe3BBAapcxUhrzkLkjkYIZzhKgPhBewwPA3S3srE9RVIdZLBe5sWWfkCu/wiwluBuu/fzatm2/KxR9ZWNuXlCwP/IulsajwHFE94xK38SoZSzzF6TOl/Ok6pEUW1rHpk+C23HE9Hb2Y51UyAiLqHNt4au5TbDXiYWj6X6yGtQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Received: from MN2PR11MB3821.namprd11.prod.outlook.com (2603:10b6:208:f7::24) by MN2PR11MB4509.namprd11.prod.outlook.com (2603:10b6:208:192::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5038.14; Wed, 9 Mar 2022 14:40:07 +0000 Received: from MN2PR11MB3821.namprd11.prod.outlook.com ([fe80::8d3a:d8fd:ea31:da29]) by MN2PR11MB3821.namprd11.prod.outlook.com ([fe80::8d3a:d8fd:ea31:da29%6]) with mapi id 15.20.5038.027; Wed, 9 Mar 2022 14:40:07 +0000 From: "Power, Ciara" To: "Zhang, Roy Fan" , "Bronowski, PiotrX" , "dev@dpdk.org" CC: "thomas@monjalon.net" , "gakhil@marvell.com" , "Yigit, Ferruh" , "Doherty, Declan" , "stable@dpdk.org" Subject: RE: [PATCH v2] crypto/ipsec_mb: fix usage of untrusted value Thread-Topic: [PATCH v2] crypto/ipsec_mb: fix usage of untrusted value Thread-Index: AQHYMjjG0Y01I2v44kazKEJ1hPXw8qy0G+MAgAMFTgCAAACwMA== Date: Wed, 9 Mar 2022 14:40:07 +0000 Message-ID: References: <20220307124802.1371808-1-piotrx.bronowski@intel.com> <20220307153233.1407564-1-piotrx.bronowski@intel.com> In-Reply-To: Accept-Language: en-IE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-version: 11.6.401.20 dlp-product: dlpe-windows dlp-reaction: no-action authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 2f0fad4e-71a7-4409-1a8f-08da01dab51a x-ms-traffictypediagnostic: MN2PR11MB4509:EE_ x-microsoft-antispam-prvs: x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: mLR+AQ6TgmEJcGfiQt855UXHczqj4JhtwxGBYcrsod4ueCiyjRB8mu9K9Tf7gWemshKnUtqpBy19e5R9HL7njYOC0wxcwd3RGOxHPZivJLexbOgUi0AlbQGqSDFY9Ilaq6Qs9ewJGqi4OqTy6X4cLDva4B1mYDwKN9srk2eXYHEdiJZ6q3TUQmF+BbxXbT5yIXFYsadnkzPKmrDer4a6WL4Xc3tqbfv4PXupb3liN0n+F1AF+LeUUbV88szHCcfBOMZUY3qFqHoCL+lnZu2bpvywX0kpRs2P/BQkRPjfGEGMh4xzgtzL7IOq0eVFIXCtlGqu7s2idoOxCDvXBE/LMTyyuB9NYwEHs+r4fvrZrPubbn6YPADUv6EYMBDrZOcDIKCZqOub/SKwAz3FxZk4q1KHg4oNyLeBgxLho4LQ2B4hN+gSLpTz7c+zQf+QvnTcp0MUGPCTfPwq0p6omMO4EMDPzv4rmsCuq4AfcYbqqVB/1RuGy1wYABOIXm8lobHYKRQS06IGganhf2p6iK/wrsbOK6fiIx27w6HkSwmSdbdWsiW7dlS2cweamyWBn3e5YpRjo7K0UYFlgnZw0AtDKC0wkkdwSQk8+DXacIvG3NcXTJvsgMAaXKQkSRnJ4TlOjCuAxG5DS+mN4FfsBQADgbGxocY8kb1Sk8VUyAlQ9bg4d687vHfwJ5UWSfbSjkkfz9oIyCbLCGc+j91BkY7y9A== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MN2PR11MB3821.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(366004)(508600001)(66446008)(53546011)(6506007)(7696005)(33656002)(86362001)(52536014)(8936002)(83380400001)(5660300002)(9686003)(76116006)(2906002)(186003)(4326008)(66476007)(64756008)(8676002)(66556008)(38070700005)(38100700002)(110136005)(55016003)(122000001)(82960400001)(316002)(71200400001)(54906003)(66946007); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?3AgQawTygEe3V3GqdMhau2FUl+W+4434IsNotfDFf0MAwH02Knqh1DHlY5d9?= =?us-ascii?Q?nFVz6zLJTYM0m/2y9qr0wXMrAkF7oPn7Vj1Uk8p25g1gAlJoCsxp7tKx1eik?= =?us-ascii?Q?39K9O+diobstE9o7/4YvSv/6/mwHE+Bfg2pNh1ZsWmU9ymvVs8dSwUvwYU6q?= =?us-ascii?Q?P/l4P1Zkitt+zouYDWk8q6BwoFbQxfFNg3vW+xnvrXP3wZhYI8UF9zNbO3zm?= =?us-ascii?Q?SzTa2oZNCGAbgcQzCEPF1//qJ36Af0vCvjQJkCfFC8mA6i/lhoviCGt49xQR?= =?us-ascii?Q?nSKP9DKt7XbZrJkcxRLDx+KP+FarNvD2juW2Z5bZbjQx6h3sp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u+SzjjK6HxMhDUfwQdUpBpQIJ?= =?us-ascii?Q?9cJlC6gyZg1aePsH2PJzzsTCmSnfB9UQ9g+s5bWV6Eq17/xEoR+tiKliwqJ/?= =?us-ascii?Q?GWMPWzUQTy8QbO9bXFG+tmr9qmo6Y25z7cqWX/sGfR+/OtPXePkl77/VxB+n?= =?us-ascii?Q?hunwFJu1ktbVEgFoX5FQ8ZibyDDfbkvXAE9a2UlCr1UTKjGhONyFOeXBqfMt?= =?us-ascii?Q?FQWzRvJ1BQzQHHpLAOBmynJqo2BcSTALf2Y0dmn5roOsx+4RNvHS5+988W8b?= =?us-ascii?Q?D6NlH8EIPZy541kRzlLxD+uPFXToZUf/ACh5/wqrtXjse5fAqgnkssHpP1Hp?= =?us-ascii?Q?U2ZvguZwL3KpewFXurfQgjsLNJcbJpybIT0eng4X0AwB51OqGb/02iJRvWH6?= =?us-ascii?Q?T5KKHMBSMeix29KdDRuuXDr6vxHIvXh9zTvoDPIr+azJl6XZRN3u7ZLFvecU?= =?us-ascii?Q?lksHJyw/GwYhHhgTR22rXfXmmEQ=3D?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MN2PR11MB3821.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2f0fad4e-71a7-4409-1a8f-08da01dab51a X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Mar 2022 14:40:07.8762 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: /aVj1c/T9EesCF56SYSmjOW0xTJyymSLbC3FoKRi7esG4iaJ6QZupIiUCWjlyZBJwhSUXTbGoR9zIgJWOnuyqQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR11MB4509 X-OriginatorOrg: intel.com 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 Hi Piotr, >-----Original Message----- >From: Zhang, Roy Fan >Sent: Wednesday 9 March 2022 14:35 >To: Zhang, Roy Fan ; Bronowski, PiotrX >; dev@dpdk.org >Cc: thomas@monjalon.net; gakhil@marvell.com; Yigit, Ferruh >; Doherty, Declan ; >stable@dpdk.org; Power, Ciara >Subject: RE: [PATCH v2] crypto/ipsec_mb: fix usage of untrusted value > >Hi Piotr, > >> -----Original Message----- >> From: Zhang, Roy Fan >> Sent: Monday, March 7, 2022 4:27 PM >> To: Bronowski, PiotrX ; dev@dpdk.org >> Cc: thomas@monjalon.net; gakhil@marvell.com; Yigit, Ferruh >> ; Doherty, Declan ; >> stable@dpdk.org >> Subject: RE: [PATCH v2] crypto/ipsec_mb: fix usage of untrusted value >> >> > -----Original Message----- >> > From: Bronowski, PiotrX >> > Sent: Monday, March 7, 2022 3:33 PM >> > To: dev@dpdk.org >> > Cc: Zhang, Roy Fan ; thomas@monjalon.net; >> > gakhil@marvell.com; Yigit, Ferruh ; Doherty, >> Declan >> > ; Bronowski, PiotrX >> > ; stable@dpdk.org >> > Subject: [PATCH v2] crypto/ipsec_mb: fix usage of untrusted value >> > >> > This patch removes coverity defect CID 375828: >> > Untrusted value as argument (TAINTED_SCALAR) >> > >> > Coverity issue: CID 375828 >> > Fixes: 918fd2f1466b ("crypto/ipsec_mb: move aesni_mb PMD") >> > >> > Signed-off-by: Piotr Bronowski >> > >> > Cc: stable@dpdk.org >> > >> > --- >> > v2: use a different logic to check digest length >> > --- >> Acked-by: Fan Zhang > >Sorry I missed a point in your change and thanks for Ciara pointing this o= ut. >You are changing the gen_digest_size to 64 which is wrong. >Please send v3. >Also instead of ack - Nack this patch. [CP] In the v3 I think Fixes line should also be updated to either: Fixes: 746825e5c0ea ("crypto/ipsec_mb: move aesni_gcm PMD") Or Fixes: ceb863938708 ("crypto/aesni_gcm: support all truncated digest sizes"= ) Cc: pablo.de.lara.guarch@intel.com (The second one seems to be where the code was introduced before being move= d into the consolidated ipsec_mb PMD in 21.11) Thanks, Ciara