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 B5AEE43FB2 for ; Tue, 7 May 2024 16:25:55 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 831B0433B1; Tue, 7 May 2024 16:25:55 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id BBD05402C8 for ; Tue, 7 May 2024 16:25:53 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1715091953; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:autocrypt:autocrypt; bh=EqvJZGrvK+Xx6dMbNshe4e6YfnZHuR5HWAp9H1p8cro=; b=VEAH8DxV2PbY4VHOxsJoDcl0fOqb2Fb7h0gI0igsXMBnG8v9dsTGW+q8SwP7NKNzwS0yXE lIdhxzE84iKfHRDrUAGzyJX0LcehO2qf5UHQr+px5FVrsbEPlbtQZ30bA57z09VjhWJeWs vA/4pq/0pr7f2Hokp8AFQ9xaS09VQyg= Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-474-vahh_HG3MRK2rC9Q0PNkgQ-1; Tue, 07 May 2024 10:25:51 -0400 X-MC-Unique: vahh_HG3MRK2rC9Q0PNkgQ-1 Received: by mail-wr1-f69.google.com with SMTP id ffacd0b85a97d-34d7a7585d7so2373326f8f.2 for ; Tue, 07 May 2024 07:25:51 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715091950; x=1715696750; h=content-transfer-encoding:in-reply-to:autocrypt:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=EqvJZGrvK+Xx6dMbNshe4e6YfnZHuR5HWAp9H1p8cro=; b=i3y1AtgZKsLNIQXJ0boebv69CIQF3PsQfhx1x7dTJa9LurHrbU0Nm28EavvEOPz6jq mX8xutzxSdGB5Qykkfz4i5oa8G59nm7imTy9TTOQDmvhDNqFi5240pQriYM8qKwMg6Cu NglnSNB0umvUuqMbW5td//n4CYsQ9CU0jE4CjTKSjVL4gJI0Ntf8noX4unHtA8Qdf6hp e0RzYO9iJ1g7JBI2Xs1dP3Hje1xtJezOCsrJj7lSSfKOkRErJbQLwgGBFWF7vKpxQiJi HnUi/polSEUuvEIT8nOp8M2o5gq6P7DZ5ycPPkQoZsiVSQ7GeZalRzZwdGziIx4r18be U6oA== X-Forwarded-Encrypted: i=1; AJvYcCUZr1Udl0twfiI75nskP5c7o+KSICLbt2u1kIEL7OfNfs4nXfmWRoN4j2N+MwCx65s1XoFSJSX+pbCkAUe5X2c= X-Gm-Message-State: AOJu0YxG4pe8F3qvE8cULH9Xbqb/OGDrHWTNgwAUeq51d4elTGsdTDpD jhbA68bRLKeqWPlwbACNCNPP0elUhqhetMaC08oiZoPEjSUetTllgORbTfjg/kL8Y0rCsAFK1Cq qN54IW1o/mg92Sq8qTADx/755sOxvvKjU4C9VSdxQ0sBH X-Received: by 2002:a5d:4c52:0:b0:34a:e884:977b with SMTP id n18-20020a5d4c52000000b0034ae884977bmr9164882wrt.32.1715091950001; Tue, 07 May 2024 07:25:50 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHJDrLpKOQQHL2XzB0fqF/JC1NeG2MpiMwm4VAgx+hO4m24Gexa9ngJS1g63znWvrFoZP4Axw== X-Received: by 2002:a5d:4c52:0:b0:34a:e884:977b with SMTP id n18-20020a5d4c52000000b0034ae884977bmr9164866wrt.32.1715091949514; Tue, 07 May 2024 07:25:49 -0700 (PDT) Received: from [192.168.0.36] ([78.17.184.177]) by smtp.gmail.com with ESMTPSA id o10-20020a5d684a000000b0034a7a95c8cfsm13141191wrw.9.2024.05.07.07.25.48 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 07 May 2024 07:25:49 -0700 (PDT) Message-ID: Date: Tue, 7 May 2024 15:25:47 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 22.11 21.11] test/crypto: fix vector global buffer overflow To: Ciara Power , stable@dpdk.org Cc: brian.dooley@intel.com, arkadiuszx.kusztal@intel.com References: <20240507134053.5586-1-ciara.power@intel.com> From: Kevin Traynor Autocrypt: addr=ktraynor@redhat.com; keydata= xsFNBF2J2awBEADUEPNhgNI+nJNgiTAUcw4YIgVXEoHlsNPyyzG1BEXkWXALy0Y3fNTiw6+r ltWDkF9jzL9kfkecgQ67itGfk1OaBXgSGKuw1PUpxAwX2Bi76LAR6M5OsyGM9TSVVQwARalz hMwRBIZPzPc7or6Pw7jAOJ8SQGJ1Zlp1YJCjrvpe87V1tH/LY8Wnxn/EuoseFmWILAQZAtYS tGjcrAgYn3SPMLR1B0BP5bTBY06vWQjiufH8drenfDnMJAzuBdG1mqjnTqCjULZ3Hunv4xqZ aMnkvL/K5Tj1c12Oe4930EE53LrXIBUltRg5mBudSWHnC7twjH0082HH9f963Z/2UI63SFIT iUvRvAzJYytgy7XnWLQ0+goZBADKYfolOuC0H8VgCaux8u8KFF28Dy+N6TV2KI58jTlyg1Zu l7QwykZpnOkJFiy37Gfbu3YEOzO72cP/S7/A+zvuqkxi63jyEkd+FY99vLt/HN2MUZwRmKDw UPbLkmrs8WU01/POVsqDcfvz7vu2St8hqqTiSIdQGS2zyTKB2/DvPSM3jws3udkIYSuhn+X4 QBiV6lkVZ7DSE6a065gnAauAql+b32Eymy+xnG5jCt1tR+0Cp2VZYCR9OU2gmomUKBDoX/He pSgED01CqY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EpoyUF6gdTKaiDL2Vao4+XRIA3Y57b6MO35a3HuzAv7+i5Z0mnDEJO XxXqTOmKYpMIGexzM/PtuA0712sT1abG9tAJ17ao/B7cqMW5IkKkalemFbWfI2unns4Papvo tk9igVqyp6EJDU98z5TJioCVojwK2laDaoIjTJk9YYv3iwCsqPd5feU= In-Reply-To: <20240507134053.5586-1-ciara.power@intel.com> X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit 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 On 07/05/2024 14:40, Ciara Power wrote: > When doing a memcpy of the test vector into a local union variable, > the size of the union was used. This meant extra bytes were being copied > from the test vector address in the case the vector was smaller in size > than the union. This caused a global buffer overflow error detected by > Address Sanitizer. > > To fix this, the size of the test vector is also stored alongside the > address, so when copying takes place, the minimum of the union and test > vector can be used as the size reference. > > Fixes: 488f5a23c219 ("test/crypto: check asymmetric crypto") > > Signed-off-by: Ciara Power > --- > This issue was fixed by a rework in 2023, so this fix is only applicable > to 21.11 and 22.11 LTS releases that are currently maintained. > It is not applicable to 23.11 LTS, or current upstream releases. > --- > app/test/test_cryptodev_asym.c | 25 ++++++++++++++++--------- > 1 file changed, 16 insertions(+), 9 deletions(-) > Thanks Ciara, will apply to the tree and it will be part of the next release.