From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-BL2-obe.outbound.protection.outlook.com (mail-bl2nam02on0048.outbound.protection.outlook.com [104.47.38.48]) by dpdk.org (Postfix) with ESMTP id 1C4F4DED for ; Wed, 31 Oct 2018 07:35:13 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=1u9Ma6LURI8fybSRI3jpaBMwrq3/uqMcsJeMcpKH9KA=; b=cIMu4d3VI1uUtYxDQoM3zkZdbFvpOfPNYIHujXzc+9VCDCVjz7tIcBeDaYa3UZ+J4AAvP8o1lbURUr/CaQXcmtR1swF3wP7iru4y6rbHZHLUQogw4+T1p/O41dsVmMjsIibEEg2ID5DUOCLiu9V/VLObBI0mbsLmLRq/bGymZV8= Received: from BYAPR07MB4997.namprd07.prod.outlook.com (52.135.238.214) by BYAPR07MB4454.namprd07.prod.outlook.com (52.135.224.152) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1273.25; Wed, 31 Oct 2018 06:35:12 +0000 Received: from BYAPR07MB4997.namprd07.prod.outlook.com ([fe80::2d56:eab:242f:fdfc]) by BYAPR07MB4997.namprd07.prod.outlook.com ([fe80::2d56:eab:242f:fdfc%2]) with mapi id 15.20.1273.027; Wed, 31 Oct 2018 06:35:11 +0000 From: Jerin Jacob To: Fiona Trahe CC: "dev@dpdk.org" , "thomas@monjalon.net" , "akhil.goyal@nxp.com" , "tomaszx.jozwiak@intel.com" Thread-Topic: [PATCH] compress/qat: fix out-of-bounds error Thread-Index: AQHUcLJDvTm4d+y2vESDlVjxg4Qkt6U45lOA Date: Wed, 31 Oct 2018 06:35:11 +0000 Message-ID: <20181031063503.GA21779@jerin> References: <20181027164739.13110-1-jerin.jacob@caviumnetworks.com> <1540946394-22196-1-git-send-email-fiona.trahe@intel.com> In-Reply-To: <1540946394-22196-1-git-send-email-fiona.trahe@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [111.93.218.67] x-clientproxiedby: BYAPR11CA0085.namprd11.prod.outlook.com (2603:10b6:a03:f4::26) To BYAPR07MB4997.namprd07.prod.outlook.com (2603:10b6:a03:5b::22) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Jerin.JacobKollanukkaran@cavium.com; x-ms-exchange-messagesentrepresentingtype: 1 x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; BYAPR07MB4454; 6:5nm5GdBKmBOw/Z47Q88FiiF9d2UUISS10/VKdWNGmEvSh1K87amW6ajKpdUuIUmpy2nlDB4Um4JCBTvySrgCODfMd6yD/tHtMd5/qFD+/nn1ipf+OM5hkNLpgi7UZuCNDqn29rDtt+OBau5YHsC4AjNhIBMjtUIUj/2GSFHQOjsb6NcYjMaCKGpO5Z5vu03mJNR8LJrVObCnz52OSuM7EBmuXvRhpNiXTDgJnR3nret1FuVuY3yiLTykC58+MrXw9Av9I+OahIh+b7oPZugHdiJFdbtaym4KdBmr4cagUdUO8en/SKbjruHId9uoKFNiYF7ujDMWoauxwO3gGmk92sDvaQxySRupqVjBnYtP+aE9OcN2Pz9JmsmtWkPAgjaBgm5R5d5Sde4cWpDmVsaBtksseCeJArCXc1T/WvusA8jLfGCODNxebuZuMMol7PASO/QegiN6zc812CUHLUuz6g==; 5:o7/86ZWPhKHxILgwYH+rM8VF59iiP8NKC8bItOc8KVX5jOC7abF8DTrzCKcw0yjD4qLlYSrDSvwuf1Ff6G6hyUsdiJ4GChGCJE06wmcx3sQHeKbWufpsbKgHAEBRbwwPvbcF37C0eKDk2BTwPXUxbWP5PopCAYaa1SS+m/9nypo=; 7:kbYhRJhHtOD6siY7SBLUshQHBNvZTuToV2YB5aHxhcwwRIrQhe1ZbFRj3emlzaiCUCTLfskezvI2hlXBIFebFPayI6lI7Qupf7KAjlbxdAsNq5buArvyaIXRSFRjOVaC2VKI2Hel7s7sJCb4tgUBxQ== x-ms-office365-filtering-correlation-id: 72bff478-24b5-4ae1-cf45-08d63efb0251 x-microsoft-antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(2017052603328)(7153060)(7193020); SRVR:BYAPR07MB4454; x-ms-traffictypediagnostic: BYAPR07MB4454: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(185117386973197)(228905959029699); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(3231382)(944501410)(52105095)(93006095)(3002001)(10201501046)(148016)(149066)(150057)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123562045)(20161123564045)(20161123560045)(201708071742011)(7699051)(76991095); SRVR:BYAPR07MB4454; BCL:0; PCL:0; RULEID:; SRVR:BYAPR07MB4454; x-forefront-prvs: 084285FC5C x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(7916004)(366004)(136003)(346002)(396003)(39850400004)(376002)(199004)(189003)(13464003)(478600001)(81166006)(33896004)(76176011)(386003)(6506007)(6436002)(105586002)(68736007)(6486002)(81156014)(102836004)(9686003)(53936002)(229853002)(4326008)(8676002)(99286004)(8936002)(6512007)(33656002)(5250100002)(25786009)(256004)(305945005)(52116002)(7736002)(6916009)(6246003)(5660300001)(26005)(66066001)(3846002)(42882007)(54906003)(33716001)(476003)(486006)(97736004)(11346002)(1076002)(316002)(71200400001)(14454004)(106356001)(72206003)(2906002)(71190400001)(2900100001)(6116002)(446003)(186003)(78486013); DIR:OUT; SFP:1101; SCL:1; SRVR:BYAPR07MB4454; H:BYAPR07MB4997.namprd07.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: /Euo5V1gtum0QvPkDxHT+BU3iBpmi/SpGEE+3FR9nxIk27NAuFfrxOUOtBORFnwRW5VERjBEqzdGOXP84qbwAn6Z5oyilcSzrB4+NEfl2pktFskruVyeO54MbPL2e/2FkJNI7GVBugAqMOEcfS4OKAbc94HFpOHj03X21iwY+cIv5jLDQv94cUvgWjm1TNIW1LmXw4RBww4c2lZpUlnnXVF2HZoh0SfsCZTlVBGy13nsypkdC/b9W6uExbziTIHG5pXuPZC9SvjwgZdKOW/JmU6lYflmKDPhwXjmhJgN3nCEl/2taBT/jcqptIiQbNMI2gjhAQO6aPxO1ehzZFAuA66G71YL2wGYOwOmB51MyvM= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-ID: <5D7F6B2228ADDA4B96406ADCC6CDC627@namprd07.prod.outlook.com> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-Network-Message-Id: 72bff478-24b5-4ae1-cf45-08d63efb0251 X-MS-Exchange-CrossTenant-originalarrivaltime: 31 Oct 2018 06:35:11.9414 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR07MB4454 Subject: Re: [dpdk-dev] [PATCH] compress/qat: fix out-of-bounds error 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: Wed, 31 Oct 2018 06:35:14 -0000 -----Original Message----- > Date: Wed, 31 Oct 2018 00:39:54 +0000 > From: Fiona Trahe > To: dev@dpdk.org > CC: thomas@monjalon.net, akhil.goyal@nxp.com, tomaszx.jozwiak@intel.com, > jerin.jacob@caviumnetworks.com, Fiona Trahe > Subject: [PATCH] compress/qat: fix out-of-bounds error > X-Mailer: git-send-email 1.7.0.7 >=20 >=20 > QAT array for sgls in intermediate buffer structure > was #defined to 1, but setup code hardcoded as if 2 buffers > so causing out of bounds write. Reworked to loop correctly > using #define. >=20 > Fixes: a124830a6f00 ("compress/qat: enable dynamic huffman encoding") >=20 > Reported-by: Jerin Jacob > Signed-off-by: Fiona Trahe clang build is not reproducible with this patch. Tested-by: Jerin Jacob