Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C7E58C636CC for ; Tue, 7 Feb 2023 08:04:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1675757070; h=from:from:sender:sender: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:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=FrRypb4s9q5jf+Tu+qoKvu/yUPPubni+5zWu6AH029s=; b=bEvZBP9SCboTXUen9rsg+iBnZlcpAXj5WQnlcL4qPuUKGH4Lm1l7ob3uQoEziYydIZz9zl CEQSHwoEO8bs1WODlway99zwlglVbPEvxgkbXFTsKU6h1rOMyzyjBHUU0IGWcNcNDsIvV0 7QXS4EndBn6Y7FcKHyHLNJTCI/mgO3Y= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-244-0RAKhEn9NAmoPjkOUdyuqg-1; Tue, 07 Feb 2023 03:04:27 -0500 X-MC-Unique: 0RAKhEn9NAmoPjkOUdyuqg-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 1050C101A55E; Tue, 7 Feb 2023 08:04:26 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id B6959401014C; Tue, 7 Feb 2023 08:04:25 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 99B27194658C; Tue, 7 Feb 2023 08:04:25 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 75AD81946589 for ; Tue, 7 Feb 2023 08:04:24 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 0A232440DE; Tue, 7 Feb 2023 08:04:24 +0000 (UTC) Received: from formenos.hmeau.com (unknown [10.67.24.12]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 6B4B818EC5; Tue, 7 Feb 2023 08:04:23 +0000 (UTC) Received: from loth.rohan.me.apana.org.au ([192.168.167.2]) by formenos.hmeau.com with smtp (Exim 4.94.2 #2 (Debian)) id 1pPIxE-008OMQ-SI; Tue, 07 Feb 2023 16:03:53 +0800 Received: by loth.rohan.me.apana.org.au (sSMTP sendmail emulation); Tue, 07 Feb 2023 16:03:52 +0800 Date: Tue, 7 Feb 2023 16:03:52 +0800 From: Herbert Xu To: Jakub Kicinski Message-ID: References: <20230206231008.64c822c1@kernel.org> MIME-Version: 1.0 In-Reply-To: <20230206231008.64c822c1@kernel.org> X-Scanned-By: MIMEDefang 3.1 on 10.11.54.5 Subject: Re: [dm-devel] [PATCH 0/17] crypto: api - Change completion callback argument to void star X-BeenThere: dm-devel@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: device-mapper development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: David Howells , dm-devel@redhat.com, keyrings@vger.kernel.org, Alasdair Kergon , Steffen Klassert , Boris Pismenny , John Fastabend , Tyler Hicks , Paolo Abeni , Johan Hedberg , Marcel Holtmann , ecryptfs@vger.kernel.org, Mike Snitzer , Luiz Augusto von Dentz , netdev@vger.kernel.org, Eric Dumazet , Jon Maloy , linux-bluetooth@vger.kernel.org, Jarkko Sakkinen , Linux Crypto Mailing List , Ying Xue , "David S. Miller" Errors-To: dm-devel-bounces@redhat.com Sender: "dm-devel" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit On Mon, Feb 06, 2023 at 11:10:08PM -0800, Jakub Kicinski wrote: > On Mon, 6 Feb 2023 18:21:06 +0800 Herbert Xu wrote: > > The crypto completion function currently takes a pointer to a > > struct crypto_async_request object. However, in reality the API > > does not allow the use of any part of the object apart from the > > data field. For example, ahash/shash will create a fake object > > on the stack to pass along a different data field. > > "different data field" == copy the value to a different structure? > A bit hard to parse TBH. The word data here refers to the data field in struct crypto_async_request. > Buggy means bug could be hit in real light or buggy == did not use > the API right? Yes this bug is real. If you hit a driver/algorithm that returns a different request object (of which there are many in the API) then you will be dereferencing random pointers. Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt -- dm-devel mailing list dm-devel@redhat.com https://listman.redhat.com/mailman/listinfo/dm-devel