Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp1989368imm; Thu, 24 May 2018 04:07:13 -0700 (PDT) X-Google-Smtp-Source: AB8JxZo9l8j58diq0TnRTZ2wHrTIk1mwSGohnuk7/aMWDjeWVOERV23eDdXkM0xL/dp7u8bRpaKb X-Received: by 2002:a62:4c53:: with SMTP id z80-v6mr6824577pfa.181.1527160033062; Thu, 24 May 2018 04:07:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527160033; cv=none; d=google.com; s=arc-20160816; b=H4eRHrZG8JYcGoEc7aqqijQli39fJDUWtQjn2K7JaSPWL78TvnIJzT92qiRZWr2Yk8 Vh2x6XZTZV4hRn1joeLyKwO0MDqWcqKrcaioAEGjx1krKX+66yfgXutYCiAiyEx6JtNG DyUqafoG8j8IimN2ZamiX2aOH6OgOhgDF1VqWHoPoJUPf6yqV6NiqiTbH0PeAV3IFnTt C0Km9dexAF/4XQORqxHQharUdjyh5xJK/caNk9dwN0eOetMJ8UOD2Ch7dvg+UlgvTrYE YCsp0/Ifzuhd36A4JsiwLRiAOeLUCwAh2hdyyRZkVZMDmkYKWXRQ5YoimTUrQGKkfrcA vnaQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=eS8Xjco6QVgI5rsj9rTcECCwe6OKbDluy18QhCIj5P8=; b=kQVP5tiop++xGHYwdBbrvdTo1Rg+pG8ZXPxorbhO1WiX0maWt5gGs4MJapPkjnSg6n rgLrboHIrJW3XHDLMw/kdcOoh1nj4qEK2dr1v4O85MgdqqwVVxwWCEBC6vXGfiRXSvs+ WvKC8pxxlithqnrRSUUAW/e5822YdGJKPSPRCBTuAHpIvKnpzsMTAj9QZlAghOVroXNs mu/PgzxCuGdCsAGZ71dmc5XmJVies95E0zwGcRLma1CYGZhoTC/nNnJOVBn1saIS6Ixv Jpct2sW6MJqcb3Tco6YjInOxeXT1ifHGQvEwT32SV98R2Y6rPMs9muCz1TE2R+p/w9Eb HrxA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=tMZRixIk; 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 f9-v6si19734461plo.568.2018.05.24.04.06.58; Thu, 24 May 2018 04:07:13 -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=tMZRixIk; 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 S968617AbeEXLFG (ORCPT + 99 others); Thu, 24 May 2018 07:05:06 -0400 Received: from mail.kernel.org ([198.145.29.99]:35404 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S968275AbeEXJzS (ORCPT ); Thu, 24 May 2018 05:55:18 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) (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 CCE4D20892; Thu, 24 May 2018 09:55:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1527155718; bh=AAwVBVoCEF/SVuL+oXkk6bM/+aIF5nS/DD2iUyi939w=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=tMZRixIknae5k82wTvGrkEyoJ778aCaC7JVYwP9Jipil5PDCGn7rXJafwxQ6Vqpji x0aHgJsW4sXGEjNdOyevEQEgIFFifTJdsvKJkqzAbe8XoUPDs4GwpuKGuEAVqt/UHt 5UEBb0CPZezbmPZN6LqUlx9Asht7Kp+CD1pvbMGs= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Antoine Tenart , Tudor Ambarus , Herbert Xu , Sasha Levin Subject: [PATCH 4.14 092/165] crypto: atmel-aes - fix the keys zeroing on errors Date: Thu, 24 May 2018 11:38:18 +0200 Message-Id: <20180524093625.748737802@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180524093621.979359379@linuxfoundation.org> References: <20180524093621.979359379@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Antoine Tenart [ Upstream commit 5d804a5157dbaa64872a675923ae87161165c66b ] The Atmel AES driver uses memzero_explicit on the keys on error, but the variable zeroed isn't the right one because of a typo. Fix this by using the right variable. Fixes: 89a82ef87e01 ("crypto: atmel-authenc - add support to authenc(hmac(shaX), Y(aes)) modes") Signed-off-by: Antoine Tenart Reviewed-by: Tudor Ambarus Signed-off-by: Herbert Xu Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/crypto/atmel-aes.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/crypto/atmel-aes.c +++ b/drivers/crypto/atmel-aes.c @@ -2145,7 +2145,7 @@ static int atmel_aes_authenc_setkey(stru badkey: crypto_aead_set_flags(tfm, CRYPTO_TFM_RES_BAD_KEY_LEN); - memzero_explicit(&key, sizeof(keys)); + memzero_explicit(&keys, sizeof(keys)); return -EINVAL; }