Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1114274imm; Wed, 1 Aug 2018 10:24:49 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfmoc6BlSTU4UufVgY1QQ7aTBo5TJjaIBvtzr28rgaw2Zguah97uTZO78++EG0VFuC3zSgP X-Received: by 2002:a63:90c8:: with SMTP id a191-v6mr25523142pge.173.1533144289671; Wed, 01 Aug 2018 10:24:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533144289; cv=none; d=google.com; s=arc-20160816; b=ggMgNuShbk9OgTznRzfsDPzwtnJLX/jbDdTRJC+ZVyj3RvU06pAXHF9w6/kpcIH1tv RZzHADG0svvkQ78Tj7ZX0kzwEPBKOacCUfYL32aNTZ74rtrB2/BpLgwg8XChzNjq1Xnj Jdy47FB+zYYSPHDNAHUm31/r9fkVi1yU6Slf4GJtNiLCcDF8YyRo3l7XQu4sA+eUVaf8 KcrMipq0gPBlUIWi8fGVkNWAuUc7PzOxVMXtk+WGPpJ6RwTtJ2zYAATbdsUyz/02hFF0 mh/YtlF9HQcc6GlS87j0v0JRUnZz8HwqfLfq53GYGDcmw/S6oH5DGnvlS/FCHooeRwmX 6suQ== 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 :arc-authentication-results; bh=aS23B5Vi8upGhU6uAT3CKYSxnoh1hAus2h92uM8XrRY=; b=u6r61aI31T/O/xnIRWwpRHYHUXOtkmW19KoV+s9DZDN41WSC7QXIvof1j2CtcqDXtY Yi7Xu5y81xC2bvYt3uqMNWQtlpzZjmI88xtw1BkHQ78Izxd0F/HNUCn34WFBW9aa8Ava U0DxbE+gMEGVUITplXyVD9Mp+lyJirsJTqA5QaFfroP4Zpyuzu3sRMmJmX/V398L+99l kjwAs11GyF17568+O2hCOulR3L4wiLPl+fSn2pXWf9POUILg8UH6y7SWleBlqNhCJH0j Irm3lqxltiZ4jcM1wrbmErgh6VF5cYEBnZohsP+e+VwLPc17QEQUy9buaPkbgW4sNKJL oOcA== ARC-Authentication-Results: i=1; mx.google.com; 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 d2-v6si15486244pla.359.2018.08.01.10.24.35; Wed, 01 Aug 2018 10:24:49 -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; 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 S2405644AbeHATI2 (ORCPT + 99 others); Wed, 1 Aug 2018 15:08:28 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:49416 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2405634AbeHATI2 (ORCPT ); Wed, 1 Aug 2018 15:08:28 -0400 Received: from localhost (D57E6652.static.ziggozakelijk.nl [213.126.102.82]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 88CF6CE6; Wed, 1 Aug 2018 17:21:46 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Tudor Ambarus , Herbert Xu , Sasha Levin Subject: [PATCH 4.14 200/246] crypto: authencesn - dont leak pointers to authenc keys Date: Wed, 1 Aug 2018 18:51:50 +0200 Message-Id: <20180801165021.295416071@linuxfoundation.org> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180801165011.700991984@linuxfoundation.org> References: <20180801165011.700991984@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: Tudor-Dan Ambarus [ Upstream commit 31545df391d58a3bb60e29b1192644a6f2b5a8dd ] In crypto_authenc_esn_setkey we save pointers to the authenc keys in a local variable of type struct crypto_authenc_keys and we don't zeroize it after use. Fix this and don't leak pointers to the authenc keys. Signed-off-by: Tudor Ambarus Signed-off-by: Herbert Xu Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- crypto/authencesn.c | 1 + 1 file changed, 1 insertion(+) --- a/crypto/authencesn.c +++ b/crypto/authencesn.c @@ -90,6 +90,7 @@ static int crypto_authenc_esn_setkey(str CRYPTO_TFM_RES_MASK); out: + memzero_explicit(&keys, sizeof(keys)); return err; badkey: