From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 34D12A0524 for ; Thu, 3 Dec 2020 17:40:38 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 299DCC982; Thu, 3 Dec 2020 17:40:37 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by dpdk.org (Postfix) with ESMTP id B3E07C982 for ; Thu, 3 Dec 2020 17:40:35 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1607013634; 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; bh=smaJYSxbSZHIUHAfA9bog3txGDGllVBjLP2LsTEM1J0=; b=NDpP0Eks/OexRxZQMWSbXV9ks4eqOAFBlnVcFXS9YXne831XTScFZyGULE3sonSP447Enz OdMuSiyy/gHGtWrt82a7qj3dl9jQbmuZ0vjk0OSnRddkyBu1LCltbFXHqBoc6tq7/X8Sqp IFPrQ1vczU5na3oiyiAnZPRlnF4fgR0= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-41-IMpa8fMvMymAuJG1_gFGhA-1; Thu, 03 Dec 2020 11:40:32 -0500 X-MC-Unique: IMpa8fMvMymAuJG1_gFGhA-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 1633D800D62; Thu, 3 Dec 2020 16:40:31 +0000 (UTC) Received: from [10.36.114.167] (ovpn-114-167.ams2.redhat.com [10.36.114.167]) by smtp.corp.redhat.com (Postfix) with ESMTP id 434AB60854; Thu, 3 Dec 2020 16:40:30 +0000 (UTC) To: Olivier Matz , stable@dpdk.org Cc: Fan Zhang References: <20201202143946.26704-1-olivier.matz@6wind.com> From: Kevin Traynor Message-ID: <55a934bf-8058-bcd8-e6ce-b46ecafbe9ac@redhat.com> Date: Thu, 3 Dec 2020 16:40:29 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.4.0 MIME-Version: 1.0 In-Reply-To: <20201202143946.26704-1-olivier.matz@6wind.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=ktraynor@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-stable] [PATCH 18.11] examples/fips_validation: fix buffer overflow X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 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 Sender: "stable" On 02/12/2020 14:39, Olivier Matz wrote: > [ upstream commit 9275af3bd9faa0337b418736bb622704d158fbac ] > > If the file name is larger than MAX_STRING_SIZE (64), strcpy() > will overwrite the content of memory. > > Replace strcpy() by rte_strscpy(), check its return value, and > increase file_name size to 256. > > Fixes: 3d0fad56b74a ("examples/fips_validation: add crypto FIPS application") > Cc: stable@dpdk.org > > Signed-off-by: Olivier Matz > Acked-by: Fan Zhang > > Conflicts: > examples/fips_validation/fips_validation.c > examples/fips_validation/fips_validation.h > > Most of the original commit has been removed, because a part of the > issue was introduced by commit efe3a8dbb66e ("examples/fips_validation: > support TDES ECB"), and it is not present in this branch. > > Only the length check on the device name remains. > > Signed-off-by: Olivier Matz Applied, thanks.