From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by dpdk.org (Postfix) with ESMTP id 7B28F1B468 for ; Tue, 12 Feb 2019 12:01:50 +0100 (CET) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x1CB0Pwu016647; Tue, 12 Feb 2019 03:01:48 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : references : in-reply-to : content-type : content-transfer-encoding : mime-version; s=pfpt0818; bh=8gVv3saVGLPRimqFQAzZyLRotWNg4y2zDGfDcxXG9bk=; b=EjmItiFZMkLgzjeQ46aUxm2qEqzJlSoGHxdvLpy9V7dpg5eh0I+8GrGnqtxJxngRVhRX oMndVmhwpRF7uC24e+pQZvGQhqr37eO0NVXNVpwKg6Ob32Mvw+kj5eRv8eL+vWcY+Lpf v9CCEfjbT/bYrn/As7OiP7PZz3CMpSQV30yfiRBmbVvm4j2innfRRio7YXw1Tl8Aw1lJ IULrR6SCBQ2iVnROTfIQw40qkzoR0YlFwGGv0x+s7zCWCPXX1jtstNRF8cCl98PEm+vv S4zsGzLvsYma8Q67a+L4H8EwuhQuJpgWqrrGDkBzFuOx0u0fE2kKEOXEMKCV9NBaexrF Jw== Received: from sc-exch02.marvell.com ([199.233.58.182]) by mx0b-0016f401.pphosted.com with ESMTP id 2qkktn9f4a-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Tue, 12 Feb 2019 03:01:47 -0800 Received: from SC-EXCH01.marvell.com (10.93.176.81) by SC-EXCH02.marvell.com (10.93.176.82) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Tue, 12 Feb 2019 03:01:45 -0800 Received: from NAM05-CO1-obe.outbound.protection.outlook.com (104.47.48.50) by SC-EXCH01.marvell.com (10.93.176.81) with Microsoft SMTP Server (TLS) id 15.0.1367.3 via Frontend Transport; Tue, 12 Feb 2019 03:01:45 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.onmicrosoft.com; s=selector1-marvell-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=8gVv3saVGLPRimqFQAzZyLRotWNg4y2zDGfDcxXG9bk=; b=RiBo3haYUHDrILxAysEM6vA9n7g85LzwqJH1Ykjt1BK/kZQghykX9WaybVeRPcfXpocCfj5GueErf1cyOM6wy4/p/ygLvsuv5MrgBNG4HoqV+yYKG3mzz0sKSuXcu1/USGLtpbgvlLLAGgVgu07GIT8oN6LzttfIIHj36VFhysU= Received: from CY4PR1801MB2053.namprd18.prod.outlook.com (10.171.255.158) by CY4PR1801MB2005.namprd18.prod.outlook.com (10.171.255.146) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1601.17; Tue, 12 Feb 2019 11:01:43 +0000 Received: from CY4PR1801MB2053.namprd18.prod.outlook.com ([fe80::81c3:42cc:43e4:7c4e]) by CY4PR1801MB2053.namprd18.prod.outlook.com ([fe80::81c3:42cc:43e4:7c4e%6]) with mapi id 15.20.1601.023; Tue, 12 Feb 2019 11:01:43 +0000 From: Shally Verma To: Arek Kusztal , "dev@dpdk.org" CC: "akhil.goyal@nxp.com" , "fiona.trahe@intel.com" , "sunila.sahu@caviumnetworks.com" , "ashish.gupta@caviumnetworks.com" Thread-Topic: [dpdk-dev] [PATCH] openssl: fix not clearing big numbers after computations Thread-Index: AQHUvtOZApJqh9P/LE+df02kNhwqqKXcBtEA Date: Tue, 12 Feb 2019 11:01:43 +0000 Message-ID: References: <20190207105439.12260-1-arkadiuszx.kusztal@intel.com> In-Reply-To: <20190207105439.12260-1-arkadiuszx.kusztal@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [223.230.35.64] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 92a861f0-f302-4cb3-2731-08d690d9793d x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600110)(711020)(4605077)(2017052603328)(7153060)(7193020); SRVR:CY4PR1801MB2005; x-ms-traffictypediagnostic: CY4PR1801MB2005: x-microsoft-exchange-diagnostics: 1; CY4PR1801MB2005; 20:8vBZ1uSWOdeeiVnoIHdQ1AWN+ppiA4kFMsrEMBTgCucjQOV1LIaMl5KjbkkUTXAgKdU7qkzfEc9w19x7bzwxSoX9COJODg8F7eUuBChXnqYwye0gDSTuXU6XC93EzBkmxiVm3hvnGJE3GAEw4Kk0JMt1eBGg/gJbDT9eOI8j+nI= x-microsoft-antispam-prvs: x-forefront-prvs: 0946DC87A1 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(136003)(39860400002)(366004)(376002)(396003)(346002)(13464003)(189003)(199004)(6436002)(9686003)(105586002)(74316002)(186003)(55016002)(2906002)(53936002)(71200400001)(97736004)(6246003)(6506007)(7736002)(68736007)(106356001)(26005)(102836004)(66066001)(305945005)(33656002)(2501003)(6116002)(229853002)(316002)(71190400001)(478600001)(446003)(25786009)(476003)(11346002)(86362001)(110136005)(256004)(54906003)(7696005)(76176011)(14454004)(81166006)(486006)(4326008)(81156014)(99286004)(3846002)(8936002); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR1801MB2005; H:CY4PR1801MB2053.namprd18.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: marvell.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: CXIPhvCxRaweUyVS5OvztZyxWWXfX2QRPOcw+LLovsMMgyPD+6WrSepmlKMqiqs5mnfwmqqrJJOgkB4+wmlkP057cziSu/mZWsCQs9cyk8c62J68azMPzECgcYGuJg+WJnLRLsa67qIEBJXJ5r71oog56sKWEtaAuN6vGNvlVHmThY7aDKkWpRONJvbqz0pNSQQfBk9cp2qFsVVojbYUH0oxIWMaIAolJk44rrowwlnF3YzFEV8ui0nRt2Fz2qzI/LYPx37UixjElbqdlwnFEtphbXIcW5w3HWW4LaqdQofUCzNi1GVaedDNm47UioR1ziDQeaTq+P2nfMYFMsBsjmWu8ICGaDlPRnNokSlXN9n1w8tH5TUdpigbEn6bB7kDrf3zZMijMHzRcbmpDLcF7Cvw+rwyLrQnqfQGgfQ09bg= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 92a861f0-f302-4cb3-2731-08d690d9793d X-MS-Exchange-CrossTenant-originalarrivaltime: 12 Feb 2019 11:01:43.4576 (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-Transport-CrossTenantHeadersStamped: CY4PR1801MB2005 X-OriginatorOrg: marvell.com X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-02-12_07:, , signatures=0 X-Proofpoint-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=737 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1902120081 Subject: Re: [dpdk-dev] [PATCH] openssl: fix not clearing big numbers after computations X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Feb 2019 11:01:50 -0000 >-----Original Message----- >From: dev On Behalf Of Arek Kusztal >Sent: 07 February 2019 16:25 >To: dev@dpdk.org >Cc: akhil.goyal@nxp.com; fiona.trahe@intel.com; shally.verma@caviumnetwork= s.com; sunila.sahu@caviumnetworks.com; >ashish.gupta@caviumnetworks.com; Arek Kusztal >Subject: [dpdk-dev] [PATCH] openssl: fix not clearing big numbers after co= mputations > >After performing mod exp and mod inv big numbers (BIGNUM) should >be cleared as data already is copied into op fields and this BNs would >very likely contain private information for unspecified amount of time >(duration of the session). > >Fixes: 3e9d6bd447fb ("crypto/openssl: add RSA and mod asym operations") > >Signed-off-by: Arek Kusztal >--- Acked-by: Shally Verma > drivers/crypto/openssl/rte_openssl_pmd.c | 6 ++++++ > 1 file changed, 6 insertions(+) > >diff --git a/drivers/crypto/openssl/rte_openssl_pmd.c b/drivers/crypto/ope= nssl/rte_openssl_pmd.c >index ea5aac6..4ecc3c4 100644 >--- a/drivers/crypto/openssl/rte_openssl_pmd.c >+++ b/drivers/crypto/openssl/rte_openssl_pmd.c >@@ -1795,6 +1795,9 @@ process_openssl_modinv_op(struct rte_crypto_op *cop, > cop->status =3D RTE_CRYPTO_OP_STATUS_ERROR; > } > >+ BN_clear(res); >+ BN_clear(base); >+ > return 0; > } > >@@ -1825,6 +1828,9 @@ process_openssl_modexp_op(struct rte_crypto_op *cop, > cop->status =3D RTE_CRYPTO_OP_STATUS_ERROR; > } > >+ BN_clear(res); >+ BN_clear(base); >+ > return 0; > } > >-- >2.1.0