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 901CFA0C4D; Tue, 24 Aug 2021 11:53:24 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1693C40687; Tue, 24 Aug 2021 11:53:24 +0200 (CEST) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by mails.dpdk.org (Postfix) with ESMTP id 2A3A84014E; Tue, 24 Aug 2021 11:53:21 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10085"; a="215434283" X-IronPort-AV: E=Sophos;i="5.84,346,1620716400"; d="scan'208";a="215434283" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Aug 2021 02:53:21 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.84,346,1620716400"; d="scan'208";a="515353876" Received: from fmsmsx605.amr.corp.intel.com ([10.18.126.85]) by fmsmga004.fm.intel.com with ESMTP; 24 Aug 2021 02:53:21 -0700 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx605.amr.corp.intel.com (10.18.126.85) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.4; Tue, 24 Aug 2021 02:53:20 -0700 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx610.amr.corp.intel.com (10.18.126.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.10 via Frontend Transport; Tue, 24 Aug 2021 02:53:20 -0700 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (104.47.59.168) by edgegateway.intel.com (192.55.55.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2242.10; Tue, 24 Aug 2021 02:53:20 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=M1Y6r7Neb35EIU/4t4Pq2+LnQPMsYGcP43SDXX2IsgSKAj25QuMSoZ6ORZfUSiM3gzYVq4nAAlJ9JuDkQkbByprEPdbqM+yjb0kk26BskxQ3hQa5kUu9H58/wO9BnOE2r+8pH2tiyU7EPnFngCVMqlvBSNxr+hRReN+sShioD9rhRhJgCVCXPjYKU7cB/TSxREluBTJmNhFL5fKtBAFQiob9FLsJOJdWhsgJ1tfET0OUdzEcz31csI1tALniG5PXHT7Hzf+2Oy0J7Ri/taT3GTfz1UjDRofpeL0CgsFR05KVnxACQs/+e9s/GPUautwtMXL6CjiVlo/wsKU9YN/7Ig== 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-SenderADCheck; bh=xWupK77SRvlm+HWZVnW96TtvdJUwHlWVmAI1M6MbXD8=; b=SEElwfXHC/g0SBYYAbIFRE8To01sur7N55QKTOyXnRiRQ0ptYh81oypiTGT3BEDYN15L1DbBpOrTHaC7dYawzz3qdjDBdxqdaTiBZvBc1xAEPT+XdWxg7liYSTuS01PlzdVi+GbUvWcQjkJxyRuBBuYfvzBk7MVDVSS77sQAR7rvY1SSsdRQd/Jwgyeh9+TYoJffwloyuYv2bfrJnsqsNH1RmXLHjZyBw5jeJQJ1IWLA0xtINL50rQZeeASM67A59zR/x8Ckd19E1VZkSrNVO+fZQ8i3b0W96FP9ROnFfTqQtZVD1cfhKUP7pXJur2qK86a+0ibH0Q/NFrUi/l9hWQ== 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=xWupK77SRvlm+HWZVnW96TtvdJUwHlWVmAI1M6MbXD8=; b=ayVWDmIRK+CB93AwRckXFcxUIKnkPX7q5w74PR/cSC72I7Fufw1heg+CJKXSzzXC3MVm3bHtvGmXw1wyW5n/YXotCW00gSg1QNvRnfP3IWBQ1iWV++uYHHi2THqzXJAVLMoHHjH4GaRTLSUShnqCAuYQPV16nMlJNw35W6/pVes= Received: from BL0PR11MB3043.namprd11.prod.outlook.com (2603:10b6:208:33::19) by BL0PR11MB3442.namprd11.prod.outlook.com (2603:10b6:208:68::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4436.19; Tue, 24 Aug 2021 09:53:19 +0000 Received: from BL0PR11MB3043.namprd11.prod.outlook.com ([fe80::d5b7:cd1b:f2d0:67c9]) by BL0PR11MB3043.namprd11.prod.outlook.com ([fe80::d5b7:cd1b:f2d0:67c9%7]) with mapi id 15.20.4436.024; Tue, 24 Aug 2021 09:53:19 +0000 From: "Zhang, Roy Fan" To: "Power, Ciara" , "dev@dpdk.org" CC: "stable@dpdk.org" , "De Lara Guarch, Pablo" , "Doherty, Declan" Thread-Topic: [PATCH] crypto/openssl: fix CCM processing 0 length source Thread-Index: AQHXmB0EjhhOGzA3X0+WUqMQwzDzdquCa1gQ Date: Tue, 24 Aug 2021 09:53:19 +0000 Message-ID: References: <20210823124714.255341-1-ciara.power@intel.com> In-Reply-To: <20210823124714.255341-1-ciara.power@intel.com> Accept-Language: zh-Hans-HK, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-version: 11.6.0.76 dlp-reaction: no-action dlp-product: dlpe-windows authentication-results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: c463aaa1-3fba-4c4d-5131-08d966e500b0 x-ms-traffictypediagnostic: BL0PR11MB3442: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:2887; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: wWKf+VGcscl+8hPLCwkksxtEwkC8Dmpk7F/lgqOCj8q1FUrAZp9VlB+rn4+jYVQAd8rY6j3Skk/+66tm/XDxsSMgzDFN12+rStdgukXhUFFE7eWY2C8G4HFz78H3gJSHayVtF5e5OGdfgqeaTjCNKNSe6cAklpUAf2cVggvHPGFh3aGKiZj2Wk8RkXQ/P0GaOomc8aOeLuH617PqH32iA4s6hzj+tc4p0Urp0YGXTvWdHkqo0CGdQSgYba/O3gW+h3WgFe1SLvVegj2qtUCYkYeyYTaRs80PYTx0A3ijcaUfodmfbVqqdCUB/UsQUpKBwnZgGAyOFpIeuy0gc/dEAlW9z1hT/tE2KYskLXOsOxgKgFapQoEV4GB7sKWPYW2ORD2OsxkgLpvo7UNp5tcYTGAFfSLtHXk1NERWNNTt65/UdcaEECfCFnlq63mlhQ/JEZt5K9kpKJ1JWB0bw++mJJsYDn4AIXfFAM5diASs+IDzA3QM7Z9AGTwcPd+0ce6Ef0LETq91m7akuXWT3WttYaSwGtQSrQBjLi3ORsUlrpmiPJ9VGq43tC+FPPAmP2QvzNs+HAJObqEM4VyFBJXXClqTHPCc2SsiEsr+oDdG1vvs1ICrtcHIaPDF4iJiTJrsSq7xOwMxJ06pNsQFtmNfEd7EDqVocBFxVnMQgVgkWDBGBnGR6zXZAuxHBFLAh/4YOmeO1FEblXdFpTMgfmNYQA== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BL0PR11MB3043.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(396003)(39860400002)(136003)(376002)(346002)(53546011)(122000001)(83380400001)(8936002)(38100700002)(107886003)(478600001)(52536014)(7696005)(6506007)(33656002)(2906002)(316002)(66556008)(64756008)(66446008)(38070700005)(76116006)(71200400001)(450100002)(55016002)(5660300002)(186003)(110136005)(9686003)(54906003)(66946007)(8676002)(86362001)(66476007)(4326008); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?Windows-1252?Q?uSOzvJdNGelo4RrV+fvntCwZ7kOCQY/3v3b0Nk8ngDlgnxt1N/UyUVpK?= =?Windows-1252?Q?/lBUPhPzWr7QAdHyPLVMl1mjoDR5CmSkuhyyjRUgOUxp5xgwrICcQeer?= =?Windows-1252?Q?i6mpAl0yZB7qFmC+0U8e0RuUcsJPG2CeQjZ/60fBy/Az6Iq52rNB1iLD?= =?Windows-1252?Q?2+zDEuup+iKNq5WbjpG5nSyQVmsLxsk2RJdfBkbC4Yd5oh9jNh3bzOpd?= =?Windows-1252?Q?M4vt0SyVHsv/Myxm6ZAieCyBGIqE9jBRIrsuF0URPvs1AkS6rmECNXPg?= =?Windows-1252?Q?LGbsZJo/MsYj0dy7T5k6MK8HTlOIjJ0Ee988bgTkh8ukWV1O5IJLlpoX?= =?Windows-1252?Q?cEz6O3bNwUYaq7PzgNUk3l2Yks5NFG1DfQlN5Dr/0YexY5jjUCcShUzH?= =?Windows-1252?Q?0qJLH6/m+RfE5nYXkITPc4MUY646bN5HP+4l8hbjkRL8uouUw71ZMFBE?= =?Windows-1252?Q?aePzFvNruGg7O6ORHmhsmo8mU7v1OscYl+aNgzZo/RyN5iP9VgGqj8Lp?= =?Windows-1252?Q?4I2ngVbtM+3OOU40ybCq/8lWZmEvo/eLfLfvo4Ybh0kADhp3jw9z0VGm?= =?Windows-1252?Q?HIABWon4y+kC6AxQczeA01tl88IsM/EiB4vaCqKRxc4RvLj87S7jtUIl?= =?Windows-1252?Q?9pOi6IAA/YoTSJCOoC4slrhtKTrR9J2g9HSQZ/4Jw9sAvOe7ccSq1LAJ?= =?Windows-1252?Q?YlX6sMTyPiVu/qoTuMPObAB95nqtwxQE+MGPI16pF8gDUdis9w0Ck5Yn?= =?Windows-1252?Q?rEwraD9renheWCRgTtTzp6HSV3257prRrzOGHJl3Jvp8dVBbj7qkPyYV?= =?Windows-1252?Q?lTH2pj5ioT5zxGIxY2hO1ZJSa1ZbFzq6peGN3JB8RA03yjN3Pr2hZZJZ?= =?Windows-1252?Q?tHYc9k9FgYeMaayYp33V/og6iItNUPS2sOoj0JotmMCyngyvV8SDFBng?= =?Windows-1252?Q?ddQdhQh67kjyUWhDRT41m1+SsVwTGwxbdWNqaqA5GdYrpwtHmiA1eLAu?= =?Windows-1252?Q?Sh1yBDoMdjC/dfpS5gpjy1qy0eDHnzwQ7x5jp816rNOjRzYBd3gpgLEv?= =?Windows-1252?Q?8vo3h/FdCKuGIqXsZ+T9j0vJo+AISezaVv0Vm6oW+yolTOdMBgdWYvJP?= =?Windows-1252?Q?ik0Oa9RoCd9GLOB7ZKHrVeE6fwKwHZEDIYNJM/vhjr+saVxG38KeLrl+?= =?Windows-1252?Q?LhEMF4lrRXN3fYdTi0vELBmHyAtxeJHOzIKLoPC/1s0KynnkMVL4mHcJ?= =?Windows-1252?Q?oCn7iQ10ZPzEqz6v5IDNMLcoMn9h9YTCwAKdIoeeAUaYsuIpDTmXJ4BW?= =?Windows-1252?Q?JdFKw9dtpxBRdnd+3ONviKcHSiQ8LgX+2xGWtUu5Pmv+v4jIBctKPpN8?= =?Windows-1252?Q?7GjSOzQm3SRzL0hJL2dYwunu5vUbcQZ1ryZKv1T75s5qmjsbjH1e/9ko?= =?Windows-1252?Q?VFqT66Q6X8s4IzXWNtWpRgc9/xdoKX8lmqoyGkoG1xg=3D?= Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BL0PR11MB3043.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: c463aaa1-3fba-4c4d-5131-08d966e500b0 X-MS-Exchange-CrossTenant-originalarrivaltime: 24 Aug 2021 09:53:19.3425 (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: fwO6frr0AKxMbvYcYHRv6bQoWmaiYvwA3xxhZjBLGzpfTchfkGKqFzuBMEqR35MUQMyDghMywk6dU1jTNNAbkw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL0PR11MB3442 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH] crypto/openssl: fix CCM processing 0 length source 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 Sender: "dev" > -----Original Message----- > From: Power, Ciara > Sent: Monday, August 23, 2021 1:47 PM > To: dev@dpdk.org > Cc: stable@dpdk.org; Zhang, Roy Fan ; Power, > Ciara ; De Lara Guarch, Pablo > ; Doherty, Declan > > Subject: [PATCH] crypto/openssl: fix CCM processing 0 length source >=20 > When given a source length 0 for CCM, the encryption and decryption > functions did not call the EVP_ENCRYPTUPDATE/EVP_DECRYPTUPDATE > functions > with a src and dst, causing some FIPS validation failures for testcases > with PLen=3D0: >=20 > process_openssl_auth_encryption_ccm() line 1131: > Process openssl auth encryption ccm failed >=20 > Fixes: 1a4998dc4d94 ("crypto/openssl: support AES-CCM") > Cc: pablo.de.lara.guarch@intel.com > Cc: stable@dpdk.org >=20 > Signed-off-by: Ciara Power > --- > drivers/crypto/openssl/rte_openssl_pmd.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) >=20 > diff --git a/drivers/crypto/openssl/rte_openssl_pmd.c > b/drivers/crypto/openssl/rte_openssl_pmd.c > index 47004337d5..37b969b916 100644 > --- a/drivers/crypto/openssl/rte_openssl_pmd.c > +++ b/drivers/crypto/openssl/rte_openssl_pmd.c > @@ -1114,7 +1114,7 @@ process_openssl_auth_encryption_ccm(struct > rte_mbuf *mbuf_src, int offset, > if (EVP_EncryptUpdate(ctx, NULL, &len, aad + 18, aadlen) <=3D > 0) > goto process_auth_encryption_ccm_err; >=20 > - if (srclen > 0) > + if (srclen >=3D 0) > if (process_openssl_encryption_update(mbuf_src, offset, > &dst, > srclen, ctx, 0)) > goto process_auth_encryption_ccm_err; > @@ -1197,7 +1197,7 @@ process_openssl_auth_decryption_ccm(struct > rte_mbuf *mbuf_src, int offset, > if (EVP_DecryptUpdate(ctx, NULL, &len, aad + 18, aadlen) <=3D > 0) > goto process_auth_decryption_ccm_err; >=20 > - if (srclen > 0) > + if (srclen >=3D 0) > if (process_openssl_decryption_update(mbuf_src, offset, > &dst, > srclen, ctx, 0)) > return -EFAULT; > -- > 2.25.1 Acked-by: Fan Zhang