From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.5 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_PASS,URIBL_BLOCKED,USER_AGENT_MUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 52CDAC4360F for ; Wed, 20 Mar 2019 18:05:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1F4BD2175B for ; Wed, 20 Mar 2019 18:05:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1553105110; bh=HvCACevc8Z63mwTnF3bLCh/19lGgUuS9hkojA4ihaYs=; h=Date:From:To:Cc:Subject:References:In-Reply-To:List-ID:From; b=JUCh/JyURAOp6jqwD+vw8MFdLy2l/LLwcpd51D0gePIn0JI9Ov5nFpeMj8Izg7dss lcBJ+kp4aOScSS+5abw0BCcRJElommWX+VBZM99jwJSkly5I/rdRjNM0szahYbXy6V xIY3Cyj8UPh+Rm9UOfz92IYWS+ByOZl5/XRslU8s= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727416AbfCTSFI (ORCPT ); Wed, 20 Mar 2019 14:05:08 -0400 Received: from mail.kernel.org ([198.145.29.99]:39970 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726812AbfCTSFI (ORCPT ); Wed, 20 Mar 2019 14:05:08 -0400 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id E6A0B218A1; Wed, 20 Mar 2019 18:05:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1553105107; bh=HvCACevc8Z63mwTnF3bLCh/19lGgUuS9hkojA4ihaYs=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=HtMSQxRSjoyJDIMOAIzMEpoBWqa17z6l/btR1uuox1mvL/t7J4wrxRmVH5KC8rytP NIfCQJ6psmbLVZdwdVyML/BRx6gmCRcRxLlIBbJ3Fr5tsCM2d3iOAcwNKz4XymmX5i djTxI49wq002JGRe9bOXImdovECIzCKZIyAulQMg= Date: Wed, 20 Mar 2019 19:05:04 +0100 From: Greg KH To: Maxim Zhukov Cc: Eric Biggers , stable@vger.kernel.org, David Howells , Herbert Xu , Maxim Zhukov Subject: Re: [PATCH] crypto: pcbc - remove bogus memcpy()s with src == dest Message-ID: <20190320180504.GA5747@kroah.com> References: <15530987438372@kroah.com> <20190320173207.18266-1-mussitantesmortem@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190320173207.18266-1-mussitantesmortem@gmail.com> User-Agent: Mutt/1.11.4 (2019-03-13) Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org On Wed, Mar 20, 2019 at 08:32:07PM +0300, Maxim Zhukov wrote: > From: Eric Biggers > > commit 251b7aea34ba3c4d4fdfa9447695642eb8b8b098 upstream > > The memcpy()s in the PCBC implementation use walk->iv as both the source > and destination, which has undefined behavior. These memcpy()'s are > actually unneeded, because walk->iv is already used to hold the previous > plaintext block XOR'd with the previous ciphertext block. Thus, > walk->iv is already updated to its final value. > > So remove the broken and unnecessary memcpy()s. > > Fixes: 91652be5d1b9 ("[CRYPTO] pcbc: Add Propagated CBC template") > Cc: # v2.6.21+ > Cc: David Howells > Signed-off-by: Eric Biggers > Signed-off-by: Herbert Xu > Signed-off-by: Maxim Zhukov > --- > crypto/pcbc.c | 14 ++++---------- > 1 file changed, 4 insertions(+), 10 deletions(-) Thanks for all of the backports, now queued up. greg k-h