Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp2073960ybp; Thu, 10 Oct 2019 01:42:52 -0700 (PDT) X-Google-Smtp-Source: APXvYqzu3Igfy3Uhw26X8m60Y/+31ea3h2enyFhYMhhhikUiTToOqaSKJXE3LMXfUa7DwbJyP5cB X-Received: by 2002:a17:906:6a54:: with SMTP id n20mr7072017ejs.30.1570696972222; Thu, 10 Oct 2019 01:42:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570696972; cv=none; d=google.com; s=arc-20160816; b=Nnm4EUttM9xYkJzSZEw0EZfzmuc6AtRrTIlSINJp9QQZiEWFUZ6y1cbYZmCDjq2d2H 8cWX5hTELvrR7mSoLZqOwqRXRnLTgrlx4Yj9Z/Q730t9p4Q+aiizoy8amvpBrFrug/1B d0dY2qnRnWPfStI0H/Z7FfjJvN7gxcAOGXuRcwJaCG3Xtfo40dw5BwqynMpaMc1YD5v6 VgV2pBsPVa3MFtr1GG+wew1W1izDcdOX/Jz1BEpzM4ZMvy0YynpdnJROe488zvmUToSp gfIf1gxPfRuqHa/Fazz0vHoWMrf4p8BbEn5gt/sCwBUuTid+wuXpltpgWfeLqzTZLhQ2 4l3w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=oXRtJDQVCYqQepuBh63PyzDOl9HVm/TPbiVNbXxc1OI=; b=JWMDwycn8GlkAfQFFu0caR+lLEMBsTb0mFhxPxf/9t8SyoU5keiHIrMYdlNKnyGtW2 Wyc+pIPWv7+0jDTLgT7KCVsnxd9zFwjWW7RrkHf9r1IwKMC4fL4x5JTizmeurNWqeRec 1o2Y/e9nIinUoehd7qYNNMnWbZllv2o+X7LMnr9wCDSGlTvtXj0gDSU9xJ9GQv3eat7G ZJ+HJ20b4jJZA/ibm4v7I8x/crZCQq4nki/zOt0AltKuJigIRKX852vBlLDwNugACDuQ MeHhEx6s6/MoU1HmOAF5t1HHwq/hjV8w6qHz7/wC4JUZWzIytDFKvxkVo5Fv0UQTxEos LSgg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="H/+3Oj3J"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s1si2856556ejf.305.2019.10.10.01.42.29; Thu, 10 Oct 2019 01:42:52 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="H/+3Oj3J"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387876AbfJJIj3 (ORCPT + 99 others); Thu, 10 Oct 2019 04:39:29 -0400 Received: from mail.kernel.org ([198.145.29.99]:42992 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387430AbfJJIj2 (ORCPT ); Thu, 10 Oct 2019 04:39:28 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.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 0B06E21D7A; Thu, 10 Oct 2019 08:39:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1570696767; bh=NROWJEU6vUCbpXiz1egOIyuqyJi8o/fjEm1WAP2iO8k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=H/+3Oj3JxOOsgeqZZpLMxk8j1DnYfKlZTElVCPBr34YyFJ2vbrFifS1VwgEriupRK wfBnilp59wcKjGKekRpeLiOX3NBS5wtka/UG+On8VJTtA/vyeWmgwxtjXlTbsZvYQU ro4O8I/clwyGRQohk5PC5nyVgN+sdt+pyuAA/PF4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Gilad Ben-Yossef , Herbert Xu Subject: [PATCH 5.3 046/148] crypto: ccree - use the full crypt length value Date: Thu, 10 Oct 2019 10:35:07 +0200 Message-Id: <20191010083613.938277698@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191010083609.660878383@linuxfoundation.org> References: <20191010083609.660878383@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Gilad Ben-Yossef commit 7a4be6c113c1f721818d1e3722a9015fe393295c upstream. In case of AEAD decryption verifcation error we were using the wrong value to zero out the plaintext buffer leaving the end of the buffer with the false plaintext. Signed-off-by: Gilad Ben-Yossef Fixes: ff27e85a85bb ("crypto: ccree - add AEAD support") CC: stable@vger.kernel.org # v4.17+ Signed-off-by: Herbert Xu Signed-off-by: Greg Kroah-Hartman --- drivers/crypto/ccree/cc_aead.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/crypto/ccree/cc_aead.c +++ b/drivers/crypto/ccree/cc_aead.c @@ -236,7 +236,7 @@ static void cc_aead_complete(struct devi /* In case of payload authentication failure, MUST NOT * revealed the decrypted message --> zero its memory. */ - cc_zero_sgl(areq->dst, areq_ctx->cryptlen); + cc_zero_sgl(areq->dst, areq->cryptlen); err = -EBADMSG; } } else { /*ENCRYPT*/