Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp1928997imm; Thu, 24 May 2018 03:05:50 -0700 (PDT) X-Google-Smtp-Source: AB8JxZr5Q+s3jvurfEcAEcZg5K41qd0bYVDSNtwhUXKSpdd+BJjgXlo2yHaHeWU0FdDKZY9HXl3i X-Received: by 2002:a65:4a03:: with SMTP id s3-v6mr5258096pgq.376.1527156350476; Thu, 24 May 2018 03:05:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527156350; cv=none; d=google.com; s=arc-20160816; b=mKEKFneiisRjWFZxb1reYOMLTOC/cQR35NPGVXShCN4r32Mf2C2yDl7s7RCM8uAnOz MR1+XKMtLP1JxIBWCrpmzvgaI+jtBcI99ShOf36DLwR37mEHlDVRBkj/QIRtdunpwhak cplG3sxXPgD9vpGsRZLCzQLJeW39XFhaZtWxsDxVcMnwdQlvSTWOwxdXmq6oAeElBlju vZBtKP/Tjz+LY9k9ZPmH6blmZaquzMTmZABn9YO/IcRVnX2iHtZ4p6CHV+getTJwYpxO jR4uk7RJywIGh1Mvo5DcdbjI3X40Q8CRd3zh5dX6yzQPWox42TqXuDj42faOsV4sxCjt HLPw== 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=YIsrHeVesD4IiVB3eN3qdcy0prlpWuv7m0u3lEIwdIg=; b=TJPAMB9rESt7FPgRtgJPZdETNzDqJwubKqpFWhdCx67mZAf/C5exbdkLIJFchjfBE9 vmodaUy7QvotJoArIvdRcAJeZkrwy6WX9RScSzGI/UnjcibPXMS17jDXLFHp4Q8rQIK8 o1Twxd7DmDtmmDnTCMJEFWhoGbhrYQsh842i9K3sD20iGVgme2qU0sZF8g75iKi7EYGb nuEkLYYHZmQ2msL+dNg6ZXP0XoglgxQ6iLI4Eie918ISWLbHeqX8vVOd/XVONXAd7m39 139fH/pw7X6SKxorntqkn/mz8kl3bwnpqgiYhXwvTW0qArZ94BEs3ZhJxT7wG2yPLadb b47g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=uRnIBlnQ; 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 i74-v6si21636899pfd.105.2018.05.24.03.05.35; Thu, 24 May 2018 03:05:50 -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=uRnIBlnQ; 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 S1031458AbeEXKEj (ORCPT + 99 others); Thu, 24 May 2018 06:04:39 -0400 Received: from mail.kernel.org ([198.145.29.99]:53904 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1031442AbeEXKEd (ORCPT ); Thu, 24 May 2018 06:04:33 -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 17C7A208A1; Thu, 24 May 2018 10:04:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1527156272; bh=K35po+ti6/7vUPY2cmmX2Oz1uJSMBInxWtkSTXAS8WM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=uRnIBlnQnDRS06sr4ulZAi+v4f92ORQdt7/HmZS3ZGfoLgYD2Frv+/QZf/fsvcVuy oloUx8Nch+n5g8JxQZQ3dcLnzOhGqZjmLY1lZ42iol0q6DeDMUBprpuuUjI+mXAc4t TuXY+lv6ghlNRQGQamyJ+TP9v11uNXLWj9TxhOKY= 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.16 099/161] crypto: atmel-aes - fix the keys zeroing on errors Date: Thu, 24 May 2018 11:38:44 +0200 Message-Id: <20180524093030.271884133@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180524093018.331893860@linuxfoundation.org> References: <20180524093018.331893860@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.16-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 @@ -2155,7 +2155,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; }